Skip to content

Instantly share code, notes, and snippets.

@kozaru
Created August 25, 2016 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozaru/f6283eacf6252cb61f35e033d6b9dc31 to your computer and use it in GitHub Desktop.
Save kozaru/f6283eacf6252cb61f35e033d6b9dc31 to your computer and use it in GitHub Desktop.
LilyPad グランパ
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://arduino.cc
This example code is in the public domain.
modified 8 May 2014
by Scott Fitzgerald
*/
int nosePin = 2;
int earPin = 11;
int cookiePin = 10;
int bodyPin = 3;
int footPin = 9;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.
pinMode(nosePin, OUTPUT);
pinMode(earPin, OUTPUT);
pinMode(cookiePin, OUTPUT);
pinMode(bodyPin, OUTPUT);
pinMode(footPin, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(nosePin, HIGH);
delay(500);
digitalWrite(nosePin, LOW);
delay(500);
digitalWrite(earPin, HIGH);
delay(500);
digitalWrite(earPin, LOW);
delay(500);
digitalWrite(cookiePin, HIGH);
delay(500);
digitalWrite(cookiePin, LOW);
delay(500);
digitalWrite(bodyPin, HIGH);
delay(500);
digitalWrite(bodyPin, LOW);
delay(500);
digitalWrite(footPin, HIGH);
delay(500);
digitalWrite(footPin, LOW);
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment