pythoncader / ServoPumpkin

https://youtu.be/DHAT5_LTPns
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

12 Servos?? #1

Open Dnozz opened 1 year ago

Dnozz commented 1 year ago

Hey I'm new to coding and tried to make this work for 12 servos... and failed. I'm running low on time. Anyway you can throw out a 12 servo Arduino option? (can just copy movement from some the other channels (least thats what I TRIED to do.. ).

pythoncader commented 1 year ago

Sure - I can probably get that done tomorrow - do you want the routines or just the basic random eye positions one? Also are you running it with a Raspberry Pi or Arduino? -does it work with 8 of the servos you have hooked up or what is your hardware setup like?

pythoncader commented 1 year ago

I updated the ServoPumpkin.ino file with support for more servos - you'll still have to play around with the servos and find their minimum and maximum angles (so they don't overrotate with the eye setups) and add extra variables for those as well as updating the variable number_of_servos to reflect the number of servos you have (I left comments in the file where you should do this) - I have not tested the program so I saved it as a separate file (ServoPumpkin-moreservosupport.ino), but I'm fairly confident you should be able to get it to work. let me know if you have any more questions

pythoncader commented 1 year ago

I'm not sure why it keeps closing the issue😂

pythoncader commented 1 year ago

The main thing you'll have to do to add more servos/eyes is just to figure out the minimum and maximum angles that each one can rotate to (I did this with a lot of trial and error with my specific hardware setup) and create variables for those. Then put those variables in the minimum_angles and maximum_angles arrays and update the number_of_servos variable to 12. Then you should be good!

pythoncader commented 1 year ago

I added comments in the Arduino servo class file (for routines) on how to implement a setup with more eyes/servos, and support in the python Raspberry Pi PCA9685 class file (also for routines), but without having the hardware I can't do much else. Hope that helps and I wish you luck!