0

PyBadge blocked
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PyBadge blocked

by oriolboix on Thu Sep 23, 2021 8:39 am

I am using PyBadge LC boards with my students. Last day, one group of students make one program and, when executed, it blocked the serial communication in Mu and, also, the possibility of save new programs from Mu. I opened the CIRCUITPY folder and tried to delete or update the code.py file but it blocked the folder in Windows.

How I can solve this? The program blocks the communication between the CIRCUITPY folder with Mu, Windows, etc. Any idea? Perhaps it is possible to do a factory reset.

I found this problem, in CircuitPython 7.0.0, with the following program:
Code: Select all | TOGGLE FULL SIZE
import ugame
abans = 0
print("Prem un polsador")
while True:
    boto = ugame.buttons.get_pressed()  # Llegeix els botons
    if not abans & ugame.K_RIGHT and boto & ugame.K_RIGHT:
        print("Has premut dreta")
    if not abans & ugame.K_LEFT and boto & ugame.K_LEFT:
        print("Has premut esquerra")
    if not abans & ugame.K_DOWN and boto & ugame.K_DOWN:
        print("Has premut avall")
    if not abans & ugame.K_UP and boto & ugame.K_UP:
        print("Has premut amunt")
    if not abans & ugame.K_SELECT and boto & ugame.K_SELECT:
        print("Has premut select")
    if not abans & ugame.K_START and boto & ugame.K_START:
        print("Has premut start")
    if not abans & ugame.K_O and boto & ugame.K_O:
        print("Has premut B")
    if not abans & ugame.K_X and boto & ugame.K_X:
        print("Has premut A")
    abans = boto

oriolboix
 
Posts: 8
Joined: Thu Apr 20, 2017 2:59 am

Re: PyBadge blocked

by dastels on Thu Sep 23, 2021 8:52 am

Can you access the REPL?

Can you double-reset to get the BOOT drive?

Dave

dastels
 
Posts: 7575
Joined: Tue Oct 20, 2015 3:22 pm

Re: PyBadge blocked

by oriolboix on Tue Sep 28, 2021 5:14 am

Thanks for your answer.

Can you access the REPL?
No. Wuen I touch the Serial button in Mu, it says "Could not find an attached Adafruit CircuitPython device".

Can you double-reset to get the BOOT drive?
Yes. With double reset I can acces PYBADGEBOOT drive.

oriolboix
 
Posts: 8
Joined: Thu Apr 20, 2017 2:59 am

Re: PyBadge blocked

by dastels on Tue Sep 28, 2021 9:12 am

Get the PYBADGEBOOT drive and copy the latest CircuitPython 7.0.0 for that board to it. https://circuitpython.org/board/pybadge/

Then try getting into the REPL again and reset the flash filesystem. If you still can't access the REPL there is an alternative. See https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#circuitpy-drive-issues-2978456-25

Dave

dastels
 
Posts: 7575
Joined: Tue Oct 20, 2015 3:22 pm

Re: PyBadge blocked

by oriolboix on Tue Sep 28, 2021 11:29 am

Thanks! It worked!

I found, also, an alternative way. Downloading a previous version of UF2 (i.e. 6.3) the program is not blocked and I can modify it.

oriolboix
 
Posts: 8
Joined: Thu Apr 20, 2017 2:59 am

Please be positive and constructive with your questions and comments.