1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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() {
}
|