GPy with BNO055 - I2C bus error
I'm trying to interface the bno055 breakout board (by adafruit) with my GPy module. I'm using following micro python library for bno055 https://bitbucket.org/thesheep/micropython-bno055/src
Upon running the code shown below, following error is got 'OSError: I2C bus error' with a mention of some line numbers in bno055.py and functools.py. However, i2c scan returns the correct device address as 40 (0x28). How can I proceed?
from machine import Pin, I2C import time import bno055 i2c = I2C(0, I2C.MASTER, baudrate=1000, pins=(Pin.exp_board.G15, Pin.exp_board.G16)) print(i2c.scan()) #Prints "" s = bno055.BNO055(i2c) print(s.temperature()) print(s.euler()) i2c.deinit()
MarcoBenini last edited by MarcoBenini
I2C(0, I2C.MASTER, baudrate=1000, pins=(Pin.exp_board.G15, Pin.exp_board.G16)) > ```
Expansion board G15 and G16 are P8 and P9.
P8 is the SD_Data, but You don't use the SD card, the P9 on expansion board is the "led" pin.
Try removing the led jumper "enable led signal" on expansion board to disable it.
can you show some picture of your setup? It is soldered or simple wires?
Did you checked some basic steps like properly connected wires especially GND from sensor to GND to the board?
@seb Adafruit documentation says pullups are already present on SDA and SCL pins.
SCL - I2C clock pin, connect to your microcontrollers I2C clock line. This pin can be used with 3V or 5V logic, and there's a 10K pullup on this pin.
SDA - I2C data pin, connect to your microcontrollers I2C data line. This pin can be used with 3V or 5V logic, and there's a 10K pullup on this pin.
@livius I2C device isn't detected at this baud rate. i2c.scan() returns an empty list.
try on default baudrate
seb last edited by seb
do you have external pull up resistors?
Edit: your last post says you dont, try adding some
@livius here is the complete error
Traceback (most recent call last): File "<stdin>", line 10, in <module> File "bno055.py", line 46, in __init__ File "bno055.py", line 91, in init File "bno055.py", line 108, in reset File "bno055.py", line 107, in reset File "bno055.py", line 104, in reset File "functools.py", line 5, in _partial File "bno055.py", line 63, in _register File "bno055.py", line 51, in _registers OSError: I2C bus error
I'm not using SD Card. I'm just using some random pins, no relation as such with anything else.
I'm not using any external pullups as well.
'OSError: I2C bus error' with a mention of some line numbers in bno055.py
and do you use SD card? I ask because you set in i2c
initnon standard pins - one is from SD card
Also do you use some externall pullups on i2c line?