How to know the I2C address of ESC after changing , and signal value in ESC

HI,

I want to ask 3 questions

First : what is the return type of motor.voltage() , motor.rpm(), motor.current() , motor.temperature() ?

Second : how to know the new I2C address of the ESC after i change it with the firmware, there is 16 ids but how to know the new address ?

Third : when i use I2C to control the motor, the signal value will the signal value be the same as controlling it by servo library (1100 - 1900) ?

Mostafa,

Good questions. I’ve just updated the documentation for the Arduino_I2C_ESC library to answer all of these questions. You can find that here: GitHub - bluerobotics/Arduino_I2C_ESC: Arduino library for controlling I2C capable ESCs including the BlueESC

I’ll summarize here as well:

  1. motor.rpm() returns a 16 bit integer and the other functions return floats. See docs for more info.

  2. The default I2C address is 0x29. That’s “ESC 0”. Each address after that (ESC 1, ESC 2, etc) is 0x29 + 1, 2, etc. See docs for a table of I2C addresses.

  3. No, the throttle “set” command accepts a 16 bit integer with the sign indicating direction. That’s -32767 to 32767. I realize this may not be as useful as the “servo” style throttle range so I’ve added a new function called “setPWM” that accepts the normal 1100-1900 throttle range.

Let me know if you have any other questions.

-Rusty