[vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Introduction” tab_id=”1393830658-1-50″][vc_column_text]Potentiometer module using a rotary potentiometer, potentiometer knob that can be changed to adjust the potentiometer resistance.
[/vc_column_text][/vc_tab][vc_tab title=”Hardware List and Wiring Diagram” tab_id=”1393830658-2-18″][vc_column_text]Hardware list
[bigcommerce link=”/arduino-uno-compatible-usb-board-r3/” target=”_blank”]Arduino UNO[/bigcommerce] *1
Male to Female Dupont Line *3
Wiring Diagram as shown:
[/vc_column_text][/vc_tab][vc_tab title=”Test Code” tab_id=”1393835490891-2-6″][vc_column_text]
int sensorPin = A0; int ledPin = 13; int sensorValue = 0; void setup() { pinMode(ledPin, OUTPUT); Serial.begin(115200); } void loop() { sensorValue = analogRead(sensorPin); Serial.println(sensorValue); //Serial.write(sensorValue); digitalWrite(ledPin, HIGH); delay(100); digitalWrite(ledPin, LOW); delay(100); }
[/vc_column_text][/vc_tab][vc_tab title=”Test result” tab_id=”1393835562783-3-6″][vc_column_text]By adjust Rotary Potentiometer‘s knob, we can see Arduino A0’s value changed, as shown
Leave a Reply
You must be logged in to post a comment.