Default contents of Metro Express M0

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
HenryM
 
Posts: 7
Joined: Mon Jun 23, 2014 12:36 pm

Default contents of Metro Express M0

Post by HenryM »

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?

User avatar
HenryM
 
Posts: 7
Joined: Mon Jun 23, 2014 12:36 pm

Re: Default contents of Metro Express M0

Post by HenryM »

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.

User avatar
HenryM
 
Posts: 7
Joined: Mon Jun 23, 2014 12:36 pm

Re: Default contents of Metro Express M0

Post by HenryM »

The read only thing was resolved by running the following:
  1. sudo umount /media/henrym/CIRCUITPY
  2. sudo dosfsck /dev/sdc1 (after determining that my device was sdc1)
I've copied "neopixel.mpy" into /lib on the device and added the following code to main.py:

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
The board is alive again.

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

Return to “Metro, Metro Express, and Grand Central Boards”