Hi Mike,
Thanks for your attention on this possible bug.
Below is a test program that I have tested both on an esp-01 module and on a NodeMCU module.
I have also tested it on different gpio pins. (0 & 2 on the "01" module and 0,2,4,5 on the nodemcu)
The behavior is as follows.
You can click on any of the servo buttons and see the expected servo pwm. You can click back and forth to any of the servo settings and it changes as expected.
Once you have any of the servo outputs running and then click on either neopixel button "set all" or "all off" you will see the servo output go away for ~25 seconds and then re-appear.
I included the PWO buttons to see if the neo statement affects the pwo and it does to a much lesser extent.
If you have one of the pwo outputs running and then click a neo button the O-scope shows the pwo output stop just while the neo data is being sent and then it comes right back (whereas the servo stays off for a much longer period ~25 sec.)
You don't need to connect any hardware (neo pixels or servo) in order to observe the behavior. Just load the code into either an esp-01 or nodemcu module and run it.
Note I am seeing the nodemcu module crash and restart when I save the code but it did not start doing the save/crash until I added the PWO buttions. (Is there a limit of how many buttons you can have?)
The code seems to still run correctly after the save/crash)
I will post two versions of the code. One with and one without the PWO buttions.
Thanks so much for all you have done to create this amazing espBASIC and for your attention to this problem.
Dwight
Here is the test code... with PWO and SERVO...
Code: Select allneo.setup(0)
wprint "----- NeoPixel controls GPIO 0 ------"
wprint "<br>"
wprint "<br>"
wprint "Red ====>"
slider rd, 0, 255
wprint "<br>"
wprint "Green ===>"
slider gn, 0, 255
wprint "<br>"
wprint "Blue ====>"
slider bu, 0, 255
wprint "<br>"
button "Set All", [Setall]
button "All Off", [Alloff]
wprint "<br>"
wprint "<br>"
wprint "----- Servo controls GPIO 2 ------"
wprint "<br>"
wprint "<br>"
button "S 000", [S0]
button "S 060", [S1]
button "S 120", [S2]
button "S 180", [S3]
wprint "<br>"
wprint "<br>"
wprint "----- PWO controls GPIO 2 ------"
wprint "<br>"
wprint "<br>"
button "PWO 50", [P0]
button "PWO 250", [P1]
button "PWO 500", [P2]
button "PWO 750", [P3]
wprint "<br>"
wprint "<br>"
button "Exit", [Exit]
wait
'
[Setall]
neo.stripcolor(0,15,rd,gn,bu)
wait
'
[Alloff]
timer 0
neo.cls()
wait
'
[S0]
io(servo,2,0)
wait
[S1]
io(servo,2,60)
wait
[S2]
io(servo,2,120)
wait
[S3]
io(servo,2,180)
wait
'
[P0]
io(pwo,2,50)
wait
[P1]
io(pwo,2,250)
wait
[P2]
io(pwo,2,500)
wait
[P3]
io(pwo,2,750)
wait
'
[Exit]
end
test code with just the SERVO output...
Code: Select allneo.setup(0)
wprint "----- NeoPixel controls GPIO 0 ------"
wprint "<br>"
wprint "<br>"
wprint "Red ====>"
slider rd, 0, 255
wprint "<br>"
wprint "Green ===>"
slider gn, 0, 255
wprint "<br>"
wprint "Blue ====>"
slider bu, 0, 255
wprint "<br>"
button "Set All", [Setall]
button "All Off", [Alloff]
wprint "<br>"
wprint "<br>"
wprint "----- Servo controls GPIO 2 ------"
wprint "<br>"
wprint "<br>"
button "S 000", [S0]
button "S 060", [S1]
button "S 120", [S2]
button "S 180", [S3]
wprint "<br>"
wprint "<br>"
button "Exit", [Exit]
wait
'
[Setall]
neo.stripcolor(0,15,rd,gn,bu)
wait
'
[Alloff]
timer 0
neo.cls()
wait
'
[S0]
io(servo,2,0)
wait
[S1]
io(servo,2,60)
wait
[S2]
io(servo,2,120)
wait
[S3]
io(servo,2,180)
wait
'
[Exit]
end