[vc_row][vc_column][vc_column_text]
Sliding Potentiometer is a straight slide Potentiometer in Liner series.The resistor body resistance stability.[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Parts list” tab_id=”1393407794-1-55″][vc_column_text]1. one pcDuino
2.one base shield
3. one linker cab20cm
4. one sliding potentionmeter[/vc_column_text][/vc_tab][vc_tab title=”Wiring diagram” tab_id=”1393407794-2-54″][vc_column_text]
Connect the straight sliding potentiometer and base shield together by Linker cab A2. Base shield inserted put into the pcduino, supply power for pcDuino, thus completing the assembly.[/vc_column_text][/vc_tab][vc_tab title=”Program code” tab_id=”1393408011213-2-7″][vc_column_text]
#include <core.h> int slider_pin = A2; int slider_data = 0; void setup (){ Serial.begin (9600); pinMode (slider_pin, INPUT); } void loop (){ slider_data = analogRead (slider_pin); printf ("%d\n", slider_data); delay(300); }
[/vc_column_text][/vc_tab][vc_tab title=”Experimental result” tab_id=”1393408044138-3-10″][vc_column_text]Open the serial port tools, potentiometer from OUT (GND) terminal sliding into OUT(VCC) readout A2 pin value, as shown in below pictrue:
Comments are closed.