SunFounder 3in1 Kit
Next, upload this sketch to the Arduino development board.
int ledPin = 9;
int delayTime = 500;
void setup() {
pinMode(ledPin,OUTPUT);
}
void loop() {
digitalWrite(ledPin,HIGH);
delay(delayTime);
digitalWrite(ledPin,LOW);
delay(delayTime);
}
This sketch is very similar to the one we used to control the blinking of the on-board LED, the difference is that the
value of ledPin has been changed to 9. This is because we are trying to control the level of pin 9 this time.
82 Chapter 2. Get Started with Arduino