Open
Description
Hi I just followed the instruction on https://learn.adafruit.com/circuitpython-libraries-on-micropython-using-the-raspberry-pi-pico/overview to run Circuitpython libraries on top of Micropython on Raspberry Pi Pico W.
I have installed all the libraries needed according to the instruction, when running the example code the IDE pops up with the following issue:
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "adafruit_bno08x/i2c.py", line 27, in __init__
File "adafruit_bno08x/__init__.py", line 506, in __init__
File "adafruit_bno08x/__init__.py", line 512, in initialize
File "adafruit_bno08x/__init__.py", line 1063, in soft_reset
File "adafruit_bno08x/i2c.py", line 38, in _send_packet
File "adafruit_bno08x/__init__.py", line 380, in __init__
File "adafruit_bno08x/__init__.py", line 456, in header_from_buffer
TypeError: function doesn't take keyword arguments
The code I used:
import board
import busio
from adafruit_bno08x.i2c import BNO08X_I2C
from adafruit_bno08x import BNO_REPORT_ACCELEROMETER
i2c = busio.I2C(scl=board.GP15, sda = board.GP14)
bno = BNO08X_I2C(i2c)
bno.enable_feature(BNO_REPORT_ACCELEROMETER)
while True:
accel_x, accel_y, accel_z = bno.acceleration # pylint:disable=no-member
print("X: %0.6f Y: %0.6f Z: %0.6f m/s^2" % (accel_x, accel_y, accel_z))
I have tried the bme280 library provided by the instruction and it works, which I believe proved that I have correctly installed the library. The reason that I need to use micropython is that I want to use the multicore function.
Anybody please help.