X-Git-Url: http://git.piffa.net/web?a=blobdiff_plain;f=multitasking%2FBlinkWithoutDelay_7_struct%2FBlinkWithoutDelay_7_struct.ino;h=e72666285569423af9762ee8e6c6b2cc2966c32c;hb=3b78d813afb2e27ed29faa261570d2eeb8d5068d;hp=61a53b5b587dfa93160f11f616e5d62f89d93745;hpb=f3ffb63f53d580f0853e6b32c8ec377a7eac67f7;p=sketchbook_andrea diff --git a/multitasking/BlinkWithoutDelay_7_struct/BlinkWithoutDelay_7_struct.ino b/multitasking/BlinkWithoutDelay_7_struct/BlinkWithoutDelay_7_struct.ino index 61a53b5..e726662 100644 --- a/multitasking/BlinkWithoutDelay_7_struct/BlinkWithoutDelay_7_struct.ino +++ b/multitasking/BlinkWithoutDelay_7_struct/BlinkWithoutDelay_7_struct.ino @@ -37,7 +37,7 @@ void loop() struct blinkLed lightLed(struct blinkLed temp) { // dataType tipo_di_struct nome_funzione(argomenti) // Illumina il ledA secondo un intervallo passato come argomento - if(millis() - temp.previousMillis > temp.interval) { // gli elementi dello struct sono accessibili tramite l'operatore [punto] + if (millis() > temp.previousMillis + temp.interval) { // gli elementi dello struct sono accessibili tramite l'operatore [punto] // save the last time you blinked the LED temp.previousMillis = millis();