Reply To: Tag 8 Login Timeout

Forums Advent Calender 2016 Tag 8 Login Timeout Reply To: Tag 8 Login Timeout

#1727
hosi1709
Participant

Also eine Lösung habe ich gerade selbst gefunden. Eine Pause mit delay(1000); macht die Sache etwas träger. Dafür klappt es aber so wie sicher geplant.

int lastValue = 0;

void checkPoti()
{
//read A0 and convert it to values 0-255
int currValue = map(analogRead(A0), 0, 1023, 0, 255);

//if values have changed write to virtual led2
if (!(currValue == lastValue)){
lastValue = currValue;
Blynk.virtualWrite(V1, currValue);
delay(1000);
}
}