-
Notifications
You must be signed in to change notification settings - Fork 8
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
pca9685? #20
Comments
Solved by Issue #1 I know it isnt a TON of work, but Ive spent a lot of time getting everything into the skeleton, if ChatterPi could use a servo controller, and control another servo for head left/right or something it would be a true AIO solution for these types of things. I am controlling my skeleton servos through viam currently, which I am new to, I wonder if Viam can call chatter pi for its capabilities, but use other modules for when it is 'ambient' |
I'm not familiar with viam. ChatterPi is currently set up to either autostart or be started by command, but it shouldn't be hard to modify it to be called by another program. I currently have my skeletons to be motionless until triggered. Then, when triggered, ChatterPi controls the jaw and sends a signal to an external servo controller (a Maestro by Pololu) to control the other servos. I currently run a pre-programmed routine on the Maestro). But I also did a related project where I used WiFi to sent positions to a Pi to control the skull. The other program received the position info and moved the nod, tilt, and turn servos, while the audio fed into a modified version of ChatterPi to control the jaw. So you can definitely do this. |
I would very much like to send the servo commands / positions over wifi, mqtt, home assistant any of those would be awesome, as I do not have any type of external servo controller. Can you share the code you used? |
I used xmlrpc over wifi to send sensor positions to the pi that controls the skull, and then that pi converted the senor readings to commands that were sent to the Maestro servo controller. But you could certainly send servo commands straight from the receiving Pi. The receiving pi just uses the xmlrpc.client library ( in particular, xmlrpc.client.ServerProxy) to send whatever function calls you've defined on the server end. The server end imports:
xmlrpc just sends the function calls over WiFi to the server side:
Then you just define the calls that the Pi controlling the skull may send. In my case:
It's been a couple of years since I looked at or ran this code, but I hope the code fragments help. xmlrpc is pretty simple to use, and while it has security concerns, this wasn't something I worried about for my skull on my home WiFi. |
thank you for the help, I am going to see if I can somehow get this going today. |
Were you able to get something going? Any other questions or follow up, or should I mark this issue closed? |
I just got two mg995 servos in my pose'n'stay skeleton, one for jaw, one for head movement left and right.
I am using a pca9685 to control the two servos, I understand it may be overkill but it does make power distribution easy.
Is there anyway to use chatterpi with the pca breakout board?
Edit to add:
Also, regardless of above, since I am only using 2 servos, I would gladly connect to GPIO and power servos separately, however, and correct me if I am mistaken, but ChatterPi supports only 1 servo? I have 2, one for jaw, one for head left/right.
The text was updated successfully, but these errors were encountered: