
Product Introduction #
Application reference: Volume regulators, fan speed regulators, brightness regulators, etc., in scenarios where the parameters of the output module need to be changed.
Parameter Specification #
| Parameters | Value/Description |
|---|---|
| Operating voltage | 3.3V~5V |
| Operating temperature | -10°C~+50°C |
| Output signal | Analog signal |
| Size | 3.16cm*2.38cm |

Wiring Diagram #
Note:Expansion board is attached to esp32 controller board.

| Potentiometer Module | ESP32 |
|---|---|
| VCC | 5V |
| GND | GND |
| Sign | Pin 36 |
Sample Code #
#define Potentiometer_Pin 36 // Potentiometer middle pin connected to GPIO36 (ADC) void setup() {
Serial.begin(115200); pinMode(Potentiometer_Pin, INPUT);
}
void loop() {
int potValue = analogRead(Potentiometer_Pin); // 0 ~ 4095 Serial.print("Potentiometer value = ");
Serial.println(potValue); delay(200);
}
Test Results #
After uploading the code to the controller board, open the serial port monitor of the Arduino IDE, set the baud rate to 115200, and switch to the scroll mode.
When we turn the knob, we will find that the value on the serial port changes within the range of 0 to 4095.

