|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for Grove Relay. More...
UPM module for Grove relay switch. The Grove relay is a digital normally-open switch that uses low voltage or current to control a higher voltage and/or higher current. When closed, the indicator LED will light up and current is allowed to flow.
Public Member Functions | |
| GroveRelay (unsigned int pin) | |
| ~GroveRelay () | |
| mraa_result_t | on () |
| mraa_result_t | off () |
| bool | isOn () |
| bool | isOff () |
Public Member Functions inherited from Grove | |
| std::string | name () |
Additional Inherited Members | |
Protected Attributes inherited from Grove | |
| std::string | m_name |
| GroveRelay | ( | unsigned int | pin | ) |
Grove relay constructor
| gpio | pin to use |
| ~GroveRelay | ( | ) |
Grove relay destructor
| mraa_result_t on | ( | ) |
Set the relay switch to on (close). This allows current to flow and lights up the indicator LED.
| mraa_result_t off | ( | ) |
Set the relay switch to off (open). This stops current from flowing and the indicator LED will not be lit.
| bool isOn | ( | ) |
Returns whether or not the relay switch is closed.
| bool isOff | ( | ) |
Returns whether or not the relay switch is open.


1.8.9.1