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

Adding support for Adafruit PCA9685 servo controller #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zuccon
Copy link

@zuccon zuccon commented Oct 17, 2022

This PR adds support for building a Brachiograph using an Adafruit PCA9685 I2C controller instead of pigpio.
More background information in the README

Some refactoring has been done to avoid code duplication:

  • The Plotter class has been split into a common subclass and hardware-specific classes.
  • Virtual mode is now just another hw-specific class.

Documentation will be updated if the change is accepted. In that case, also how to build a PCA9685-based Brachiograph will be documented.

Thanks for the Brachiograph fun!

@evildmp
Copy link
Owner

evildmp commented Oct 30, 2022

Thanks, this is great to see, I have no way of testing this right now, but I am doing some work on the project so let me think about this a bit to see how to incorporate this approach.

@NonaSuomy
Copy link

@LouDou
Copy link

LouDou commented Oct 8, 2023

I would also like to see this merged; unfortunately it doesn't rebase on master. Also, before I noticed this PR I also made similar changes, to be able to swap out the hardware driver part. I wrote a simple adapter to use the same Adafruit libraries. My branch is based on master as of today:

https://github.com/LouDou/BrachioGraph/tree/feature/basic-pca6985

@philippejadin
Copy link

Hello and first of all thank you for this incredibly cool project!

This is a great pull request imho, I'm looking at adding another driver, using any arduino compatible board to drive the servos, and thus making the project usable on any kind of computer instead of only raspberry pi with gpio's.

@evildmp Any chance this PR can be merged to allow additional drivers to be defined?

@philippejadin
Copy link

Digging this a bit more, this pull request is too out of date compared to the current state of the code, and imvho the other mentioned one is a bit hard to follow probably because there is not a clean separation between hardware specific driver and the supposedly "pure" drawing code which would not need to know anything about drivers (for example on what pins a servo is connected).
I'm not a python expert but I could try to propose a solution. Would there be interest to discuss how to do this the cleanest way?

@philippejadin
Copy link

A last comment on this hopefully. I did a quick and dirty hack that allows to run the servos using an arduino, it works quite fine already, here is the minimal amount of code changes to make it work :
master...philippejadin:BrachioGraph:arduino

If I don't get a reply (which I'd completely understand, the author might have other ideas for the project or most probably other stuff to do), I think I'll create a separate project with support for gcodes as input.

@evildmp
Copy link
Owner

evildmp commented Dec 29, 2024

@philippejadin @LouDou @zuccon

Thank you for your efforts and attention. I have been able to spend a little time working on the project lately, but it's whole a hobby project.

I would like to find a way to incorporate your work. Two issues:

First, I have no way of testing it or understanding some of the implications of the changes, so I think we would need to talk more about that.

Then, I would like to find a way to abstract as much as possible from the hardware and hardware controller implementations, so that future changes I make are not blocked by/don't break the changes to support different hardware. But I also don't want to introduce architectural complexity!

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

Successfully merging this pull request may close these issues.

5 participants