I have the following code in my hello world example:
from XRPLib.defaults import *
print(“hello”)
I get the following error:
MicroPython v1.20.0 on 2023-04-26; Raspberry Pi Pico W with RP2040
Type “help()” for more information.
OKTraceback (most recent call last):
File “”, line 5, in
File “hello.py”, line 4, in
File “/lib/XRPLib/defaults.py”, line 19, in
File “/lib/XRPLib/imu.py”, line 26, in get_default_imu
File “/lib/XRPLib/imu.py”, line 59, in init
File “/lib/XRPLib/imu.py”, line 155, in is_connected
File “/lib/XRPLib/imu.py”, line 106, in _getreg
OSError: [Errno 110] ETIMEDOUT
I went into my defaults.py file and commented out line 19 and 20. I was then able to run this program.
17 left_motor = EncodedMotor.get_default_encoded_motor(index=1)
18 right_motor = EncodedMotor.get_default_encoded_motor(index=2)
19 #imu = IMU.get_default_imu()
20 #drivetrain = DifferentialDrive.get_default_differential_drive()
21 rangefinder = Rangefinder.get_default_rangefinder()
22 reflectance = Reflectance.get_default_reflectance()
Any idea why I have to comment out these two lines to get the hello world to work?