From: eaman Date: Sun, 8 Jan 2017 18:36:56 +0000 (+0100) Subject: serial dwebug tolto da pwm X-Git-Url: http://git.piffa.net/web?a=commitdiff_plain;h=8e9925f6950eb521d8f5a2609fc61ab3b7dcf81a;p=sketchbook_andrea serial dwebug tolto da pwm --- diff --git a/libraries/common/common.cpp b/libraries/common/common.cpp index a4e1349..889c749 100644 --- a/libraries/common/common.cpp +++ b/libraries/common/common.cpp @@ -143,6 +143,7 @@ void Lampeggiatore::Blink(long up, long down) { Pwm::Pwm(int pin) // Gestione del PWM utilizzando millis // per non bloccare il processore con delay + // Warning: serialWrite puo' interferire con i tempi. { ledPin = pin; pinMode(ledPin, OUTPUT); @@ -162,7 +163,6 @@ void Pwm::Up(long speed) { if ((millis() - previousMillis) > speed / 256) { brightness++; // Incrementiamo la luminosita' previousMillis = millis(); - Serial.println(brightness); }; } @@ -177,7 +177,6 @@ void Pwm::Down(long speed ) { if ((millis() - previousMillis) > speed / 256) { brightness--; // Incrementiamo la luminosita' previousMillis = millis(); - Serial.println(brightness); }; } @@ -186,7 +185,6 @@ void Pwm::UD(long speed ) { if ((millis() - previousMillis) > speed / 512) { brightness = brightness + increment; // Incrementiamo la luminosita' previousMillis = millis(); - Serial.println(brightness); analogWrite(ledPin, brightness); if (brightness == 0 || brightness == 255) { // Reverse direction increment = -increment ;