<< return to Pixycam.com

Pixy2 ZumoMotor codes to other motordrivers


#1

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?


#2

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


#3

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


#4

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


#5

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


#6

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

Daniel


#7

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


#8

Good Day Edward,

How to make the vector change direction your desire direction

thanks,
Daniel


#10

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

Edward