Issues with basic motion

i just setup my jetson nano development board and made it to open it remotly via Wifi and get to open the JupyterLab.
Here I wanted to start with the notebooks. The first one is the basic_motion. With the second command where he is supposed to initialize the Robot class the first errors appear. Can anyone give me an idea, what the problem could be.
Thank you in advance,

[2] robot = Robot()

–> the following error message appears.

OSErrorTraceback (most recent call last)
----> 1 robot = Robot()

/usr/local/lib/python3.6/dist-packages/jetbot-0.4.1-py3.6.egg/jetbot/ 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/ 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)

/usr/local/lib/python3.6/dist-packages/Adafruit_MotorHAT-1.4.0-py3.6.egg/Adafruit_MotorHAT/ 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/ 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/ 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.1.7-py3.6.egg/Adafruit_PureIO/ in write_byte_data(self, addr, cmd, val)
320 # Send the data to the device.
321 self._select_device(addr)
–> 322 self._device.write(data)
324 def write_word_data(self, addr, cmd, val):

OSError: [Errno 121] Remote I/O error

Hi funk.mat,

Thanks for reaching out!

This error is typically means that the Jetson nano is having trouble communicating with the motor driver over I2C. This arises from a few causes

  1. Hardware connection issue
  2. I2C permissions issue

Do you mind sharing which JetBot you are using, and the installation steps you took?


Dear Johan,
Thank you for your answer. I followed this instruction:

I tried both versions:

Jetson Nano (4GB) 4.4.1 0.4.1
Jetson Nano (4GB) 4.3 0.4.0

Even though i am not 100% sure, which image is on the SD card now.
I switched the SDA & SCL pins, but this doesn’t solve the problem. I also checked the wiring on the OLED.
The power comes from a 5V- power adapter and goes directly to the NVIDIA board. I don’t use a battery pack.
The motor driver is connected and gets 5V from a USB-port of my PC.

Could that be the problem?

Kind regards,