Hello Arduino.cc peoples,
I have built a flight sim throttle using a potentiometer, but I found that it was very lacking because it required discrete states to switch between. By reading a few posts on here, I discovered I needed a rotary switch pot, so I found and bought these:
void setup() {
Serial.begin(9600);
pinMode(A2, INPUT);
}
void loop() {
auto var = analogRead(A2);
Serial.println(var);
delay(100);
}
I connected wiper to pin A2, CCW to 5V and CW to ground. I am using an Arduino nano.
Now my issue is when I wire it up and try to get a simple output from it, I am only getting 0 as output. What could have went wrong?
@Paul_KD7HB I'm trying to test the circuit using a ohmmeter. Unfortunately, my meter has a screw stuck in there. Will test once that issue is resolved. @J-M-L I've double checked my soldering and I still think it looks alright. But i'm biased and still and newbie in soldering. I can post an image (or a bunch) if it would help narrow it down. @dougp the baud rate is not the issue. I suspected that and is set properly.
Position your camera to Take the picture from a distance and touch the screen (if on a smartphone) to set the focus point. You can resize the picture later to remove the unwanted background and the piece will be in focus
We don't want the divider to consume too much current, so we want the overall series resistance to be reasonably high. Using 10KΩ resistors gives us 90KΩ total. It will draw a modest 55 µA from 5V.
Ah, I missed that. And I suppose it's fair enough. Mismatching the impedance will potentially produce more noise/error in the ADC reading, but here, only one of 10 distinct values is expected anyway. The gaps between those values will be about 100, so the additional noise won't really be a problem. My apologies to Adafruit!
Hi, @icefreezer7
To check your board.
With it not connected to anything.
Put you DMM on OHMs and measure between CCW and CW, you should measure 90K Ohms.
Then measure resistance between CWW and W, start the control fully CCW and note the resistance readings for each position.
Can you post some images of your project?
So we can see your component layout.