optoencoder4 2.1.0.0
|
Opto Encoder 4 Click is a compact add-on board that contains an optical sensor/encoder that can be used for movement or rotation encoding. This board features the EE-SX4330, a transmissive photo-microsensor from OMRON. It is intended to be used with an encoder disk or similar device that will act as a barrier between the emitter and detector of the sensor. Usually, it will be the disk with perforations, which is commonly used to detect the rotation speed.
We provide a library for the Opto Encoder 4 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 Opto Encoder 4 Click driver.
optoencoder4_cfg_setup
Config Object Initialization function. optoencoder4_init
Initialization function. optoencoder4_get_out_pin
This function returns the output pin logic state. optoencoder4_get_our_pin
This function returns the output pin reversed logic state. This example demonstrates the use of Opto Encoder 4 click board by processing
the encoder output pin state and incrementing the step counter on falling edge.
The demo application is composed of two sections :
Initializes the driver and logger.
Increments the step counter on falling edge of the encoder output pin state and displays it on the USB UART.
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.