Pan-Tilt and Video Figured Out….

After much trial and error and success with PWM and the neck servos (Hitec), I found I was having problems getting the servos to work together using basic pulse width in the Arduino code. Each servo worked perfectly when singled out, but trying a pan-tilt at the same time caused servos slamming to the ends and losing all coordination. I finally found that downloading the MegaServo library did the trick. It was supposed be included with version 17 of IDE (which I have). Anyway, this library works great! The key is that it will allow all the pins to be used for servos, not just 9 & 10. My Arbotix board stops at 8, so I was out of luck with the default Servo.h library.

I had planned on interfacing a Panasonic CX161 board cam (have one already) to the STPC main board for the vision processing, but that would require a frame-grabber board or a composite vid 2 USB connector. After almost going with that 2nd choice, I remembered I picked up a $12 webcam at Staples around Christmas for goofs – I actually thought I could use it in a project somehow. This choice will cut out the video capture component because it is already built in! I mounted it to the pan-tilt neck assembly and will test interface to the Atlas STPC PC/104 board (with Win2K).