Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

TimeoutError: [Errno 110] Connection timed out" error on Jet
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

TimeoutError: [Errno 110] Connection timed out" error on Jet

by Taitan2010 on Sat Oct 16, 2021 5:40 am

What I want to solve:

I want to initialize a Robot class instance with Jetbot. But error occurs during the communication between Adafruit Motor Driver.

I'm making a Jetbot with NVIDIA's Jetson Nano. I created the hardware and installed the software according to the GitHub manual. I am getting the following error while handling a Basic Motion program with Collision Avoidance in Jupyter Notebook. Please let me know the solution.

Problems / errors that are occurring
[img]
無題.png
[/img]

What I have already checked
1.Jetbot appli.: No problem. Collision Avoidance Train Model was completed.
2.Motion of the motor itself. : Work when connecting battery directly.
3.Power supply to motor driver: Always Green lights
4.Camera (other kernel): No problem. Data Collection of Collision Avoidance is completed
5.The PiOLED display: Did not show anything. So I removed this display and connected the Jetson Nano with the Motor Driver directly.
Attachments
無題.png
無題.png (108.24 KiB) Viewed 56 times

Taitan2010
 
Posts: 2
Joined: Sat Oct 16, 2021 5:28 am

Re: TimeoutError: [Errno 110] Connection timed out" error on

by Taitan2010 on Sun Oct 17, 2021 4:48 am

Taitan2010 wrote:What I want to solve:
I'm making a Jetbot with NVIDIA's Jetson Nano. I created the hardware and installed the software according to the GitHub manual. The motor driver is "DC Motor + Stepper Featherwin GA: 2927" of Adaftuit. The following error occurs when handling a Basic Motion program (python3) with Collision Avoidance in Jupyter Notebook.
Please let me know the solution.

Problems / errors that are occurring
Code: Select all | TOGGLE FULL SIZE
---------------------------------------------------------------------------
TimeoutError                              Traceback (most recent call last)
<ipython-input-4-b418ad9f6ab3> in <module>
----> 1 robot = Robot()

/usr/local/lib/python3.6/dist-packages/jetbot-0.4.0-py3.6.egg/jetbot/robot.py in __init__(self, *args, **kwargs)
     20     def __init__(self, *args, **kwargs):
     21         super(Robot, self).__init__(*args, **kwargs)
---> 22         self.motor_driver = Adafruit_MotorHAT(i2c_bus=self.i2c_bus)
     23         self.left_motor = Motor(self.motor_driver, channel=self.left_motor_channel, alpha=self.left_motor_alpha)
     24         self.right_motor = Motor(self.motor_driver, channel=self.right_motor_channel, alpha=self.right_motor_alpha)

/usr/local/lib/python3.6/dist-packages/Adafruit_MotorHAT-1.4.0-py3.6.egg/Adafruit_MotorHAT/Adafruit_MotorHAT_Motors.py in __init__(self, addr, freq, i2c, i2c_bus)
    229         self.motors = [ Adafruit_DCMotor(self, m) for m in range(4) ]
    230         self.steppers = [ Adafruit_StepperMotor(self, 1), Adafruit_StepperMotor(self, 2) ]
--> 231         self._pwm = PWM(addr, debug=False, i2c=i2c, i2c_bus=i2c_bus)
    232         self._pwm.setPWMFreq(self._frequency)
    233

/usr/local/lib/python3.6/dist-packages/Adafruit_MotorHAT-1.4.0-py3.6.egg/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py in __init__(self, address, debug, i2c, i2c_bus)
     57         self.i2c = get_i2c_device(address, i2c, i2c_bus)
     58         logger.debug("Reseting PCA9685 MODE1 (without SLEEP) and MODE2")
---> 59         self.setAllPWM(0, 0)
     60         self.i2c.write8(self.__MODE2, self.__OUTDRV)
     61         self.i2c.write8(self.__MODE1, self.__ALLCALL)

/usr/local/lib/python3.6/dist-packages/Adafruit_MotorHAT-1.4.0-py3.6.egg/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py in setAllPWM(self, on, off)
     93     def setAllPWM(self, on, off):
     94         "Sets a all PWM channels"
---> 95         self.i2c.write8(self.__ALL_LED_ON_L, on & 0xFF)
     96         self.i2c.write8(self.__ALL_LED_ON_H, on >> 8)
     97         self.i2c.write8(self.__ALL_LED_OFF_L, off & 0xFF)

/usr/local/lib/python3.6/dist-packages/Adafruit_GPIO-1.0.4-py3.6.egg/Adafruit_GPIO/I2C.py in write8(self, register, value)
    114         """Write an 8-bit value to the specified register."""
    115         value = value & 0xFF
--> 116         self._bus.write_byte_data(self._address, register, value)
    117         self._logger.debug("Wrote 0x%02X to register 0x%02X",
    118                      value, register)

/usr/local/lib/python3.6/dist-packages/Adafruit_PureIO-1.0.4-py3.6.egg/Adafruit_PureIO/smbus.py in write_byte_data(self, addr, cmd, val)
    266         # Send the data to the device.
    267         self._select_device(addr)
--> 268         self._device.write(data)
    269
    270     def write_word_data(self, addr, cmd, val):

TimeoutError: [Errno 110] Connection timed out


What I have already checked
1.Jetbot appli.: No problem. Collision Avoidance Train Model was completed.
2.Motion of the motor itself. : Work when connecting battery directly.
3.Power supply to motor driver: Always Green lights
4.Camera (other kernel): No problem. Data Collection of Collision Avoidance is completed
5.The PiOLED display: Did not show anything. So I removed this display and connected the Jetson Nano with the Motor Driver directly.
6.i2cdetect command: The result is as follows. There seems to be something wrong with i2c communication but camera is working.
jetbot@jetson-4-3:~$ sudo i2cdetect -y -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


IMG_0301.jpg
Jetbot1
IMG_0301.jpg (84.35 KiB) Viewed 45 times

IMG_0303.jpg
Jetbot2
IMG_0303.jpg (86.61 KiB) Viewed 45 times

Taitan2010
 
Posts: 2
Joined: Sat Oct 16, 2021 5:28 am

Please be positive and constructive with your questions and comments.