Report Bugs Here

Moderator: Mmiscool

User avatar
By SuperDave
#69532 I am having problems getting the button function to work, I have tried it with alpha 60 and alpha 69. It seems to me it worked with alpha 40 something. I have even pasted the blink example from the examples page and the buttons won't work on either. As a matter of a fact when I input the number of blinks and pin number the vars don't change on the vars page. I have tried the web interface with an iPad, iPhone, and a Windows 8 pc and all have the same results. I am sure I am doing something wrong, just don't know what.
User avatar
By heckler
#69543 superdave,
could you post the code you have tested.

Before most any of the webpage items can function your code must end in a "wait" statement.
This allows the processor to monitor the web page and interact if someone clicks a button.

this code should work as a simple test
regards
dwight

Code: Select allmemclear
cls
button "GetTime", [GetTime]
button "Exit ", [Exit]
wait
[GetTime]
print time()
wait
[Exit]
end
User avatar
By Electroguard
#69545 If you copied and pasted to rule out finger trouble, then that only leaves either the interpreter or esp as the problem.

Once the interpreter has suffered any sort of 'hit' (eg: from the 'Save' bug) then the only way to be sure it isn't corrupt is to reFormat it (run as Admin) then reFlash it.
Copy and paste anything of value first (and check for odd corrupt chars).
Obviously make sure you are not flashing a larger build to a smaller physical device.
The whole process takes less than 5 minutes so it's not the end of the world.

As far as I know esp-basic still has a 10 chr var and branch name limit, so I recommend reducing "[getMeOutOfHere]" (plus all references to it) to less than 10 chrs to eliminate that as a possible cause of problems.

You can test for just correct button operation using this minimal example:
Code: Select allbutton "quit", [quit]
wait

[quit]
print "Quit"
end
User avatar
By SuperDave
#69555 I just formatted the 2 esps that I am using, one is an ezsbc board (esp-07) running alpha 60 and the other is an esp-100 running alpha 69. Both seem to function fine for other programs, reading analog values and a ds18b20 temperature probe. I used both of the program examples that you posted and it still doesn't work.

I will try to flash the esps with firmware, but with the flasher I can't use the format the flash function. That hasn't worked on my computer since version 2.