Robot Car – 4WD

ROBO CAR – Sort Of

Since I have been playing with Arduino and other electronics I have always wanted to make a line following robot but once I look at all the parts and the complexities I usually give up and make some LED’s flash. I was having a look  on AliExpress and noticed this cheap plastic 4wd car kit. 4 weeks later and it was delivered and now the fun starts.

I decided rather than trying to recreate the mars rover I would start small and build upon what I learn.

First Step – Construction

Pretty easy – took longer to get the protective paper off than it did to construct. Very fiddly with 3mm screws but i’m sort of getting used to it.

 

car2 car1

 

Once the basic shell was complete I added an Arduino Mega with an old motor shield 4 x AA batteries and a Toggle Push Button that is it.

 

Second Step – Make it Move

I am using the adafruit library which is included here motorshield and I started with the demo program.

Yep just as expected wheel no 4 started turning.

Next was to get all motors forward and back to test all the wiring is correct.

And again it moves forward and backwards – I did find that it drifts slightly left meaning I will have to tweak the left wheels and reduce the speed.

 

Third Step – Refine Code & Turning

 

Now I have set up my motor control functions its time to add some control.

And the working Line Following Code