screen: custom characters
parent
42f5c3cbd7
commit
a88212a40d
|
@ -93,6 +93,14 @@ void handleDebugFunctions(char key) {
|
|||
setTimerEnabled(!isTimerEnabled());
|
||||
} else if (key == 'q') {
|
||||
quickAccelerate();
|
||||
} else if (key == '\\') {
|
||||
lcd.clear();
|
||||
lcd.write(0);
|
||||
lcd.write(1);
|
||||
lcd.write(2);
|
||||
lcd.write(3);
|
||||
lcd.write(4);
|
||||
lcd.write(5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,72 @@
|
|||
|
||||
LCD_I2C lcd(LCD_I2C_ADDR, LCD_COLS, LCD_ROWS);
|
||||
|
||||
uint8_t invertedA[8] = {
|
||||
B11111,
|
||||
B10001,
|
||||
B10101,
|
||||
B10001,
|
||||
B10101,
|
||||
B10101,
|
||||
B11111,
|
||||
B00000,
|
||||
};
|
||||
|
||||
uint8_t invertedB[8] = {
|
||||
B11111,
|
||||
B10011,
|
||||
B10101,
|
||||
B10011,
|
||||
B10101,
|
||||
B10011,
|
||||
B11111,
|
||||
B00000,
|
||||
};
|
||||
|
||||
uint8_t invertedC[8] = {
|
||||
B11111,
|
||||
B11001,
|
||||
B10111,
|
||||
B10111,
|
||||
B10111,
|
||||
B11001,
|
||||
B11111,
|
||||
B00000,
|
||||
};
|
||||
|
||||
uint8_t invertedD[8] = {
|
||||
B11111,
|
||||
B10011,
|
||||
B10101,
|
||||
B10101,
|
||||
B10101,
|
||||
B10011,
|
||||
B11111,
|
||||
B00000,
|
||||
};
|
||||
|
||||
uint8_t encoder[8] = {
|
||||
B01110,
|
||||
B10001,
|
||||
B00011,
|
||||
B11000,
|
||||
B10001,
|
||||
B01110,
|
||||
B00000,
|
||||
B00000,
|
||||
};
|
||||
|
||||
uint8_t encoderSwitch[8] = {
|
||||
B00000,
|
||||
B01110,
|
||||
B10001,
|
||||
B10101,
|
||||
B10001,
|
||||
B01110,
|
||||
B00000,
|
||||
B00000,
|
||||
};
|
||||
|
||||
bool setupScreen() {
|
||||
lcd.begin();
|
||||
|
||||
|
@ -15,5 +81,11 @@ bool setupScreen() {
|
|||
|
||||
lcd.backlight();
|
||||
lcd.clear();
|
||||
lcd.createChar(0, invertedA);
|
||||
lcd.createChar(1, invertedB);
|
||||
lcd.createChar(2, invertedC);
|
||||
lcd.createChar(3, invertedD);
|
||||
lcd.createChar(4, encoder);
|
||||
lcd.createChar(5, encoderSwitch);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue