Hi Guys,
I want to test a potentimeter in Arduino, however it isn't giving me accurate results.
The teensy shows that from the 5v pin, only 0.16v is being outputted. And when I measure the pot,
it begins at 15 and ends up somewhere jumping around 300-400.
The pot is brand new and I have wired things up correctly.
This is the code used:
I want to test a potentimeter in Arduino, however it isn't giving me accurate results.
The teensy shows that from the 5v pin, only 0.16v is being outputted. And when I measure the pot,
it begins at 15 and ends up somewhere jumping around 300-400.
The pot is brand new and I have wired things up correctly.
This is the code used:
Code:
int Switch = A0;
void setup(){
Serial.begin(9600);
pinMode(Switch, INPUT_PULLUP);
}
void loop(){
int analog = analogRead(Switch);
delay(100);
Serial.println(analog);
}