adafruit / adafruit/Adafruit_CircuitPython_BNO08x
Cannot run on top of micropython
- Dominant language
- Python
- Stars
- 41
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
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 "", line 7, in
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:
```python
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the example from the linked CircuitPython-on-MicroPython guide, then inspect adafruit_bno08x/__init__.py around header_from_buffer and i2c.py around _send_packet. Determine why the BNO08x library fails under MicroPython, and consider the issue resolved when the supplied example runs successfully on the Raspberry Pi Pico W.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100