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: 6949 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.
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.
Temp&Hum 18 Click is a compact add-on board that represents temperature and humidity sensing solutions. This board features the HS3003, a highly accurate, fully calibrated relative humidity and temperature sensor from Renesas. It features proprietary sensor-level protection, ensuring high reliability and long-term stability. Integrated calibration and temperature-compensation logic provides fully corrected RH and temperature values via standard I2C output. No user calibration of the output data is required. The high accuracy, fast measurement response time, and long-term stability make this Click board™ ideal for various temperature and humidity-related applications and a vast number of applications ranging from portable devices to products designed for harsh environments.
[Learn More]Gyro 6 Click is a compact add-on board that contains a high-performance gyroscope. This board features the IAM-20380, a 3-axis, digital-output X-, Y-, and Z-axis angular rate sensor (gyroscope) from TDK InvenSense. It has a full-scale programmable range of ±250DPS, ±500DPS, ±1000DPS, and ±2000DPS with a factory-calibrated initial sensitivity and configurable host interface that supports both SPI and I2C serial communication.
[Learn More]Tamper Click is equipped with SDS001, a low profile side-actuated detect switch, made by C&K company. This is a high-quality, low-current detection switch, which is designed in a form of a push button. The switch itself is very small - only 2mm of switch overtravel length, which coupled with its low actuation force, makes it ideal for using it as a contact detector in various applications - consumer electronics devices, medical devices, smart card detection and similar applications.
[Learn More]You have unsaved changes. If you choose to leave all changes will be discarded.
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".