Skip to content

Instantly share code, notes, and snippets.

@ac30rc
Forked from ptb/LCD example code.ino
Created June 11, 2013 13:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ac30rc/5756695 to your computer and use it in GitHub Desktop.
Save ac30rc/5756695 to your computer and use it in GitHub Desktop.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
String one = "Target Temp";
String two = "Current Temp";
byte degreesf[8] = {
0b11000,
0b11000,
0b00111,
0b00100,
0b00111,
0b00100,
0b00100,
0b00000
};
byte degreesc[8] = {
0b11000,
0b11000,
0b00011,
0b00100,
0b00100,
0b00100,
0b00011,
0b00000
};
void setup() {
one.toUpperCase();
two.toUpperCase();
lcd.createChar(0, degreesf);
lcd.createChar(1, degreesc);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print(one);
lcd.setCursor(15, 0);
lcd.write((uint8_t)0);
lcd.setCursor(0, 1);
lcd.print(two);
lcd.setCursor(15, 1);
lcd.write((uint8_t)0);
}
void loop() {
lcd.setCursor(13, 0);
lcd.print(72);
lcd.setCursor(13, 1);
lcd.print(68);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment