CircuitPython Powering up with A or B button pressed

Project postings and help for Adafruit CLUE

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
DaveAZ
 
Posts: 18
Joined: Sun Apr 15, 2018 7:14 pm

CircuitPython Powering up with A or B button pressed

Post by DaveAZ »

I am attempting to use the clue.button_a or clue.button_b in the boot.py file to tell it whether to make the file system on the Clue board read-only or read-write.

The problem I'm running into is that if I hold down either the A or B buttons while plugging in the USB connector, the board boots up with the CLUEBOOT volume (on a Mac) rather than the CIRCUITPY volume available.

When it gets into this mode, then neither a single or double press of the reset button will get the CIRCUITPY volume back.

I have to reload the CP .UF2 file on to the CLUEBOOT volume to get the CIRCUITPY volume to appear again.

Is this the expected behavior?

Dave

User avatar
adafruit_support_carter
 
Posts: 24419
Joined: Tue Nov 29, 2016 2:45 pm

Re: CircuitPython Powering up with A or B button pressed

Post by adafruit_support_carter »

It could be. Try changing the code to loop until either button is pressed. And then take action based on button pressed. That way it'll boot up, configure the pins appropriately, and then wait for a press.

Code: Select all

while not clue.button_a and not clue.button_b:
    pass

#
# code to mount based on button a or b
#

Post Reply
Please be positive and constructive with your questions and comments.

Return to “CLUE”