for next loop acting wierd
Posted: Mon Nov 16, 2015 9:50 am
Hi Mike, doing this...
for x = 1 to 100
po 2 0
delay 200
po 2 1
delay 200
next x
I am getting very weird timing instead of a normal flash with 200ms delays between on and off. The led stays on (po 2 0) much longer than led off (po 2 1).
Should I be doing this a different way?
this is on an nodemcu esp8266 12e board with basic 1.41
EDIT...
Doing this...
for x = 1 to 10
serialprintln x
next x
The output looks like this...
1
2.00
3.00
etc. to
10.00
As you can see the first iteration is good and get 1. After that the output always has 2 decimal places added. Can this be an option so that it doesn't add decimal places unless asked to?
Thanks again for your efforts. This is getting really cool.
for x = 1 to 100
po 2 0
delay 200
po 2 1
delay 200
next x
I am getting very weird timing instead of a normal flash with 200ms delays between on and off. The led stays on (po 2 0) much longer than led off (po 2 1).
Should I be doing this a different way?
this is on an nodemcu esp8266 12e board with basic 1.41
EDIT...
Doing this...
for x = 1 to 10
serialprintln x
next x
The output looks like this...
1
2.00
3.00
etc. to
10.00
As you can see the first iteration is good and get 1. After that the output always has 2 decimal places added. Can this be an option so that it doesn't add decimal places unless asked to?
Thanks again for your efforts. This is getting really cool.