Bad coding?

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("-");
}
};
...

... And bad posting.

What have you got wired to pin 10 ? A button ? A resistor ? Both ?
You should post your whole code and between code tags.

Yes Bad coding indeed ! :grin:

6v6gt:
What have you got wired to pin 10 ? A button ? A resistor ? Both ?
You should post your whole code and between code tags.

a button, connected to 3.3 V and pin 10