Through-hole rotary potentiometer with three terminals: both ends of the resistive track plus the wiper (middle pin). Common European **B** taper is approximately linear. Typical total resistances: 500Ω, 1kΩ, 5kΩ, 10kΩ, 20kΩ, 50kΩ, 100kΩ, 250kΩ, 500kΩ, 1MΩ. Use for volume, contrast, analog input dividers, and trim. **Pins:** CCW = one track end, WIPER = slider (connect to ADC or output), CW = other track end — viewed from the front with shaft pointing at you, pins usually face you (order may vary by manufacturer; match your physical part).
| Pin | Signal | Description |
|---|---|---|
CCW |
reference | Counter-clockwise end of the resistive track; connect to one side of the voltage/signal range |
WIPER |
analog | Variable slider output; connect to ADC or circuit node to read the adjusted voltage/resistance |
CW |
reference | Clockwise end of the resistive track; connect to the other side of the voltage/signal range |
3-pin through-hole pot. Use componentId potentiometer-linear and put the **total resistance** in the label (e.g. "10kΩ", "100kΩ"). Standard pin names in diagrams: **CCW** (counter-clockwise end of track), **WIPER** (middle / slider), **CW** (clockwise end). Connect CCW↔CW across reference and GND (or signal range), take output from WIPER. Do not exceed pot power rating; as a voltage divider from 5V, current through the track is V/R_total.
| From | To | Wire |
|---|---|---|
board:5V |
x1:CCW |
red |
board:GND |
x1:CW |
black |
board:A0 |
x1:WIPER |
green |
This example was written and compile-checked for the arduino-uno. Codey Online adapts it to any other supported board for you.
// Linear Potentiometer (3-pin) example
// Reads the pot on A0 and prints the raw ADC value and voltage.
const int potPin = A0;
const float vRef = 5.0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(potPin);
float voltage = sensorValue * (vRef / 1023.0);
Serial.print("ADC: ");
Serial.print(sensorValue);
Serial.print(" Voltage: ");
Serial.print(voltage, 2);
Serial.println(" V");
delay(200);
}
Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.
Start for free