I am very new to this project and planning to build my Quad with I2C ESC´s but I didn´t find any uncommented lines at the code. Please let me know if you finished your conversion and what have you done to get I2C support for the ESC´s.
there is no official I2C code, but it's easy to add.
I added it to RC1 code, but it should be compatible to NG
you need to replace those rightMotor, leftMotor and so on with an array motorCommand[x]
x is the address of your ESC (e.g. 0, 1, 2, 3 for a quadrotor)
everywhere where it says:
"APM_RC.OutputCh(0, rightMotor); // Right motor
APM_RC.OutputCh(1, leftMotor); // Left motor
APM_RC.OutputCh(2, frontMotor); // Front motor
APM_RC.OutputCh(3, backMotor); // Back motor"
just write "commandMotors();"
you can remove all APM_RC.OutputCh() and all APM_RC.Force_Out
and add those 2 files (you maybe need to uncomment line 62 to 74 in motors.pde to ensure all motors are running (it will fly with this commented, but it should be safer to uncomment so the bus will not get jammed)
I hope I could help you
Thanks for the quick response and the two files, sounds easy to do the I2C conversion.
Did you notice any difference in flying performance between PWM and I2C configuration?
my ESCs were not good with PWM controll
so yes, I noticed a big difference ;)
I agree, I2C ESC's seem to be more predictable especially at start up and seem to respond more positively - but that may be my imagination.