OSError: accelerometer not found

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
MJA-AJM
Posts: 2
Joined: Thu Jan 12, 2017 4:33 pm

OSError: accelerometer not found

Post by MJA-AJM » Thu Jan 12, 2017 4:38 pm

I write in Serial Terminal:
import pyb
pyb.Accel()
Answer is:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: accelerometer not found

Can anyone tell me what I do wrong?

User avatar
dhylands
Posts: 3455
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: OSError: accelerometer not found

Post by dhylands » Thu Jan 12, 2017 5:48 pm

Which board are you using?

MJA-AJM
Posts: 2
Joined: Thu Jan 12, 2017 4:33 pm

Re: OSError: accelerometer not found

Post by MJA-AJM » Sun May 07, 2017 12:45 pm

My bad bought the cheep model without one.

vince
Posts: 15
Joined: Wed May 06, 2020 9:23 am

Re: OSError: accelerometer not found

Post by vince » Wed Sep 16, 2020 12:35 pm

I've got the same error, although I use a Pyboard v 1.1, and it should have one :o :
https://store.micropython.org/product/PYBv1.1H

Any idea whats wrong? Does it needs to be switched on first or something similar? :?:

User avatar
pythoncoder
Posts: 4471
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: OSError: accelerometer not found

Post by pythoncoder » Thu Sep 17, 2020 11:00 am

On a Pyboard 1.1 you should be able to issue at the REPL

Code: Select all

>>> import pyb
>>> a = pyb.Accel()
>>> a.filtered_xyz()
The last line should return something like (2, -7, 22). If you get an error please post it.
Peter Hinch

Post Reply