Hardware Reference
In-Depth Information
//Custom "fan on" indicator
byte fan_on[8] = {
B00100,
B10101,
B01110,
B11111,
B01110,
B10101,
B00100,
B00000,
};
//Custom "fan off" indicator
byte fan_off[8] = {
B00100,
B00100,
B00100,
B11111,
B00100,
B00100,
B00100,
B00000,
};
Writing these characters will be done in setup() . Move the cursor to the right
locations, and with the LCD library's write() and print() functions, update
the screen, as shown in the following snippet.
//Make custom characters
lcd.createChar(0, degree);
lcd.createChar(1, fan_off);
lcd.createChar(2, fan_on);
//Print a static message to the LCD
lcd.setCursor(0,0);
lcd.print("Current:");
lcd.setCursor(10,0);
lcd.write((byte)0);
lcd.setCursor(11,0);
lcd.print("C");
lcd.setCursor(0,1);
lcd.print("Set:");
lcd.setCursor(10,1);
lcd.write((byte)0);
lcd.setCursor(11,1);
lcd.print("C");
lcd.setCursor(15,1);
lcd.write(1);
Search WWH ::




Custom Search