Why is my power up autorun NOT working?

Recurrent H/W and software problems
Post Reply
Eloclegin
Posts: 33
Joined: Fri Dec 09, 2022 5:04 pm
Has thanked: 17 times
Been thanked: 7 times

Why is my power up autorun NOT working?

Post by Eloclegin »

Can anyone point out why I am unable to get power up AUTORUN to work.

I have a very simple test prog. It runs fine.
Note: I am using ESL8266 NodeMCU with an OLED display. I wanted something simple and visible to indicate if prog starts at power up and not be dependent on achieving wifi connection.

' Prog test auto run
'
I2C.SETUP 4, 5 ' set I2C port on pins 4 and 5
OLED.INIT 1 ' init the OLED upside-down
OLED.CLS
OLED.FONT 2
OLED.PRINT 1,1,"Hello World"
OLED.PRINT 1,20, TIME$
WAIT

My understanding from the Help files is that one defines in the CONFIG file the name of the prog that is to be run at power up. So I set this in the PROGRAM directory to AUTORUN.bas and I store the prog above as AUTORUN.bas in the Program directory.
At power up nothing happens. Device sits dormant. I have tried using various different file names for this stored prog (just in case some names were reserved) such as DEFAULT.BAS or OLED.bas but makes no difference, plus latest Help suggests any valid name is fine as long as this same name is defined at the CONFIG file.

I tried both options of ticking and unticking the FASTBOOT box in the CONFIG file too.

What am I doing wrong?

Thanks in advance for further education… and Happy New Year to all
Eloclegin
Posts: 33
Joined: Fri Dec 09, 2022 5:04 pm
Has thanked: 17 times
Been thanked: 7 times

Re: Why is my power up autorun NOT working?

Post by Eloclegin »

Typo. ESL8266.
I am using ESP8266 NodeMCU (amica).
(I know it is not the best module option but i have several free).

After a power up and while device sits dormant appearing not to run the prog, it does seem to connect to wifi (my SSID and password are defined in CONFIG along with 192.168.1.100 as its IP) because it shows "connected" at browser editor. if i click “RUN” at Editor (running browser on same network) prog will not run. However if, at browser editor, I press SAVE (the prog is still visible sitting in the editor) and then RUN.. then it runs.
User avatar
cicciocb
Site Admin
Posts: 2160
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 461 times
Been thanked: 1435 times
Contact:

Re: Why is my power up autorun NOT working?

Post by cicciocb »

Probably you miss the leading slash in the file name :

you must put

Code: [Local Link Removed for Guests]

/AUTORUN.bas
The case is also important !
Eloclegin
Posts: 33
Joined: Fri Dec 09, 2022 5:04 pm
Has thanked: 17 times
Been thanked: 7 times

Re: Why is my power up autorun NOT working?

Post by Eloclegin »

Thanks. Now working.
/autorun.bas was not enough.
I had to put the full directory too hence..
/program/autorun.bas
Was not aware that directory needed, nor case sensitivity.
Many thanks for your help.
Post Reply