void setup() { // initialize and set the contrast to 0x18 glcd.begin(0x18); // show splashscreen glcd.display(); delay(500); glcd.clear(); // turn on backlight pinMode(BACKLIGHT_LED, OUTPUT); digitalWrite(BACKLIGHT_LED, HIGH); // For I2C Wire.begin(); // For console debugging Serial.begin(9600); // Configure the ladder a5b.setLadder(3.3, ladder); a5b.removeState(17); a5b.removeState(18); a5b.setTiming(20, 3); for (int i=0; i<5; i++) { buttonsX[5-i-1] = startX+i*squareSpacing; } counter = 0; prevtime = millis(); }
void LCD_ST7565::updateCounter(uint32_t time) { glcd.clear(); glcd.drawstring(0,0,"Operator:"); glcd.drawstring(0,1,"Lord Clancy"); formatHalfTime(time, 2, 0); formatFullTime(time, 2, 61); // 128 pixels - (11 chars * 6 pixels) = 62 - 1 glcd.drawstring(0,4,"Maintain in:"); formatHourTime(time, 4, 79); // 128 pixels - (8 chars * 6 pixels) = 80 - 1 glcd.drawstring(0,6,"Machine Time:"); formatFullTime(time, 7, 0); glcd.display(); }
void LCD_ST7565::start(void) { glcd.clear(); glcd.drawstring(0,0,"Hello World"); glcd.display(); }