Go Down

Topic: Using variable resistors to control value (Read 173 times) previous topic - next topic

joshbailz

Hi,
    I am looking at creating a piece of code that can be changed by a variable resistor.......
So I am looking at some code along the line of

Channel 1, c1value
Channel 2, c2value
Channel 3, c3 value

I want the potentiometer to change the value of c1value, c2 value and c3 value from 0-255 how would I go about implementing this code?
Thanks
Josh

UKHeliBob

One channel first.
Connect one end of the variable resistor to 5V, the other end to GND and the wiper to analogue pin 0 then load the AnalogInput example sketch in the IDE and examine how it works by printing the variables.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.


Go Up