Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Program startup on power up
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Program startup on power up

by BEYoung on Sun Jun 21, 2020 9:51 pm

I have a circuit playground express and used makecode to load my program.
After I have loaded my program every thing works as it should.

My issue is when I unplug the USB cord to remove power and then plug the USB back in to re-power the board. At this point the board lights up as it does when its been reset waiting to have the program loaded. When I push the reset button all lights clear and my program is actively running with out me having to reload.

What I want is for the board to power up with the program running with out having to push the reset button as I will have the board enclosed in a box and the reset button will not be accessible.

Thanks in advance for any guidance.

Brad

BEYoung
 
Posts: 2
Joined: Sun Jun 21, 2020 9:40 pm

Re: Program startup on power up

by mikeysklar on Mon Jun 22, 2020 6:24 pm

Hello BEYoung,

What type of USB power source are you using? I could see the CPX getting stuck at a REPL prompt and requiring that ^D or a reset button be pressed if you were plugging into a computer USB. However, if you are simply plugging into a USB wall socket or USB battery pack I would expect the CPX to not require any interaction to run your code.

mikeysklar
 
Posts: 1743
Joined: Mon Aug 01, 2016 8:10 pm

Re: Program startup on power up

by BEYoung on Mon Jun 22, 2020 8:38 pm

I was using the computer USB. When I plugged into an AC USB power plug, my device booted up running my program. This is the way I plan to use it.
Thanks mikeysklar.

BEYoung
 
Posts: 2
Joined: Sun Jun 21, 2020 9:40 pm

Re: Program startup on power up

by mikeysklar on Tue Jun 23, 2020 6:13 pm

Cool. Thank you for the confirmation that the wall USB adapter worked.

mikeysklar
 
Posts: 1743
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.