ir2 2.0.0.0
|
IR 2 Click is a compact add-on board representing a compact and easy solution for adding infrared (IR) remote control to your design. This board features the TSMP58138, a miniaturized sensor for receiving the modulated signal of QEE113 IR emitting diode from Vishay Semiconductors. This IR sensor module consists of a photodetector, pre-amplifier, and automatic gain control to surpass ambient noise with signals transmitted to it in the near-infrared range with a wavelength of 940nm. It also communicates with the target MCU via selectable GPIO lines.
We provide a library for the IR 2 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 IR 2 Click driver.
ir2_cfg_setup
Config Object Initialization function. ir2_init
Initialization function. ir2_get_out_pin
This function returns the OUT pin logic state. ir2_nec_send_data
This function sends an address and data bytes using NEC protocol. ir2_nec_read_data
This function reads an address and data bytes by using NEC protocol. This example demonstrates the use of an IR 2 click board by showing
the communication between the two click boards configured as a receiver and transmitter using the NEC protocol.
The demo application is composed of two sections :
Initializes the driver and logger and displays the selected application mode.
Depending on the selected mode, it sends a desired message using NEC protocol or
reads all the received data and displays them 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.