L298N

A while ago I talked about making a Raspberry Pi Controlled car.  Don’t worry.  I did not forget.  Actually, I started yesterday writing some code to get the DC motor running.  What I need to get this working from a functional point of view is a Motor Controller which is a L298N in this case and of course the Raspberry Pi whom who is the microcontroller.  I have put a wheel on the DC Motor to make more clear where I am going to.  I also need a powersupply (4 AA batteries in a parallel holder) connected to the Motor Controller.  After some time I finally got it to work.  Felt great to see the wheel turning in both directions.  All done with some simple instructions.  The most difficult thing was wiring everything up so to speak.  The programming effort was very limited, just a couple of lines to get this to work.  Very easy.  Just setting some pins low or high and done …  Far more easy than the I2C instructions.

Once I have cleaned up my code, I will put it on Github.

l298n

Jan

Leave a Reply