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: 3821
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: 5956
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
Index to my micropython libraries.

JulioFD1972
Posts: 1
Joined: Wed Jan 06, 2021 6:02 pm

Re: OSError: accelerometer not found

Post by JulioFD1972 » Wed Jan 06, 2021 6:08 pm

Good afternoom,
I have the same problem. I have the pyboard v1.1
this is what I get.
>>> import pyb
>>> a=pyb.Accel()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: accelerometer not found

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

Re: OSError: accelerometer not found

Post by dhylands » Wed Jan 06, 2021 7:45 pm

Are you sure you have a 1.1 board? The 1.0 LITE board doesn't have an accelerometer.

What does:

Code: Select all

import os
os.uname()
report for you?

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

Re: OSError: accelerometer not found

Post by pythoncoder » Thu Jan 07, 2021 3:05 pm

There are also clone boards out there of dubious quality.
Peter Hinch
Index to my micropython libraries.

Post Reply