32 responses to “Pixy CmuCam5”

  1. Michael

    Hi Bajdi, very useful post. Have you been able to pair your pixy 5 with an arduino due board? If you have could you please give me some help with it. I keep getting errors.

    Thanks loads.

  2. jeveda12

    Hello sir, I am glad I found your site, I have a pixy too but i did not know what else to with it beside pan and till that`s the only thing they show to do on their website. I want to ask you about your code, do you load this into arduino or to pixy board, and where do you connect the motors and servos, can you post a schematic with the wiring, I have one o those arduino cars like yours with H bridge.thank you so much.

  3. jeveda12

    sorry to bother you again
    I would like to know which is the pin out because my arduino uno does not have pin 14 or 15

    const int EN1 = 3; //pwm, enable motor 1 = pin 1 of L293D
    const int direction1 = 13; //direcion motor 1 = pin 2 of L293D
    const int EN2 = 14; //pwm, enable motor 2 = pin 9 of L293D
    const int direction2 = 15; //direction motor 2 = pin 15 of L293D
    thank you.

  4. jeveda12

    thank you so much for your help
    where did you bought you encoder motors, my arduino car came whit the encoder wheels but no sensor,

  5. jeveda12

    I`m waiting for encoders, thank you. I hope it will work, I will let you know.

  6. jeveda12

    hello again
    just to let you know that my robot did not work,I can hear the servos trying to start, I change pins like for servos used 9 and 6 pwm
    encoders to 10 and 11
    EN1 3 EN2 5 pwm
    derection 8 and 4
    to my settings are
    arduino car from ebay
    arduino uno. microcontroller
    L298n dual motor driver from ebay this is the link


    can you please help.
    thank you

  7. J

    I just want to let you know that i will post a video soon about my build, got it to follow objects and run motors,i`m working on slowing motor down they running to fast. Bad guys broke in to my house and still my laptop that`s why it took long to build robot, thank you for the code. change microcontroller to arduino mega because it has more pins.

  8. ahmad

    hello, how to get pixy library into arduino programmer?

  9. loli

    Hello and good work. I try to use your sketch on my own robot and i have a question about the line “const int motorTime = 100;” why 100? I also supose that “lpuse” and “rpulse” variables are not necessary since they do not appear in the main loop. So I can delete these variables in ISR, right?

  10. loli

    In fact i did.Ok for ltime and rtime but lpulse and rpulse are set in the interrupts but are used nowhere else so what are they for. Do not take it for a critique just want to be sure to understand.

  11. ahmad

    hello, i want to ask your favor. i have been exploring this pixy to be a sensor camera for my project which is multiple lines tracking robot. what is your opinion for pixy to detecting the line. is it the pixy can detect other than object? please i hope you can give some suggestion or opinion for this kind of problem what i supposed to do

  12. kafchis

    hey i have a similar project, i am supposed to design and prototype a colour tracking robot with obstacle avoidance.. i would love to see your circuit for that robot.

  13. Corey P

    I’m learning Pixy for a school project. This post has been super informative. Thanks!
    I have two questions.
    1. Can you give a short explanation of the code lines 78-101? I’m not sure what the pulse is, and why you’re checking it.

    2. If there were two objects of the same color, the pixy has a hard time understanding what to do. I assume with the current code, the bot wouldn’t know where to go. Is it possible, using the pixy, to tell the bot to go toward the left most one or toward right most one?

  14. kafchis

    Hello, can this code work with arduino mega 2560?

  15. agus mas

    admin,,, may I use AVR ATmega 32 to control this sensor?
    thaks before..

  16. kafchis

    will any pan and tilt servo mechanism work?

  17. karthick

    Sir,i have pixy and arduino mega and L293d motor driver and assembled two servo in a bot..do i have to alter anything in the above code?do i have to buy encoder?if so what is the specification for that encoder?do i have to power the two servo separately?
    Please tell me in detail
    Thank You

Leave a Reply