aanon4 / BlueBasic

BASIC interpreter for CC2540 and CC2541 Bluetooth LE chips
https://gitlab.com/timwilkinson/BlueBasic
97 stars 55 forks source link

Question - Can a basic program be saved and survive a power off #26

Closed bossesand closed 8 years ago

bossesand commented 8 years ago

I cannot find any information if it is possible to create a device with a permanent program that will run after power up.

How is that to be done?

JBtje commented 8 years ago

https://github.com/JBtje/BlueBasic/wiki/_AUTORUN

I had some trouble with this command, seems not always to work as good as hoped for. In my implementation I let the software sens a RUN command each time it connects to the sensor.

Best regards, Jeffrey

0xFACE commented 8 years ago

I allways end my script with sentence

AUTORUN ON
RUN
REBOOT

It works for me.

aanon4 commented 8 years ago

Programs are always written to FLASH so will always be there after power cycling. As noted by others, the AUTORUN ON command should make sure it runs after reboot. There's a short delay before the autorun to allow you to break in on a console in case there's a problem.