M4 CAN Express unable to load circuitpython library

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pthompson509
 
Posts: 9
Joined: Mon Jun 10, 2013 8:49 pm

M4 CAN Express unable to load circuitpython library

Post by pthompson509 »

Hi Folks,

I just received a new Feather M4 CAN Express board. I followed the directions (I hope) to put circuitpython on the board.
I'm using the MU editor, and it can see and edit code.py.
The version of circuitpython is 7.3.0.

I tried the simple LED flash program (as per https://learn.adafruit.com/adafruit-fea ... iting-code). It downloaded and ran without an error, but no flashing of LED. (NOTE that the small yellow LED next to the USB-C connector was flashing very quickly).

So I then tried the neopixel example (as per https://github.com/adafruit/Adafruit_Le ... on/code.py). The code notes that it needs the neopixel library, so I got the circuitpython bundle for 7.x and put the neopixel.mpy into d:\lib.

Here is the code:

Code: Select all

# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT

"""
Blink example for boards with ONLY a NeoPixel LED (e.g. without a built-in red LED).
Includes QT Py and various Trinkeys.

Requires two libraries from the Adafruit CircuitPython Library Bundle.
Download the bundle from circuitpython.org/libraries and copy the
following files to your CIRCUITPY/lib folder:
* neopixel.mpy
* adafruit_pixelbuf.mpy

Once the libraries are copied, save this file as code.py to your CIRCUITPY
drive to run it.
"""
import time
import board
import neopixel

pixels = neopixel.NeoPixel(board.NEOPIXEL, 1)

while True:
    pixels.fill((255, 0, 0))
    time.sleep(0.5)
    pixels.fill((0, 0, 0))
    time.sleep(0.5)
    time.sleep(0.5)
Here is the error:

Code: Select all

code.py output:
Traceback (most recent call last):
  File "code.py", line 20, in <module>
MpyError: Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info.

Code done running.
Thanks in advance for any help on this.

User avatar
neradoc
 
Posts: 542
Joined: Wed Apr 27, 2016 2:38 pm

Re: M4 CAN Express unable to load circuitpython library

Post by neradoc »

Hi, there's a bug with the current bundle release, we'll be fixing it, but in the mean time please use this previous bundle release:
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20220614
PThompson509 wrote:It downloaded and ran without an error, but no flashing of LED.
That's weird, that should work. (With the red LED on the other side of the USB connector).
PThompson509 wrote:(NOTE that the small yellow LED next to the USB-C connector was flashing very quickly).
That's the charging indicator, it blinks when it's looking for a battery, that's normal behavior.
Last edited by neradoc on Sat Jun 18, 2022 3:19 pm, edited 1 time in total.

User avatar
pthompson509
 
Posts: 9
Joined: Mon Jun 10, 2013 8:49 pm

Re: M4 CAN Express unable to load circuitpython library

Post by pthompson509 »

Brilliant - thanks for the fast feedback.

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

Return to “Adafruit CircuitPython”