DC motor speed and direction controling with buttons and pot meter

Hello for all,

I am working on a project and I need some help because I am a beginner in arduino.

The main idea is simple: Controlling a Dc motor (6-9v geared motor) with Arduino Uno + L298 H bridge

It's a basic controlling of the DC motor, these are the functions what I need:
(I've attached the control panel image)

  • direction switch: which controls the direction of the motor
  • program start push button: which starts a program of turning the motor for example 10 sec. and after 10 sec. stops.
  • loop start push button: which starts the motor, and the motor continuously running until the stop button is pressed
  • stop button: which stops the motor if pressed
  • Potentiometer 10k ohm: Speed controller of the motor

Can I do this with Arduino?
Can anybody help me writing the code? Any help is well appreciated. :slight_smile:

p.s. Or another great thing would be to do this wirelessly with a bluetooth or wifi shield and a smartphone app. Can anybody tried something like this?

Thank you!

Can I do this with Arduino?

Yes.

Can anybody help me writing the code?

void setup()
{
}

void loop()
{
}

Now, all you need to do is fill in the empty braces and add a few global variables.

Or another great thing would be to do this wirelessly with a bluetooth or wifi shield and a smartphone app.

I've just about given some thought to maybe someday planning to sign up for swimming lessons. I plan to swim the English channel in record time.

Yeah, right.

:slight_smile: thanks!