Path-following car in a loop- need advice

Hello everyone. Kind of newbie here.

I am an art student and for a project I would like to have a moving car that drives on a designated path over and over again, so in a loop. One of the important things is that I want to change speeds during the path. So for example one meter very slow and then one meter a little bit faster, etc. Also the car will drive on relatively smooth concrete.

I have this elegoo car : https://www.amazon.com/ELEGOO-Tracking-Intelligent-Educational-Compatible/dp/B08FLBBBZL

It is pre-programmed as a smart car and has line following abilities. The line following ability at least makes it so that the car doesn’t « lose itself », but can you program the car so that it follows the line + has different speeds ?

The original program is very complex. Writing the program from scratch seems quite complex but also it would allow for a more precise control.

I am looking for some advice and opinions on how to go about doing that. What would be the most efficient way? Maybe I haven’t thought about everything but I hope I was clear in my question.

Thank you so much to anyone who can help me.

Since there’s apparently an UNO controlling it it would make sense that the thing is programmable.  The first thing you need to know is whether there are any uncommitted I/O pins you can use.  And how many, since there are different possibilities for sensing a speed change signal.  And which ones because different pins have different capabilities.

How many different speeds are needed?

Hi,
Have you got a copy of the code that is already in the robot?

Thanks… Tom… :grinning: :+1: :coffee: :australia:

Hi,
Here you can download the entire code : http://69.195.111.207/tutorial-download/?t=RobotCarV4.0
Thank you!

The pre programme code uses 97% of the uno memory. I don’t know if it’s possible to program on top of that? Also I’m wondering is it possible to “isolate” bits of codes?
I’m thinking 4 different speeds.

I had a quick look

you can grab it from elegoo’s web site

the code is pretty large and based on modes where speed is controlled in different ways. There is a follow and track mode I’m not to sure which is which (line following or line tracking ?)

most of the code is useless if you use one mode only, so memory should not be an issue but this requires to understand a lot of what’s going on…

Line following is track mode I think.
Yes exactly but unfortunately I am not good enough to really isolate what I need…

Actually looking a bit more at the kit, they also have code that is just doing line tracking and an explanatory PDF

did you look at that?