API for Grove LED.
More...
UPM module for Grove LED (or other similar light-emitting diode). An LED is a small lightbulb that will emit light (turn on) in response to a small curent. The longer wire of an LED connects to the positive seat (anode); the shorter wire connects to the negative seat (cathode). The flat side of the bulb corresponds to the cathode while the rounded side corresponds to the anode.
std::cout << led->name() << std::endl;
for (int i=0; i < 10; i++) {
sleep(1);
sleep(1);
}
delete led;
while (shouldRun)
sleep(1);
Grove LED constructor
- Parameters
-
mraa_result_t write |
( |
int |
value | ) |
|
Turn the LED on or off, depending on the value. If the value is positive (greater than or equal to 1), the LED is turned on. Otherwise, for 0 or negative values, the LED is turned off.
- Parameters
-
value | tells the LED to turn on (for value >=1) or off (for value <1) |
- Returns
- 0 on success; non-zero otherwise
Turn the LED off
- Returns
- 0 on success; non-zero otherwise
Turn the LED on
- Returns
- 0 on success; non-zero otherwise
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/upm-doc-stable/src/grove/grove.h
- /var/lib/jenkins/workspace/upm-doc-stable/src/grove/grove.cxx