print to serial and set previous_time
This commit is contained in:
parent
57d47e7558
commit
eb9a43984f
@ -60,6 +60,7 @@ void loop() {
|
||||
if (len >= 2) {
|
||||
rpm = buf[0] | (buf[1] << 8);
|
||||
v = rpm * 0.017;
|
||||
Serial.print("Vitesse = ");
|
||||
Serial.println(v);
|
||||
};
|
||||
break;
|
||||
@ -68,6 +69,7 @@ void loop() {
|
||||
if (len >= 2) {
|
||||
ubat = buf[0] | (buf[1] << 8);
|
||||
ubatr = ubat / 16;
|
||||
Serial.print("Tension = ");
|
||||
Serial.println(ubatr);
|
||||
};
|
||||
break;
|
||||
@ -77,6 +79,7 @@ void loop() {
|
||||
|
||||
current_time = millis();
|
||||
if( current_time - previous_time >= timing){
|
||||
previous_time = current_time;
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("Vitesse = ");
|
||||
lcd.print(v);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user