I've blown away the contents of my Metro Express M0 board. Can anyone point me to a where I can find the default contents so that I may begin experimenting again from the beginning?
Additionally, this page looks like it has libraries for Circuit Python 6 and 7. The example main.py suggests that my board is using 2.2.0. Do I need to figure out how to update it?
Default contents of Metro Express M0
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- HenryM
- Posts: 7
- Joined: Mon Jun 23, 2014 12:36 pm
Re: Default contents of Metro Express M0
I have a suspicion that I need to update to CP 7.0 from here: https://circuitpython.org/board/metro_m0_express/
I'll give this a shot in the morning.
Edit: No go... solid red neopixel. I think I just need to figure out what libraries are missing from the lib directory.
Edit 2: And the flash is mounting as read only. Yahoo. Probably a Linux thing, deal with it in the morning.
I'll give this a shot in the morning.
Edit: No go... solid red neopixel. I think I just need to figure out what libraries are missing from the lib directory.
Edit 2: And the flash is mounting as read only. Yahoo. Probably a Linux thing, deal with it in the morning.
- HenryM
- Posts: 7
- Joined: Mon Jun 23, 2014 12:36 pm
Re: Default contents of Metro Express M0
The read only thing was resolved by running the following:
The board is alive again.
- sudo umount /media/henrym/CIRCUITPY
- sudo dosfsck /dev/sdc1 (after determining that my device was sdc1)
Code: Select all
import board
import neopixel
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1)
pixel.brightness = 0.1
def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0):
return [0, 0, 0]
if (pos > 255):
return [0, 0, 0]
if (pos < 85):
return [int(pos * 3), int(255 - (pos*3)), 0]
elif (pos < 170):
pos -= 85
return [int(255 - pos*3), 0, int(pos*3)]
else:
pos -= 170
return [0, int(pos*3), int(255 - pos*3)]
i = 0
while True:
pixel[0] = wheel(i)
i = i + 1 if i < 255 else 0
Please be positive and constructive with your questions and comments.