/* LED Pacman Ghost Code NextFab Studio Written by Kyle Raskin ================================================. .-. .-. .--. | | OO| | OO| / _.-' .-. .-. .-. .''. | | | | | \ '-. '-' '-' '-' '..' | '^^^' '^^^' '--' | ===============. .-. .================. .-. | | | | | | '-' | | | | | | | | ':-:' | | .-. | | '-' | | '-' | ===============' '================' | */ void setup() { // Set all the digital pins as outputs for the LEDs pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); /* Turn on the LEDs that outline your ghost, these can be in the stup since they will stay on all the time */ digitalWrite(2,HIGH); digitalWrite(3,HIGH); } void loop() { // Turn the LEDs for one set of eyes on digitalWrite(4,HIGH); // Keep them on for 1 second delay(1000); // Turn the first set of eyes off digitalWrite(4,LOW); // Turn the LEDs for the second set of eyes on digitalWrite(5,HIGH); // Keep them on for 1 second delay(1000); // Turn the second set of eyes off digitalWrite(5 ,LOW); }