An archive of community.esquilo.io as of Saturday January 26, 2019.

Dofile needs a delay for Run boot.nut Automatically to work

gwziebe

Has anyone else run into this? If I save a single line into boot.nut like this:

dofile("sd:/blinky.nut");

where binky.nut can be any file on the sd that I want to run on power up and then set the run boot.nut for run automatically in the system menu, it will not start up on push button reset or power up but it will work by running boot.nut from the IDE browser window.

After a bit of playing around with this, it seems that the SD card may need a certain amount of time to reset before it can be accessed.

I have found that if I change boot.nut to:

delay(300);
dofile("sd:/blinky.nut");

it will execute the sd file blinky.nut on push button reset but not on power up. Values of delay less than that will not work reliably. I need to increase the delay to about 500 to get it to work from a cold power up.

The sd card I am using is a Lexar 8 GB Class 10

patrick

Thanks for noting that. It's a known issue, but we haven't gotten around to root-causing it.

arnaud_lacour

thanks for reporting this and the delay values that worked, this was driving me ... well, nuts.