-->
Page 1 of 2

maybe not a bug, but I need help for autostart

PostPosted: Wed Aug 02, 2017 4:56 pm
by its1000
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.

Re: maybe not a bug, but I need help for autostart

PostPosted: Sat Aug 05, 2017 9:02 am
by Electroguard
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)

Re: maybe not a bug, but I need help for autostart

PostPosted: Sun Aug 06, 2017 1:58 pm
by its1000
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...

Re: maybe not a bug, but I need help for autostart

PostPosted: Wed Aug 09, 2017 10:08 am
by its1000
Thank you very MUCH.
it works.
first I changed the port for reading the switch (I had already put pullup resistor before)
then I went 2mn before trying and now it works