Report Bugs Here

Moderator: Mmiscool

User avatar
By viscomjim
#34184 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.
User avatar
By Mmiscool
#34374 Speed of the interpreter is a known problem.

As to the for next loop speed I just made a few tweaks that should make it work much better.

Download the latest version. v1.45

Very precise timing is not possible with the current architecture.