<< return to Pixycam.com

Tpixy.h

Hi I receive my wonder set of pixy. I would say at this eary stage of the product, I manage to get most of the things running well. I am impressed at the ease of use.

Now I m try to get servo data from arduino. But the program did not work.

  1. Is Tpixy.h use for pantilt.ino ? compiler only show "starting … "
    is there a need to include “# include Tpixy.h” .

  2. Is there other sample programs to access servo data?

Hi Jack,

To use the Pixy library in an Arduino sketch all you need to import is @#include <Pixy.h>@, so pantilt.ino has all the import statements it needs.

Are you just looking for the position of each servo? You can’t get this data from Pixy because you don’t need to. You can easily just track the last set position of each servo motor within your code.

If you’re getting the “Starting…” message from the serial console then it sounds like the program is working. You just need to train Pixy on an object, and then place that object in front of the camera to get it to spit out more messages about what it sees.

Scott

Hi,
I managed to get it working. I realised that I cannot download ( compile ad run) Arduino when it is connected to Pixy5 using SPI. Now I am trying to grab the servo data.

In actual fact, I am trying to connect to other contoller board ( not arduino), but the I/O is limiting it.
while trying to do this, I also fix externl lighing to reduce “false positve”.

Can I ask you, how do I activate “Mode 3” or " Mode 4 " ?

“Mode 3 outputs the x value of the center of the biggest detected object to pin 3 of the I/O connector. Mode 4 outputs the y value of the biggest detected object to pin 3 of the I/O connector. Pin 1 goes high (3.3V) when an object is detected, and low (0V) when no object is detected.”

Hi Jack,

You can set Pixy to mode 3 or 4 using the Config dialog in Pixymon (the gear icon). In that dialog you’ll see the “Data out port” parameter, which is the mode you are referring to.

Good luck!

Scott