barcode2 2.0.0.0
|
Barcode 2 Click is an adapter add-on board that contains a computerized image recognition system that is compliant with a wide range of different 1D and 2D barcode protocols.
We provide a library for the Barcode2 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 Barcode2 Click driver.
- Initialization function.void barcode2_cfg_setup ( barcode2_cfg_t *cfg );
BARCODE2_RETVAL barcode2_init ( barcode2_t *ctx, barcode2_cfg_t *cfg );
- The general process of collecting data the module sends.void barcode2_enable_scaning ( barcode2_t *ctx, uint8_t en_state )
static void barcode2_process ( void )
This example reads and processes data from Barcode 2 clicks.
The demo application is composed of two sections :
Initializes the UART driver used for communication and another UART bus used for data logging.
This is an example that demonstrates the use of the Barcode 2 Click board. First, it enables scanning and waits up to 10 seconds for the barcode to be detected. If the barcode or QR Code is detected, it displays its content to the USB UART. After that, disables scanning for 3 seconds. Results are being sent to the Usart Terminal where you can track their changes.
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.