How to build a Follow me Robot/car (Searching for help)

Hey guys!
(Sorry for my bad english)

I have for a long time wanted to build a “Follow me” car but I can’t crack the code on how to build, so now I’m here asking for someone wanted to help me, or actually teach how to do it, starting from scratch.

The components I have is:
l298n
Arduino mega 2560
Adafruit Adxl 326
NEO-7m-0-000

Your help will really be appreciated!

You have selected a challenging project. Spend some time googling "arduino follow me" and learn about the difficulties.

You want your robot to follow you.
To do this it needs to know what direction it needs to follow to get to you and know the distance to you (so it does not run you over).
Both of these calculations can be found if the robot knows where it is, knows where you are and what direction it is currently pointing.

Is the GPS in your parts list a single item? Or will you have 2? One for the robot and one for you?
How will your GPS communicate with the robot to let it know where you are?
Is the accuracy of GPS location services accurate enough for your robot?

Look https://create.arduino.cc/projecthub/DANNY003/bluetooth-controlled-car-with-arduino-mega-616a4f#widget-comments

Why are you using a GPSs, do you think it will give a position accuracy good enough to be useable ?

This is also not a straight forward project, but unless you can find a written up project on the Internet, you might have to wait a long time for the volunteers in these forums to write a custom tutorial for you from 'scratch'

i haven't build anything like that yet...

however, my approach would be using a PIXY cam, which already has build in recognition software.
difficulties here: a small robot will not be able to see you from head to toe when its close and will lose the "track" of you.
workaround: "teach" it to follow a different object. (tennis-ball, a distinct sticker on your shoe or something like that)

get the objects position in pixels in the field of view of the cam, calculate the angle based on the position relative to the frames center.
for distance control, two options:
use a distance sensor (like the ultrasound module) or install the cam a bit elevated and use the objects position again (this time the "height" in the frame" to get the depression and calculate the distance from there.

but again, with the pixy cam it will not be able to follow YOU, but it could follow smaller objects.

maybe that helps.

for the math of that, keep in mind, that you will measure the Cams height, cam line of sight must be parallel to the ground and the forward axis of the car. if its not parallel you will not get accurate distance results, especially if the cams elevation is not very high you will get a huge change for small changes in the degrees.
same might also apply during acceleration / deceleration of the car.... so just have a couple of test runs with it.

for the distance calculation i recommend to have the cam in a position above the object to follow so you can actually get a depression downwards. if the center of the cam is at the objects center you can not use angles for it.
in that case you would need to use the object height and width in pixels to get the size and the angles to get the distance.

its maybe not the best or smartest solution, but thats what came to my mind for this project.