I want to know the digital value from a potentiometer supplying an analog signal. This is the code that I am using but I cannot see any digital value anywhere when I move the potentiometer. Can some one help?
Thanks
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
delay(10);
}
system
October 18, 2017, 5:48pm
2
Can some one help?
Without know what is connected to the Arduino and how? No.
Apart from anything else I think that you are confusing analogue and digital data.
Digital implies a value of 0 or 1 which you will not get from a normal potentiometer
DrAzzy
October 18, 2017, 7:07pm
5
UKHeliBob:
Apart from anything else I think that you are confusing analogue and digital data.
Digital implies a value of 0 or 1 which you will not get from a normal potentiometer
Indeed - treating it as a digital input is essentially an investigation into the pin input behavior of the '328p...