redpeppery
Member
Hello,
Please help me to read from a Spectra Symbol Position Sensors HotPot.
I connect the Pins to 3.3 V, AGND, and PIN 23. I use the code below for reading, but I get constant reading some random values from 0 to 250 even if I don't touch the sensor. Can you advise me what should I do to stop that.
Thanks
int softpotPin = 23; //analog pin 0
void setup() {
digitalWrite(softpotPin, HIGH); //enable pullup resistor
Serial.begin(9600);
delay(2000);
}
void loop() {
int softpotReading = analogRead(softpotPin);
Serial.println(softpotReading);
delay(250); //just here to slow down the output for easier reading
}
Please help me to read from a Spectra Symbol Position Sensors HotPot.
I connect the Pins to 3.3 V, AGND, and PIN 23. I use the code below for reading, but I get constant reading some random values from 0 to 250 even if I don't touch the sensor. Can you advise me what should I do to stop that.
Thanks
int softpotPin = 23; //analog pin 0
void setup() {
digitalWrite(softpotPin, HIGH); //enable pullup resistor
Serial.begin(9600);
delay(2000);
}
void loop() {
int softpotReading = analogRead(softpotPin);
Serial.println(softpotReading);
delay(250); //just here to slow down the output for easier reading
}