From 2da0ef4521d4ffbb5485565c618a7fd74f42336f Mon Sep 17 00:00:00 2001 From: EnricoGuccii Date: Tue, 19 May 2026 20:17:31 +0200 Subject: dodane biblioteki, aktualizacja pinow i mockup wyswietlacza --- src/main.cpp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/main.cpp (limited to 'src/main.cpp') 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 + +#include "config.h" + +#include +#include +#include +#include +#include + + +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() { +} -- cgit v1.2.3