<< return to Pixycam.com

Autonomous Vehicle Follower Vehicle with pixy 2

Hello everyone,
This project is our graduation project hope you like it.
First, two vehicle platforms were prepared. While the leading vehicle is driven using the HC05 Bluetooth module, the vehicle that follows it is designed autonomously. In the autonomous vehicle, the position information of the leader vehicle is obtained with the image processing method using the Pixy2 camera. In addition, by using the HCSR04 ultrasonic distance sensor, it was prevented from crashing both the vehicle in front and other obstacles in the environment. In order for the vehicle to follow, the 3D color object that we used in the leader vehicle was defined with the PixyMon application. By creating a rectangle with the x and y coordinates of the object defined on the Pixy, the data transferred to the Arduino Mega microprocessor is converted into digital signals with the L298N motor driver and sent to the motors, and the autonomous following process is performed.Project video

Hi Jonathan,
Nice work – the motion is very smooth :slight_smile:
Thanks so much for sharing!


1 Like

Hello Jonathan58
I’m a 73 years old italian electronic engineer and I have been approaching the world of Arduino for 2 years. I own a Pixy2 camera and I’ve already made some simple projects with ArduinoUNO .I’d like to use your project as an example to make a similar follower robot for the purpose of entertaining my 4 grandchildren.
Could you give me some more information about IDE code to be uploaded to Arduino board ?
Thank you
Best regards

Hi Jonathan,
If you follow the directions here:

It will describe how to install the Pixy Arduino library. Once you do that, you can bring up several Pixy2 examples from the Arduino IDE from File➜Examples➜Pixy2.

Hope this helps!