Your idea is simple to do, but we are not going to write it for you. If you want someone to write the code for you, then you need go to Arduino's Gigs and Collaborations
section and pay someone to do it.
However, if you are willing to learn some C based code and follow all the examples the Arduino software provided, then we can help you. But first, you need to try and write a code on your own, and show us that you willing to learn.
If your code does not work, but put some effort into it not just a mish mash of lines, we will look at it and tell you whats wrong and how to go about fixing it.
I will tell you this, you will need to learn about the analogWrite
function, and the corresponding PWM ( ~ ) pins, to get the motor to ramp up in speed. Another thing you will need to buy is a current sensor, like this one HERE
. It should be fairly straight forward, Vcc, Gnd and Data. The Data line should be wired into one of the analog pins A0 - A5 (UNO) or A0 - A15 (MEGA), then with a simple analogRead
of that pin, you should get values based on the current to the motor.
From there, its just IF / Else statements that check the limit switches and button.