Report Bugs Here

Moderator: Mmiscool

User avatar
By its1000
#68789 Hello guys.

First of all, I don't know who is the GENIUS who created ESPBasic. But I would like to thank him very very much.
I was used to program picbasic but they are stil expensive.
Having the possibility to programm a 3€ wifi ESP in basic was just to good to be true when I discovered this.


I am learning how to use the espbasic essentially with GPIO.
I made a small program to detect the push on the GPIO and send an email.
it works perfect if I launch it (run or debug)
I tried to activate the run at launch default.bas with this program but it does not work.
if I restart the ESP the button does not work
I have to manually launch the program.
is there anything special to do?

my program is this one:

setupemail "smtp.orange.fr", "25", "XXX@orange.fr", "XXXXX"

interrupt 0, [CHANGE]
wait

[CHANGE]
if io(laststat,0) = 0 then
email "xx@xx.fr", "xx@xx.fr", "email test title", "test is working"
else

endif
wait

I thank you very much for any help you could bring to me on this topics.
and again.

Long life to ESPBasic.
User avatar
By Electroguard
#68855 I've already made some comments on another post, but something else that can catch out anyone not aware is that esp-basic does not implement esp software pullup facility, so needs hardware pullups for switches and buttons after bootup... despite the boot-starter using software pullups at bootup to monitor the state of gpio00.

It may not matter, but I'd be inclined to comment out the unused Else rather than leave it empty, to prevent possibility of interpreter confusion.

Where in France are you? (I'm Landes, south of Bordeaux)
User avatar
By its1000
#68879
Electroguard wrote:I've already made some comments on another post, but something else that can catch out anyone not aware is that esp-basic does not implement esp software pullup facility, so needs hardware pullups for switches and buttons after bootup... despite the boot-starter using software pullups at bootup to monitor the state of gpio00.

It may not matter, but I'd be inclined to comment out the unused Else rather than leave it empty, to prevent possibility of interpreter confusion.

Where in France are you? (I'm Landes, south of Bordeaux)


Thank you very much Electroguard.your two anwsers should help me.
i am near Paris, but currently in hollydays in Bretagne...