CircuitPython - Auto run?

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
RDSC2
 
Posts: 3
Joined: Mon Jun 27, 2022 4:45 am

CircuitPython - Auto run?

Post by RDSC2 »

Could someone please advise if it is possible (and how) to Autorun a CircuitPython program on a headless Pico.
I have tried the method used for a MicroPython program but cannot get it to work.
Thank you

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: CircuitPython - Auto run?

Post by jerryn »

Circuitpython with run code in a file named code.py ( or a few other options) at boot. See https://learn.adafruit.com/welcome-to-c ... 2977482-26

User avatar
RDSC2
 
Posts: 3
Joined: Mon Jun 27, 2022 4:45 am

Re: CircuitPython - Auto run?

Post by RDSC2 »

@jerryn
Thank you your reply but although I have been using both of those .py filenames, I cannot get it to run when headless with just a power connector. The only way I have managed to run the code is when it is attached to a Raspberry Pi.
I am trying to play some MP3 sound clips.

User avatar
RDSC2
 
Posts: 3
Joined: Mon Jun 27, 2022 4:45 am

Re: CircuitPython - Auto run?

Post by RDSC2 »

@jerryn
Forget last post. It is working now. I still had the original Hello World program loaded, which presumably was preventing it finding the program I actually wanted.
Thank for your help.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”