this is my first project with microcontrollers, and i'd like to ask for help in figuring out what i am doing wrong. i connected an MPL3115A2 to a Raspberry Pi Pico running CircuitPython 7.
here is my code:
Code: Select all
import board
import adafruit_mpl3115a2
import busio
import time
scldata = board.GP7
sdadata = board.GP6
i2c = busio.I2C(scldata, sdadata)
sensor = adafruit_mpl3115a2.MPL3115A2(i2c)
Code: Select all
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 11, in <module>
File "/lib/adafruit_mpl3115a2.py", line 149, in __init__
File "/lib/adafruit_mpl3115a2.py", line 194, in _poll_reg1
File "/lib/adafruit_mpl3115a2.py", line 171, in _read_u8
File "/lib/adafruit_mpl3115a2.py", line 167, in _read_into
OSError: [Errno 116] ETIMEDOUT
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.