How to output the data recived from potentiometer with digital output?

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.

Please give me some hints. :frowning:

What do you mean by "transfer the data"?

What are you trying to do?

"threshold"?

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?


Figure-1:

"Digital output" is not well defined... There is serial data, parallel data, etc.

The Analog Read Serial Example reads the pot and sends-out the digital reading to the serial monitor. (This is probably not what he wants.}

Or, you could use an if-statement to turn-on an LED (digital) when the analog input reads greater than 100, etc.

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 :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.