diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..d1e1b4d --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,55 @@ +#include <Arduino.h> + +#include "config.h" + +#include <Adafruit_GFX.h> +#include <Adafruit_ST7789.h> +#include <SPI.h> +#include <ESP32Servo.h> +#include <ezButton.h> + + +Adafruit_ST7789 tft = Adafruit_ST7789(&SPI, TFT_CS, TFT_DC, TFT_RST); +Servo myServo; + +float temp_internal; +float temp_external; + +void setupDisplay(){ + + SPI.begin(TFT_SCLK, -1, TFT_MOSI, TFT_CS); + tft.init(240, 240); + tft.fillScreen(ST77XX_BLACK); + + tft.setTextColor(ST77XX_CYAN); + tft.setTextSize(3); + + tft.setCursor(0, 0); + tft.print("TEMP INTERNAL"); + tft.setCursor(0, 25); + tft.print("min: 50,5"); + tft.setCursor(0, 50); + tft.print("cur: 67,1"); + + tft.setCursor(0, 90); + tft.print("TEMP EXTERNAL"); + tft.setCursor(0, 115); + tft.print("max: 90,0"); + tft.setCursor(0, 140); + tft.print("cur: 80,5"); + + tft.setCursor(0, 180); + tft.print("HISTEREZA"); + tft.setCursor(0, 205); + tft.print("5"); +} + + +void setup() { + Serial.begin(115200); + delay(100); + setupDisplay(); +} + +void loop() { +} |