joystick3
2.1.0.0
|
PRVIH_PAR_RECENICA_SA_PRODUCT_PAGE_DA_ISPRATE_CELINU
[click Product page](CLICK_PRODUCT_PAGE_LINK)
We provide a library for the Joystick 3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for Joystick 3 Click driver.
joystick3_cfg_setup
Config Object Initialization function. joystick3_init
Initialization function. joystick3_default_cfg
Click Default Configuration function. joystick3_read_raw_adc
This function reads the raw ADC for X and Y axis by using SPI serial interface. joystick3_get_angle
This function calculates and returns joystick angle in degrees from raw ADC values for X and Y axis. joystick3_get_position
This function calculates and returns joystick position flag from raw ADC values for X and Y axis. This example demonstrates the use of the joystick 3 click board by reading
and displaying the raw ADC for X and Y axis, as well as the joystick angle and position calculated from those ADC readings.
The demo application is composed of two sections :
Initializes the driver and logger.
Reads the raw ADC measurements for X and Y axis, and calculates the joystick angle and position
from those readings. The results will be displayed on the USB UART approximately every 100ms.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.