Home » Technical Resources » Tutorial: Enabling the Slider Function

Tutorial: Enabling the Slider Function

Haptic Feedback Evaluation KitModes of Operation
Rev2Intro 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 touchpads 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.

Button Behaviour

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:

Haptic feedback kit shield
The system interprets button presses by hovering over the image of the haptic shield

By changing the code, we can enable the slider function to separate the buttons and change the navigation style to a ‘swipe’ effect:

Haptic feedback shield with swipe navigation feature
Navigation changed to a ‘swipe’ effect

Editing And Upload The Code

  1. 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

to:

#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

Get in touch

Speak to a member of our team.


Motor catalogue

Looking for our products?

Reliable, cost-effective miniature mechanisms and motors that meet your application demands.


Newsletter

Sign up to receive new blogs, case studies and resources – directly to your inbox.

Sign up

Name
Terms consent(Required)
Discussion consent(Required)