Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

XRAD'S Demon Eyes Game
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

XRAD'S Demon Eyes Game

by XRAD on Sun Aug 09, 2020 2:47 pm

Back with another project, in progress of course. Combined Pixy2 cam motion tracking with Uncanny eyes and adafruits PCA9685 I2C servo board. Basically, I substituted the joystick sensor for the pixy2 x/y outputs and then mapped this to both the servos and the eye positions. Works great. Processor: teensy 3.2.

BUT, when cam is mounted on the robot arm, the X/Y position error causes the servos to overcompensate while using I2C. The issue is that in I2C mode, one can't adjust the servo output on the pixy2 like you can in the onboard pan/tilt demo, but the tracking in this mode is smooth. Also, when I use the onboard pan/tilt control, then I do not have access to 'auto-centering' which I need for the build.

I could use SPI, but I already have two eyes on SPI and display tracking is sensitive to changes in SPI. I could use some kind of smoothing program just for the servo calculations, which I will try next. Maybe give some broad boundaries to the X/Y positions. I did try some of the pixy2 compensation algorithms, but it caused the servos to go wacky....

anyway, more to come:
https://www.youtube.com/watch?v=Damnaz-6r0w

IMG_0421.JPG
IMG_0421.JPG (350.27 KiB) Viewed 23 times

XRAD
 
Posts: 585
Joined: Sat Nov 19, 2016 3:28 pm

Please be positive and constructive with your questions and comments.