Home > Arduino & SCM Supplies > Geeetech
This potentiometer module is a simple knob that provides a variable resistance£¬ which we can read into the arduino board an analog value. By turning the shaft of the potentiometer£¬ we change the input signal to analog pin. Building interactive wok is as easy as pilling bricks£¬ just plug it to our arduino sensor shield with a cable£¬ and make it looks professional and neat. Free cable is included. Demo Code int pot Pin = 4; // pin for potentiometer int led Pin = 13; // pin for LED int val = 0; void setup {pin Mode(ledPin£¬ OUTPUT); // state led Pin as an OUTPUT} void loop() {val = analog Read (potPin); digital Write(ledPin£¬ HIGH); delay(val); digital Write(ledPin£¬ LOW); delay(val);