Being couraged by the " there is no stupid question " thing, I!m asking this clever :) question.
I want to control two dc motors. First of all I want to press a button several times (ex. 5 times). After completing the counted press session I will press a second button and the first DC motor will begin to rotate. It will resume rotating for 5 seconds (time differs lineerly by the input press counts, ex. 5 press - 5 sec., 7 press - 7 sec., 23 press - 23 sec. etc. ) and after that it shall stop. After one second ( constant value ) the 2nd dc motor will rotate for two seconds (const.). After the 2nd dc stops there will be 1 second break and the 1st dc motor will again work for 5 seconds without entering value again. And after that the same process will go on again and again... Until a third button is pressed the working should continue.
- the dc motors will always run at max. speed and just one rotation. So May I use just transistors to run these motors?
- what is the scheme of this project?
- what is the code?
:) I know I want so much. But I know again, it's so simple for most of you. I will be pleased If you help me
Yes I mean schematic. Power supply will be a PC psu, which will be enough for two 0,5 A - 12 V dc motors. I think I had taken them from an old fax mach. or something else.
Button type is a simple button that gets contacts “close” when you press and “open” when you leave. But I’m sure there will be parasites , so the code should prevent the pic miscount one press as many presses.
The PIC32 starter kit you bought should have a series of examples and tutorials included on the CD, I suggest you try those out and become familiar with the hardware. Even if someone writes the code for you, it’ll be hard to figure out how to add the code to your PIC micro without knowing how to use the programmer and Microchip IDE tools.
Do you have any experience with any kind of programming? There are a few different choices for programming that PIC micro, it’s probably a good idea to start with one that’s similar to any languages you might have used before.
Regarding your button, you Regarding your button, you can take either a hardware or software approach to ensure you only get one trigger event for each button push. Search for "debounce" circuits and progamming examples.
thanks Thanks again, I will read some examples and try to make one again. But it seems worthless, because its too complicated. And I am just at the first point of beginning thanks anyway