<< return to Pixycam.com

Pixy2 ZumoMotor codes to other motordrivers

In pixy 2 Line_zumo_demo code, the motor driver used is ZumoMotor driver. Is the line Zumo demo code can be use to other motor driver like L298N?

Hello Daniel,
There isn’t anything preventing you from using a different base or motor driver. You’ll need to modify the sketches we provide however (e.g. line_zumo_demo)

Edward

Hello Edward,
We are currently using AFmotor library with a different motor driver because zumo isn’t available.I hope that you may give us suggestion or advice in connecting pixy2 to our driver.

Daniel

Hello Edward,
We are currently using AFmotor library with a different motor driver because zumo isn’t available.I hope that you may give us suggestion or advice in

Hello Daniel,
I haven’t used the afmotor library/hardware, but it looks capable. Can you be more specific about the type of suggestion/advice are you looking for?

Edward

Hello Edward,
In the line_zumo_demo code, how to make the turn in the intersection without using barcodes.

Daniel

The code at line 132:

 if (pixy.line.barcodes->m_code==0)
  pixy.line.setNextTurn(90); // 90 degrees is a 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 

you can set the next turn to whatever you want by calling pixy.line.setNextTurn().

Here is the API that describes more, such as what setNextTurn does:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:line_api

Edward

Good Day Edward,

How to make the vector change direction your desire direction

thanks,
Daniel

Hello Daniel,
I’m not understanding your question. What are you trying to do? Please help me out by explaining.

Edward