<< return to Pixycam.com

Need coding for ADAFRUIT PRODUCTS

I have limited knowledge of the Arduino software

can you please help me that Pixy cam only support Zumo motor shield library?

The following code does not support my Adafruit Motor shield and I have not uploaded full sketch here but I showed unsupported codes only.

Please help me

if (res&LINE_BARCODE)
{
pixy.line.barcodes->print();

if (pixy.line.barcodes->m_code==0){
// code==0 is our left-turn sign
pixy.line.setNextTurn(90); // 90 degrees is a left turn
Left_Turn();
}

// code==5 is our right-turn sign
else if (pixy.line.barcodes->m_code==5){
pixy.line.setNextTurn(-90); // -90 is a right turn
Right_Turn();

void Left_Turn()
{
LHFMotor.run(BACKWARD);
LHFMotor.setSpeed(170);
RHFMotor.run(FORWARD);
RHFMotor.setSpeed(170);

}
void Right_Turn()
{
LHFMotor.run(FORWARD);
LHFMotor.setSpeed(170);
RHFMotor.run(BACKWARD);
RHFMotor.setSpeed(170);

}

Pl[date=2019-11-07 timezone=“Asia/Calcutta”]

Hi, unfortunately we don’t have specific advice for this library, but I found the code reference here:

Are you able to get some motors running using the library? If so, with some trial and error, you should be able to modify the Zumo code.

Hope this helps!

Cheers,
Jesse

Hello,
I know you are looking at bar code examples, but this may help too.
Pixy Zumo Pet Robot

Good luck,
Mr. R^2