Skip to content

Instantly share code, notes, and snippets.

@brodul
Created April 25, 2014 20:59
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 brodul/11303090 to your computer and use it in GitHub Desktop.
Save brodul/11303090 to your computer and use it in GitHub Desktop.
Arduino lcd
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void write_rows(String line1, String line2) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(line1);
lcd.setCursor(0, 1);
lcd.print(line2);
}
void setup() {
lcd.begin(16, 2);
lcd.noBlink();
}
void loop() {
int d = 3000;
String line1 = "Kiberpipa.org";
write_rows(line1, "GNU/Linux");
delay(d);
write_rows(line1, "Open source");
delay(d);
write_rows(line1, "Druzenje");
delay(d);
write_rows("Predavanja", "POT");
delay(d);
write_rows("Predavanja", "Spletne urice");
delay(d);
write_rows("Predavanja", "Meetups");
delay(d);
write_rows("Predavanja", "MoMo");
delay(d);
write_rows("Delavnice", "Coder Dojo");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment