How does it work?
Thumbstick 2 Click is based on the THB001P, a high-quality two-axis joystick with an integrated push button from C&K Components, combined with additional circuitry to deliver advanced input and haptic feedback capabilities for embedded applications. The joystick provides smooth and precise motion control across both the X and Y axes, while its angular displacement and positional data are converted into digital form through the MCP3202, a 12-bit A/D converter from Microchip that communicates via an SPI serial interface. This allows reliable acquisition of raw analog values that represent the joystick’s movements, ensuring accurate control in a wide range of applications including human–machine interfaces, handheld control units, industrial equipment, assistive devices, and gaming controllers where precise positioning and tactile confirmation are essential.
.jpg)
In addition to directional input, the built-in push button expands the input functionality by enabling discrete command execution when pressed, and this button is also linked to control the onboard vibration motor. The vibration motor used on the back of the board, the VZ43FC1B5640007L, delivers strong tactile feedback with a force of 0.91G and operates at a rated speed of 10,000 rpm, creating a responsive haptic signal that can be used to enhance user interaction in real time. Its operation is managed through the VB pin using PWM control, making it possible to fine-tune vibration intensity and duration according to application requirements.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type |
Pushbutton/Switches |
Applications |
Ideal for human–machine interfaces, handheld control units, gaming controllers, assistive devices, and industrial equipment requiring precise positioning and haptic confirmation |
On-board modules |
THB001P - 2-axis joystick from C&K Components |
Key Features |
High-quality two-axis joystick with an integrated push button, precise angular displacement and position measurement through 12-bit A/D converter with SPI interface, an onboard VZ43FC1B5640007L vibration motor, and more |
Interface |
PWM,SPI |
Feature |
ClickID |
Compatibility |
mikroBUS™ |
Click board size |
S (28.6 x 25.4 mm) |
Input Voltage |
3.3V or 5V |
Pinout diagram
This table shows how the pinout on Thumbstick 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes |
Pin |
 |
Pin |
Notes |
---|
 |
NC |
1 |
AN |
PWM |
16 |
VB |
Vibro Motor Control |
ID SEL |
RST |
2 |
RST |
INT |
15 |
SW |
Push-Button Status |
SPI Select / ID COMM |
CS |
3 |
CS |
RX |
14 |
NC |
 |
SPI Clock |
SCK |
4 |
SCK |
TX |
13 |
NC |
 |
SPI Data OUT |
SDO |
5 |
MISO |
SCL |
12 |
NC |
 |
SPI Data IN |
SDI |
6 |
MOSI |
SDA |
11 |
NC |
 |
Power Supply |
3.3V |
7 |
3.3V |
5V |
10 |
5V |
Power Supply |
Ground |
GND |
8 |
GND |
GND |
9 |
GND |
Ground |
Onboard settings and indicators
Label |
Name |
Default |
 Description |
---|
LD1 |
PWR |
- |
Power LED Indicator |
JP1 |
VCC SEL |
Left |
Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
Thumbstick 2 Click electrical specifications
Description |
Min |
Typ |
Max |
Unit |
---|
Supply Voltage |
3.3 |
- |
5 |
V |
ADC Resolution |
- |
12 |
- |
bit |
Vibro Motor Force |
- |
- |
0.91 |
G |
Software Support
Thumbstick 2 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Example Description
This example demonstrates the use of the Thumbstick 2 Click board which features a 2-axis joystick with push button and vibration feedback. The joystick's angle and position are calculated based on raw ADC values, while the push button status controls the vibration motor through PWM output.
Key Functions
thumbstick2_cfg_setup
This function initializes Click configuration structure to initial values.
thumbstick2_init
This function initializes all necessary pins and peripherals used for this Click board.
thumbstick2_read_raw_adc
This function reads the raw ADC for X and Y axis by using SPI serial interface.
thumbstick2_get_angle
This function calculates and returns joystick angle in degrees from raw ADC values for X and Y axis.
thumbstick2_get_position
This function calculates and returns joystick position flag from raw ADC values for X and Y axis.
Application Init
Initializes the logger and the Click driver.
Application Task
Continuously reads the raw ADC values from the joystick axes, calculates the joystick's position and angle, and logs the results. It also checks the state of the joystick push button and activates vibration feedback accordingly.
Application Output
This Click board can be interfaced and monitored in two ways:
- Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
- UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Additional Notes and Information
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.