Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// the setup function runs once when you press reset or power the board
void setup()
{
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
pinMode(11, OUTPUT); //輸入另一個LED
int analogPin = 0;
}
// the loop function runs over and over again forever
void loop()
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(11, LOW);//讓另一個LED暗
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
digitalWrite(11, HIGH);//讓另一個LED亮
delay(1000); // wait for a second
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment