hi,
recently i received my pixy and i want to hook it with my robot using atmega64 i2c communication.
but i have problem figuring out what to do.
this is my Getword function:(my pixy address is 0xD0)
int GetWord(){
unsigned char byte1=0;
unsigned char byte2;
int word;
i2c_start();
i2c_write(0xD1);
byte1=i2c_read(0);
byte2=i2c_read(0);
i2c_stop();
word= byte2*256 + byte1;
return word;
}
but it only returns 255
tanks for your help;