Skip to content

Instantly share code, notes, and snippets.

@mithi
Last active January 8, 2016 01:58
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 mithi/27a82e97273fbfd6bbbf to your computer and use it in GitHub Desktop.
Save mithi/27a82e97273fbfd6bbbf to your computer and use it in GitHub Desktop.
#include "RingoHardware.h"
void setup(){
HardwareBegin(); //initialize Ringo's brain to work with his circuitry
PlayStartChirp(); //Play startup chirp and blink eyes
SwitchMotorsToSerial(); //Call "SwitchMotorsToSerial()" before using Serial.print functions as motors & serial share a line
RestartTimer();
}
void loop(){
SwitchPixelsToButton();
if (ButtonPressed()){
SwitchButtonToPixels();
LeftEye(255, 0, 0);
RightEye(0, 0, 0);
SwitchPixelsToButton();
} else {
SwitchButtonToPixels();
LeftEye(0, 0, 0);
delay(100);
RightEye(0, 0, 255);
delay(100);
RightEye(0, 255, 0);
delay(100);
RightEye(255, 0, 0);
SwitchPixelsToButton();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment