Hi,
i'm new in Arduino world, but i tried to do something with ESP8266 NodeMCU 1.0 and my code is probably incorrect in this part; this because, when i press the reset button, it will crush.
On my serial monitor i see many "+", so I think that the push state is always HIGH.
This part of code have to run only 10 secs and it is in the void setup(). Sorry for my bad english
...
pinTP = 10;
pinTM = 9;
pinMode(pinTP, INPUT);
pinMode(pinTM, INPUT);
while (millis()<10000){
if (digitalRead(pinTP) == HIGH){
t=t+interval;
int pa=digitalRead(pinTP);
Serial.print(pa);
}
else if (digitalRead(pinTM) == HIGH){
t=t-interval;
Serial.print("-");
}
};
...