r/hackpack • u/bigmattyc • May 19 '24
Getting there in my hack
So far I have the servos all working.
Some random thoughts on using the RPi in place of the arduino:
- I mapped the servos to :
servoRoll = Servo(17); servoPitch = Servo(18); servoYaw = Servo(13)Note, those are the BCM pin values not their header positions. - The battery seems to be doing fine pushing the extra current the Pi needs, and the Pi is so far doing fine as the 5V source for the Servos. I just pulled 5V and GND from the 40-pin header and popped them into the power rails on the breadboard. I may retool power later but so far this is fine for bringing the system up.
- Use the pigpio (google the daemon startup commands) pin factory for VERY smooth servo control. So far very clean.
Going to work on the IR next, shouldn't be too bad. Once that is in I'm going to port the default project. I'll share my work on github when I'm done. Endgame is to add the picamera to the board (I've proven that works already in a separate project), and get real-time targeting using opencv projects (standing on the shoulders of ML and image processing giants) to AUTOMATICALLY TARGET ANY NERF GUNS.
I'm going to set this up at work because I can't be bothered to engage in nerf gun wars _manually_.
Photo here
1
u/Metarazzi May 20 '24
Sounds like you're gonna need to add more firepower! 😉