diff --git a/Greenhouse.ino b/Greenhouse.ino index e9dbae8..2f682d9 100644 --- a/Greenhouse.ino +++ b/Greenhouse.ino @@ -277,6 +277,11 @@ void loop(void) { drawButton(0, 20, 320, 110, "Stop", "ILI9341_RED"); drawButton(160, 130, 160, 110, "Back", "ILI9341_BLUE"); } + if (menu == 2) { + drawButton(160, 130, 160, 110, "Back", "ILI9341_BLUE"); + displayText(2, 30, false, 4); + // moisture, temperature, next cycle, how much water, power usage, sensor connections + } upd = false; } if(Serial.available() > 0) { @@ -690,3 +695,11 @@ void button(int x, int y) { } delay(250); } + +void displayText(int x, int y, boolean center, String text, int size) { + if (center) { + tft.drawCentreString(text, x, y, size); + } else { + tft.drawString(text, x, y, size); + } +} \ No newline at end of file