-
Notifications
You must be signed in to change notification settings - Fork 7
/
TinyPixelMapper.ino
94 lines (54 loc) · 1.48 KB
/
TinyPixelMapper.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
91
92
93
94
/*
TinyPixelMapper
a Pixelmapping software for the ESP32 for addressible LED Strips, with a OSC controll interface.
Git site https://github.com/Gerfunky/TinyPixelMapper
License (GPL-3) : https://github.com/Gerfunky/TinyPixelMapper/blob/master/LICENSE
TODO: more info here!
*/
#include "config_TPM.h" // add the Config.h where the main Settings a DEFINED
#include "tools.h"
#include "config_fs.h"
#include "wifi-ota.h"
#include "leds.h"
#include "mmqt.h"
//float temperatureRead();
void setup()
{
DEF_SERIAL_PORT.begin(DEF_SERIAL_SPEED);
if (DEF_BOOT_DEBUGING == true)
{
write_bool(DEBUG_OUT, DEF_BOOT_DEBUGING); // Set the normal debuging level will be overwriten when loading config from SPIFFS
DEF_SERIAL_PORT.setDebugOutput(true);
debugMe(debug_ResetReason(0));
debugMe(debug_ResetReason(1));
debugMe("Starting Setup - TinypixelMapper");
#ifdef OMILEX32_GW_BOARD
debugMe("***** Olimex-Gateway *****");
#elif OMILEX32_POE_BOARD
debugMe("***** Olimex-POE *****");
#elif HUZZAH32_BOARD
debugMe("***** Adafruit Huzzah32 *****");
#endif
}
btStop(); // disable bluetooth
setup_controlls(); // Pottis and Button
yield();
FS_setup(); // includes loadbool()
yield();
LEDS_setup();
wifi_setup();
yield();
MMQT_setup() ;
wifi_start_IP_services();
debugMe("DONE Setup");
} // end setup
void loop()
{
if (Network_connected_check())
{
wifi_loop();
yield();
MMQT_loop();
}
LEDS_loop();
} // end loop