<< return to Pixycam.com

Using pixy data to control servos via arduino mega

Hi
Apologies in advance for my naivety.
I am hoping to use pixy to track a dot (pixy is static) then use that data to control a servo motor, through an arduino mega, which is attached via the icsp port to the pixy.
Is anybody able to offer some sample code that they might have written?
I have used the arduino system for stepper motors before and motion control units for stop motion films, however I have never had to write code before, im quite apt when it comes to building systems mechanically, but really fall down when it comes to the software programming
thanks in for any help

Hi Russell,

You may have some trouble getting someone to write up this code for you. Not all of it is trivial. If you have any questions about using Pixy specifically I’d be happy to help with that.

Scott

HI Russell,

I was looking at a few YouTube videos of Pixycam5 examples running small robot-wheeled devices… a few of the creators have made their code public. check them out or better still

Here’s a link…

This is a free example on the Adafruit website

** The actual code is on the last page of the tutorial…

note: I’m having a hard time trying to find the right Arduino port… under Tools > Serial Port … all I see are BlueTooth ports :frowning: any thoughts

Also check out the detailed explanation of how Pixy & Arduino Robot operate here

[[https://learn.adafruit.com/pixy-pet-robot-color-vision-follower-using-pixycam/pixy-pet-code]]

Sorry for the delay in reply.
thanks for these links, they look really helpful
cheers
russell