/* */ int ledPin = 13; // LED connected to digital pin 13 int basePin = 12; // The setup() method runs once, when the sketch starts void setup() { // initialize the digital pin as an output: pinMode(ledPin, OUTPUT); pinMode(basePin, OUTPUT); } // the loop() method runs over and over again, // as long as the Arduino has power void loop() { delay(3000); // wait click(40); } void click(int length) { digitalWrite(ledPin, HIGH); // set the LED on digitalWrite(basePin, HIGH); delay(length); digitalWrite(ledPin, LOW); // set the LED off digitalWrite(basePin, LOW); }