wakasann
11/22/2016 - 2:00 PM

arduino_hello_led_delay

//Port 13 +
//resistance(电阻)
//Led(辨别LED灯正负极:1.长脚是正极,短脚是负极;2.发光二极管管体内部金属极较小的是正极,大的片状的是负极)
//Port GND -
int ledPin = 13;
void setup()
{
  pinMode(ledPin,OUTPUT);
}

void loop()
{
  digitalWrite(ledPin,HIGH);
  delay(1000);
  digitalWrite(ledPin,LOW);
  delay(1000);
}