pybadge LC python bricked

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
flyboy1974
 
Posts: 12
Joined: Sun Apr 16, 2017 11:16 pm

pybadge LC python bricked

Post by flyboy1974 »

I have brought a pybadge to test the suitabilty for teaching younger kids programming using makecode and older kids python. The idea is that the hardware is cheap enough that each child will taking home the pybadge LC at the end of the course and we will buy new ones for next course.

I am quite experienced in python both on pc and main line micro python but this is my first time using Adafruit's port of circuit python. I am also experienced using embedded C on the STM32 line of MCUs.

I updated the boot loader to "update-bootloader-arcade_pybadge-v3.13.0.uf2" then dropped "adafruit-circuitpython-pybadge-en_US-7.0.0.uf2" to install the circuit python firmware. downloaded and unziped the library bundle "adafruit-circuitpython-bundle-7.x-mpy-20211122" and dropped all the libraries on to pybadge in the lib folder (I was surprised that they all fit).

I downloaded and installed the mu-editor then opened and selected circuit python and played around with some simple code as well as the pybadge examples, all worked as expected including the serial terminal.

I now decided to try the bouncing ball example found here "https://learn.adafruit.com/circuitpytho ... cing-balls". I have seen deshipu sprite libiary in action in micro python before.

When I saved the first couple of lines of code it bricked circuit python.

Code: Select all

import ugame
import stage
I can double press the reset button and it goes back to boot loader mode but I am unable to remove the code.py file that starts up whenever I start circuit python. This code.py bricks every time it starts.

How can I wipe code.py so that I can start again??

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

Re: pybadge LC python bricked

Post by dastels »

Like you, I am very surprised that the entire bundle fit. I'm also not sure why a couple imports would lock it up. But... things happen.

But to deal with it... does the CIRCUITPY drive mount after connection/reset? If do can you delete code.py from it?

There are things to try toward the bottom of the CircuitPython troubleshooting page: https://learn.adafruit.com/welcome-to-c ... leshooting.

Dave

User avatar
flyboy1974
 
Posts: 12
Joined: Sun Apr 16, 2017 11:16 pm

Re: pybadge LC python bricked

Post by flyboy1974 »

Thanks Dave for your reply.

At the bottom of the page you linked it had how to enter circuit python safe mode by doing a slow double click on reset where it starts python but doesn't load code.py, this allowed me to delete code.py

Now that I get python to start if I goto the serial terminal and repl prompt if I type "import ugame" then it hangs so there seems to be a problem with importing this library, how do I report a bug??

User avatar
flyboy1974
 
Posts: 12
Joined: Sun Apr 16, 2017 11:16 pm

Re: pybadge LC python bricked

Post by flyboy1974 »

Ok this seems to be a known issue with circuit python v7.0 reported by the author of ugame here https://github.com/adafruit/circuitpython/issues/5476

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

Re: pybadge LC python bricked

Post by dastels »

Looks like it in on the list to get fixed. So that's good.

Until then, you might try a pre-7.0.0 build.

Dave

User avatar
flyboy1974
 
Posts: 12
Joined: Sun Apr 16, 2017 11:16 pm

Re: pybadge LC python bricked

Post by flyboy1974 »

Yer that's what I will do is use an older version of circuit python

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

Return to “For Educators”