I want create a program with following chart :
how this program?
I want create a program with following chart :
how this program?
I don't understand what the three inputs are.
that is potensiometer as analog input, can you help me?
Have you made any attempt to write a program?
Look at the demo several things at a time which illustrates how to manage time using millis() - so you can keep track of the values of the 3 pots at the same time. The Thread planning and implementing a program may also be useful.
The specific techniques for reading the ADC and setting a PWM value are in the examples that come with the Arduino IDE.
You need to be aware that when you switch from reading one ADC pin to another you should discard the first reading from the new pin - this is explained in the Atmega 328 datasheet.
Basically you need something to start the 4 second timing process and then repeatedly test the ADC inputs for the appropriate values. If any of them fails the test either abort or restart the timing.
I think you need to consider the logic of your process in more detail - how it is started and what to do if the test fails.
...R
if potensiometer 1 == 255 (adc value) and pot2 == 10 and pot3 == 10 during 4 second so microcontroller output is pwm 10%, How this program?
thanks for your help
Hi, what do you want to have happen if the input values are not 255, 10 and 20?
What do the values represent and what are you using the 10% PWM for?
Tom......
Ruhandi:
if potensiometer 1 == 255 (adc value) and pot2 == 10 and pot3 == 10 during 4 second so microcontroller output is pwm 10%, How this program?
thanks for your help
This seems to be identical to your first Post.
You don't seem to have bothered to read my Reply #3
If there is something in my reply that you don't understand, please let me know.
...R
The inputs should be EXACTLY 10, 10 and 255. I doubt that's going to happen.