-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPAXOS_7.ino
73 lines (57 loc) · 1.4 KB
/
PAXOS_7.ino
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include "soc/rtc_wdt.h"
#define ESP32 1
#include "hardware/hardware.hpp"
#include "extern/extern.hpp"
#include "task/task.hpp"
#include "widgets/gauss.hpp"
#include "system/encoder.hpp"
#include "launcher/launcher.hpp"
#include "system/sim800l_reader.hpp"
#include "system/hour/hour.hpp"
void setupTasks()
{
Task *autoHourUpdate = new Task(5000, update_hour, TASKS_LOOP); // auto hour update
SystemTasks.addTask(autoHourUpdate);
}
void setup()
{
psramInit();
pinMode(SCREEN_LED, OUTPUT); // declare LED
pinMode(SCREEN_POWER, OUTPUT); // declare power
pinMode(HOME_BUTTON, INPUT_PULLUP);
pinMode(23, OUTPUT);
digitalWrite(SCREEN_POWER, HIGH); // power on
ledcAttachPin(SCREEN_LED, PWM1_Ch);
ledcSetup(PWM1_Ch, PWM1_Freq, PWM1_Res);
init_hardware(); // init the hardware
tft_root.init(); // init the screen
tft_root.fillScreen(0x0000);
tft.setColorDepth(16);
tft.createSprite(320, 480);
tft.fillScreen(0xFFFF);
tft_root.fillScreen(0xFFFF);
Image logo("/logo.bmp", 3, 0);
logo.draw();
tft.pushSprite(0,0);
screen_light.ON();
delay(500);
}
void backgroundLoop(void* arg)
{
while(true)
{
vTaskDelay(10);
taskmanager.executeAll();
}
}
void loop()
{
Menu menu;
menu.load();
while(true);
while(1)
{
Serial.println("coucou");
delay(100);
}
}