Skip to content
Snippets Groups Projects
Commit e9aec3d1 authored by Tom Tiltmann's avatar Tom Tiltmann
Browse files

blink() kann jetzt ganz an/ausschalten

parent c0174623
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,14 @@ public:
void blink(uint16_t interval_off, uint16_t interval_on)
{
// 1. Fall: Keine Zeitintervall für den Zustand AUS-> LED ist also dauerhaft angeschaltet!
if (interval_off==0)
digitalWrite(PIN, HIGH);
// 2. Fall: Keine Zeitintervall für den Zustand EIN-> LED ist also dauerhaft ausgeschaltet!
else if (interval_on==0)
digitalWrite(PIN, LOW);
// 3. Fall: Es gibt Zeitintervalle EIN und AUS:
else
switch (digitalRead(PIN))
{
case HIGH:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment