forked from sup4r/DIY-Thermocam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDIY-Thermocam.ino
90 lines (70 loc) · 1.59 KB
/
DIY-Thermocam.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
*
* MAIN SKETCH - Main entry point for the firmware
*
* DIY-Thermocam Firmware
*
* GNU General Public License v3.0
*
* Copyright by Max Ritter
*
* http://www.diy-thermocam.net
* https://github.com/maxritter/DIY-Thermocam
*
*/
/* Current firmware version */
#define Version "Firmware 2.19 from 29.10.2016"
#define fwVersion 219
/* External Libraries */
#include <ADC.h>
#include <i2c_t3.h>
#include <SdFat.h>
#include <tjpgd.h>
#include <SPI.h>
#include <TimeLib.h>
#include <EEPROM.h>
#include <Bounce.h>
#include <UTFT_Buttons.h>
#include <UTFT.h>
#include <Touchscreen.h>
#include <Camera.h>
#include <Metro.h>
/* General Includes */
#include "General/ColorSchemes.h"
#include "General/GlobalVariables.h"
#include "General/GlobalMethods.h"
/* Modules */
#include "Hardware/Hardware.h"
#include "GUI/GUI.h"
#include "Thermal/Thermal.h"
/* Main Entry point */
void setup()
{
//Init the hardware components
initHardware();
//Enter USB connection if no display attached
if (checkNoDisplay())
goto usbConnection;
//Check for hardware issues
checkDiagnostic();
//Do the first start setup if required
if (checkFirstStart())
firstStart();
//Check for firmware upgrade done
checkFWUpgrade();
//Read all settings from EEPROM
readEEPROM();
//Show the live mode helper if required
if (checkLiveModeHelper())
liveModeHelper();
//Go to the live Mode
liveMode();
usbConnection:
//Go to the USB connection
serialInit();
}
/* Loop forever, only serial mode without display */
void loop()
{
serialOutput();
}