blink. Calling
blink with a value of zero not only flashes the LED
forever program but hangs your program ;)
#include <LED_debug.h>
LED_debug led(7);
void loop() {
led.blink(3); // blink three times
led.blink(0); // blink forever
}
Public Member Functions | |
| LED_debug (unsigned char pin=7) | |
| void | blink (unsigned char num_times) |
Static Public Attributes | |
| static const unsigned char | _on_delay = 75 |
| static const unsigned char | _off_delay = 75 |
Definition at line 9 of file LED_debug.h.
| LED_debug::LED_debug | ( | unsigned char | pin = 7 |
) |
Constructs and LED_debug object and initializes the the output pin.
| [in] | pin | Pin number that the LED is connected to. This is the Arduino pin number (0..13). |
_on_delay and and _off_delay Definition at line 18 of file LED_debug.cpp.
| void LED_debug::blink | ( | unsigned char | num_times | ) |
Blinks the debug LED. The LED is on for _on_delay number of milliseconds and then off for _off_delay number of milliseconds.
| [in] | num_times | number of times to blink the LED. If number of times is zero than the LED blinks continously. |
Definition at line 33 of file LED_debug.cpp.
1.7.1