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: 2019-01-28
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Optocoupler
Downloaded: 4282 times
Not followed.
License: MIT license
Opto 3 click is a relay Click boardâ„¢, equipped with two pairs of optically isolated solid-state relays (SSR).
Do you want to subscribe in order to receive notifications regarding "Opto 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Opto 3 click" changes.
Do you want to report abuse regarding "Opto 3 click".
Library Description
The library performs the input state checking and the output state setting. For more details check documentation.
Key functions:
T_OPTO3_STATE opto3_getIN1( void )
- Function returns a state of the Input 1.void opto3_setOUT2( T_OPTO3_SWITCH state )
- Function puts the Output 2 to the desired state.Examples description
The application is composed of the three sections :
void applicationTask()
{
stateIN1 = opto3_getIN1();
stateIN2 = opto3_getIN2();
stateOUT1 = stateIN1 ^ 1;
stateOUT2 = stateIN2 ^ 1;
opto3_setOUT1( stateOUT1 );
opto3_setOUT2( stateOUT2 );
}
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor 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.