<< return to Pixycam.com

Line follower using Arduino Uno and L298N motor driver

Hi,
I am using Pixy2 along with Arduino to build a Line Following robot.
I want to use PID control algorithm to control the speeds of the two DC motors.
The input to the PID will be x1 co-ordinate from the vector and I want output to be pwm to control speed of motors.
I am not able to figure code to correctly follow line using Pixy.
Any suggestion would be greatly appreciated.
Thanks.

Hello,
This example is in the Pixy2 Arduino examples (line_zumo_demo):

It follows a line using PID control

Hope this helps!

Edward

Hi
Thanks
But since I am using different motor driver and dc gear motors I am unable to implement the same code.
Any help with the code would be much appreciated.