How to fix PyPortal corrupt files issue

I was tinkering with my Adafruit PyPortal the other day (which is a fantastic piece of kit....review soon) and I had an issue...

After a lot of help from Adafruit over Twitter, it turned out that the code.py file, which is the file that contains the main code that is run when the board boots, was corrupt.

So how did I fix this?



Adafruit suggested that I run the following command from the REPL. So I used Mu 1.1.0Alpha1

import storage

After typing this next command ALL FILES WILL DELETED FROM YOUR PYPORTAL as soon as you press Enter.

storage.erase_filesystem()

I then followed the Adafruit guidance to flash the latest firmware

Then I copied over the demo files which plays a series of quotes and a jingle when the device boots.



Remember to update your secrets.py file with your WiFi SSID and password. Oh and don't forget to set your timezone

All fixed!

Adafruit has got a great troubleshooting section on their website so take a look there if you have any issues.



Adafruit, thanks for your help!