hey,
is anyone experienced in programming the Pixy Cam with gpp C/C++ (possibly in Geany IDE)?
which interface ist most easy to use?
SPI, UART, or I2C? (the standard 6-pin header cable just supports SPI, at least for Arduinos, IIRC)
https://github.com/charmedlabs/pixy/blo ... ude/pixy.hdavenull wrote:I saw that a Raspi build uses USB, but I don't see a C lib for that.
Code: Select all
/*
06.04.2014 v0.1.3 John Leimon
+ Now using pixy.init() to initialize Pixy in setup().
*/
#include <SPI.h>
#include <Pixy.h>
Pixy pixy;
void setup()
{
Serial.begin(9600);
Serial.print("Starting...\n");
pixy.init();
}
void loop()
{
static int i = 0;
int j;
uint16_t blocks;
char buf[32];
blocks = pixy.getBlocks();
if (blocks)
{
i++;
if (i%50==0)
{
sprintf(buf, "Detected %d:\n", blocks);
Serial.print(buf);
for (j=0; j<blocks; j++)
{
sprintf(buf, " block %d: ", j);
Serial.print(buf);
pixy.blocks[j].print();
}
}
}
}

viewtopic.php?f=63&t=86750#p846085I got the python code for pixy camera to work, just followed the steps in the link
http://cmucam.org/projects/cmucam5/wiki ... e_on_Linux .
If the Python code works, then the reference C examples are likely to.PixyCamera is really an awesome board and it made image processing quite easy , I got it working by following this tutorial , quite impressive .... http://www.theengineeringprojects.com/2 ... amera.html
