Skip to content

Instantly share code, notes, and snippets.

@agileguy
Created September 13, 2012 00:05
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 agileguy/3710897 to your computer and use it in GitHub Desktop.
Save agileguy/3710897 to your computer and use it in GitHub Desktop.
First Milestone of Arduino Sandbox
#include <LiquidCrystal.h>
int greenPin = 8;
int redPin = 9;
LiquidCrystal lcd(12, 11, 5, 7, 3, 2);
void setup()
{
pinMode(greenPin, OUTPUT);
pinMode(redPin, OUTPUT);
lcd.begin(16, 2);
lcd.print("self test");
digitalWrite(greenPin, LOW);
digitalWrite(redPin, HIGH);
delay(1000);
digitalWrite(greenPin, HIGH);
digitalWrite(redPin, LOW);
}
void loop()
{
lcd.setCursor(0, 1);
lcd.print(millis()/1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment