When the resistances are reversed, the voltage at the center pin nears 0 volts, or ground. When the resistance between the center and the side connected to 5 volts is close to zero (and the resistance on the other side is close to 10 kilohms), the voltage at the center pin nears 5 volts. This changes the voltage at the center pin. The third goes from the middle pin of the potentiometer to analog input 0.īy turning the shaft of the potentiometer, you change the amount of resistance on either side of the wiper which is connected to the center pin of the potentiometer. The second goes to 5 volts from the other outer pin of the potentiometer. The first goes to ground from one of the outer pins of the potentiometer. Hardware RequiredĬonnect the three wires from the potentiometer to your board. This example shows you how to read an analog input on analog pin 0, convert the values from analogRead() into voltage, and print it out to the serial monitor of the Arduino Software (IDE). Tutorials > Examples > Basics > ReadAnalogVoltage
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |