hello,
I am absoloute dummy in electrical circuits, so please can you help me with my project?
My idea is circuit with two electromotors and button.
After 1st button press I need:
Motor 1 spins into certain position
After that motor 2 spins into certain position
After that motor 1 spin back to start position
Done
After 2nd button press I need:
Motor 1 spins Into certain position
After that motor 2 spin back into start position After that motor 1 spin back to start position
Done
Afrer this another button press acts like 1st and another 2nd again, again... Any idea?
How to make this idea real ? I 'd use some gearbox but it is not possible for this project
More info:
I have little doors (plastic cover) that I want to connect to motor no.1 and little screen to pop up thats connected to motor n.2
So I want to push button
door opens
screen slides out
door closes
and another button press
door opens
screen slides back
door closes
I thought to use arduino micro(I need as small as possible) and some cheap rc servo
cross95:
Don't have arduino here yet:(, I've oreded it last week so I don't have code to show
The Arduino IDE includes a lot of examples. Make sure you work through the examples about using buttons. These should help.
You'll want to use a variable to keep track of button presses.
You'll find people more willing to help if you've tried to write the code yourself first. As Delta_G and I mentioned earlier, if you get stuck and need help, post your code and there will be plenty of people willing to help.
In effect, you have two processes. One reads the buttons and stores a value representing which button was pressed. The other process moves the servos according to the saved value. It may also reset the value when it is finished. The saved value is the only point of communication between the two processes.
That power supply should be fine. However you should not power the servos through the Arduino - they should be powered directly from the power unit. That means getting a cable to split one of the outputs in two so you have one output for the phone, one for the Arduino and one for the servos.