PyBadge blocked

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
oriolboix
 
Posts: 9
Joined: Thu Apr 20, 2017 2:59 am

PyBadge blocked

Post by oriolboix »

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

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
[/color]

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: PyBadge blocked

Post by dastels »

Can you access the REPL?

Can you double-reset to get the BOOT drive?

Dave

User avatar
oriolboix
 
Posts: 9
Joined: Thu Apr 20, 2017 2:59 am

Re: PyBadge blocked

Post by oriolboix »

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.

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: PyBadge blocked

Post by dastels »

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-c ... 2978456-25

Dave

User avatar
oriolboix
 
Posts: 9
Joined: Thu Apr 20, 2017 2:59 am

Re: PyBadge blocked

Post by oriolboix »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”