Rotary potentiometers are a type of variable resistance that allows you to adjust the resistance and therefore, the voltage. They are used in several applications, such as adjusting audio volume or light brightness.
In this tutorial, we will use the Arduino to display the potentiometer values in percentage and display them on your computer.
Connect the wires between the potentiometer and the Arduino, as shown in the image below.
Connections from the Rotary potentiometer to the Arduino:
• potentiometer GND pin → Arduino GND pin
• potentiometer out pin → Arduino A0 pin
• potentiometer VCC pin → Arduino 5V pin
Now access the serial monitor on your Arduino IDE by clicking on the magnifying glass icon at the top right corner.
Now, as we see in the following image, the serial monitor displays the potentiometer values in percentage. You can change the resistance value by rotating it and see the new outcome right away on your computer.