Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PCA9685 i2C 16ch servo controller (Ebay and adafruit) #2

Open
mano1979 opened this issue May 16, 2017 · 4 comments
Open

Comments

@mano1979
Copy link

Is there support for PCA9685 i2C 16ch servo controller in your version of the phoenix code? Or maybe in the near future?

Will this also run on other arduino's than the teensy?

@KurtE
Copy link
Owner

KurtE commented May 18, 2017

Sorry these days I am doing very little with the Phoenix code base, although keep meaning to get back to it.

And for the most part I have no interest in working with RC servos... Using mostly Robotis servos these days.

However if anyone wishes to implement it for this Servo Driver and issue a Pull request it would be great.

As for Teensy only? No, should work with most Arduinos. The code originally was done for the Lynxmotion board Botboarduino (Atmega 328 like UNO), have run on Megas as well as on the Trossen Arbotix boards,... At one point it was running on Chipkit M32 boards (not sure if that works any more).

Good Luck

@KurtE
Copy link
Owner

KurtE commented May 18, 2017

If it were me trying to do this, I would probably start off with looking at the Adafruit library:
https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
They have an example program that controls some servos.

The example has a function that in theory can convert seconds (float) into the right value to output of I2C.
If it were me, I would probably change that function to take an int or uint16_t of microseconds and convert it into the appropriate value...

Then I would look how the SSC-32 driver converts the desired angle into pulse width in microseconds and then combine the two parts to figure out the right values to send out... I would also experiment with then seeing how close I am... Send out a request for 45 degrees how close are we...

@mano1979
Copy link
Author

mano1979 commented May 18, 2017 via email

@Auc7us
Copy link

Auc7us commented Jul 25, 2020

If it were me trying to do this, I would probably start off with looking at the Adafruit library:
https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
They have an example program that controls some servos.

The example has a function that in theory can convert seconds (float) into the right value to output of I2C.
If it were me, I would probably change that function to take an int or uint16_t of microseconds and convert it into the appropriate value...

Then I would look how the SSC-32 driver converts the desired angle into pulse width in microseconds and then combine the two parts to figure out the right values to send out... I would also experiment with then seeing how close I am... Send out a request for 45 degrees how close are we...

I have been working for some time now, trying to make a PCA9685 driver for the same. I'm new to C++ and would appreciate it if you could explain a few parts of the code where I'm facing problems so that I can finish the driver.
TIA

Edit: Im making the driver based on your ServoEx driver and library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants