Hello.
I am a student who studying Robotics.
I studied how to output the data using potentiometer.
In that way, potentiometer was analog input and led Pin was analog output.
So I can transfer the data using 'map()' function.
BUT, I have to transfer the data to DIGITAL OUTPUT.
My professor said "DO NOT using map(), you should set the benchmark!".
That word contains like 't..'.
I searched like this keywords 'arduino potentiometer digital output', 'potentiometer digitalWrite'.
But I can't found the answer.
Are you looking for something like Fig-1; where, you rotate the Pot to change the DC voltagw at A0-pin; as a result, the states of the LEDs (LED0 - LED9) chnage?
Digital Output I meant was binary data (HIGH or LOW)
I have to receive analog input using potentiometer, and and turn the led(ON /OFF) depending on the analog input value(received from potetiometer)
threshold! That's what I look for...
Thank you...
I think I misused the word 'convert' to 'transfer'.
That phrase just means "I have to convert analog Input(potentiometer) to digital Output(ledPin)".
I solved this problem using the keyword 'threshold' (what you tell me!).
Thank you very much