Tutorial: Enabling the Slider Function
|Haptic Feedback Evaluation Kit||Modes of Operation|
|Rev2||Intro Mode, Engineering Mode|
By default, the Haptic Feedback Evaluation Kit operates with 6 separate buttons when navigating the haptic menu. Users move through the menu options with the Left and Right buttons, but with a simple change to the code, it is possible to enable a ‘slider’ functionality to swipe through the menu options.
Many users, especially those familiar with Rev1, will have noticed that the capacitive touch pads on the Haptic Shield have a total of nine pads on the bottom row, grouped into larger Left, Select and Right buttons. This ‘grouping’ can be removed, enabling us to move the thumb across several pads for navigation.
You can see how the system interprets button presses by hovering over (or pressing on) the images of the Haptic Shield below. By default, the nine bottom touchpads are grouped into three buttons:
By changing the code, we can enable the slider function to separate the buttons and change the navigation style to a ‘swipe’ effect:
Editing And Upload The Code
- Download the sketch you wish to use from our Code and Sketches page, you can use the slider with either the Intro Mode or the Engineering Mod
2. Open the main sketch (.ino) file of either mode
3. Edit line 44 from:
#define SLIDER_ENABLE 0
#define SLIDER_ENABLE 1
4. Upload the code to the Arduino (shift + U) ensuring the correct COM port is selected (found under Tools -> Port)
5. Swipe your thumb across several pads to move left and right, press the Select button to enter/select the menu operation