Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Can't figure out how to download magnetometer library
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can't figure out how to download magnetometer library

by BS211561 on Fri Feb 28, 2020 9:06 pm

I'd really appreciate it if someone helped me out. I'm not very experienced with installing lots of computer software, so whoever reads this will probably be able to tell very easily what I'm doing wrong, but I have no idea. I have an adafruit LIS3MDL that I'm trying to install the library for. I've gone through the steps for installation, but when I run an actual code on main.py on the feather M0 Express, which is what I use, it says it doesn't recognize the module, but I clearly have adafruit_lis3mdl.mpy in lib in CIRCUITPY. Here's what I get when I run this:

import time
import board
import busio
import adafruit_lis3mdl

It returns this in the terminal window:

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


I attached a picture of what is in my CIRCUITPY. I really really appreciate anyone who would help. thank you. And btw I'm using a mac.

Screen Shot 2020-02-28 at 8.03.17 PM.png
CIRCUITPY
Screen Shot 2020-02-28 at 8.03.17 PM.png (272.88 KiB) Viewed 53 times

BS211561
 
Posts: 2
Joined: Thu Feb 27, 2020 6:30 pm

Re: Can't figure out how to download magnetometer library

by danhalbert on Fri Feb 28, 2020 9:57 pm

You have the CircuitPython 4.1.2 .uf2 file in CIRCUITPY. This suggests to me that you may not have successfully upgraded your Feather M0 Express to CircuitPython 4.1.2 from 3.x or earlier, which would explain the incompatible .mpy file message.

To load the .uf2 file, you need to double-click the reset button so that FEATHERBOOT appears. Then drag the .uf2 file to FEATHERBOOT. After a little while, CIRCUITPY will reappear, and you will be updated. For further details, see https://learn.adafruit.com/adafruit-fea ... cuitpython, and read the other pages in that guide if you have not already done so.

You can check which version before and after the above by looking at what's in BOOT_OUT.TXT.

In the CIRCUITPY drive, you can delete the Windows 7 drivers folder and the README.txt file, and you should delete the .uf2 file as well, because it's useless when it's in CIRCUITPY.

danhalbert
 
Posts: 2037
Joined: Tue Aug 08, 2017 12:37 pm

Re: Can't figure out how to download magnetometer library

by BS211561 on Sat Feb 29, 2020 2:18 am

Thank you so much sir. I can't tell you how much I appreciate it.

BS211561
 
Posts: 2
Joined: Thu Feb 27, 2020 6:30 pm

Re: Can't figure out how to download magnetometer library

by danhalbert on Sat Feb 29, 2020 9:12 am

Great! Glad you got it working!

danhalbert
 
Posts: 2037
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.