We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-03-07
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Relay
Downloaded: 6590 times
Followed by: 2 users
License: MIT license
Relay 2 click carries two LCA717 single-pole, OptoMOS® solid state relays and two screw terminals for connecting the wiring. They are controlled by the microcontroller through RL1 and RL2 pins, which are in place of default mikroBUS AN and PWM pins.
Do you want to subscribe in order to receive notifications regarding "Relay 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Relay 2 click" changes.
Do you want to report abuse regarding "Relay 2 click".
Library Description
The library offers an option to control the state of relays.
Key functions:
void relay_relay2Control( uint8_t pinState ) - Controls the Relay 2 pin.
void relay_relay1Control( uint8_t pinState ) - Controls the Relay 1 pin.
Examples Description:
The application is composed of three sections:
void applicationTask() { relay2_relay2Control( 1 ); relay2_relay1Control( 1 ); Delay_ms( 1000 ); relay2_relay2Control( 0 ); relay2_relay1Control( 0 ); Delay_ms( 1000 ); }
Other mikroE Libraries used in the example:
Additional notes and information
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.