slider 2.0.0.0
|
Slider click features a mechanical slide action potentiometer - a slider, which gives a nice feeling when actuating, along with 16 SMD LEDs, that can be used for any kind of visual feedback. The onboard high-resolution 22-bit ADC can detect even the smallest move, faithfully capturing the smoothness of the slider movement, while digitizing its position. The 16 onboard SMD LEDs can give a nice visual feedback of the slider position, but those LEDs can also be used for other purposes since they are not hardwired to the slider.
We provide a library for the Slider 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Slider Click driver.
- Initialization function.void slider_cfg_setup ( slider_cfg_t *cfg );
SLIDER_RETVAL slider_init ( slider_t *ctx, slider_cfg_t *cfg );
void slider_default_cfg ( slider_t *ctx );
- Function enables LED output to shows output laches when state is low, and disables LED output when state is high.uint32_t slider_read_adc_and_ready ( slider_t *ctx );
void slider_enable_led_output ( slider_t *ctx, uint8_t state );
void slider_enable_output_laches ( slider_t *ctx, uint8_t state );
This example detect even the smallest move, faithfully capturing the smoothness of the slider movement, while digitizing its position.
The demo application is composed of two sections :
Initializes click driver
Converts analog input voltage (VCC), witch value depends on the slider position, to digital output value, shows result of conversion on LED and logs result on USB UART.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.