-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathglobal.h
39 lines (32 loc) · 1.04 KB
/
global.h
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
// debugging macros
// #define APP_DBG
// Setup debug printing macros.
#ifdef APP_DBG
#define DBG_PRINTER Serial
#define LED1 2
#define DBG_INIT(...) { DBG_PRINTER.begin(__VA_ARGS__); }
#define DBG_PRINT(...) { DBG_PRINTER.print(__VA_ARGS__); }
#define DBG_PRINTLN(...) { DBG_PRINTER.println(__VA_ARGS__); }
#else
#define LED1 1
#define DBG_INIT(...) {}
#define DBG_PRINT(...) {}
#define DBG_PRINTLN(...) {}
#endif
// LED
#define LED2 2 // some modules have LED on GPIO1, other have it on GPIO2
#define LED_ON digitalWrite(LED1, 0); digitalWrite(LED2, 0)
#define LED_OFF digitalWrite(LED1, 1); digitalWrite(LED2, 1)
#define HOSTNAME "WeatherThing"
#define APSSID "Murga_8266"
// pin defs
#define ESP_OLED_CS 15 // Pin 19, CS - Chip select
#define ESP_OLED_DC 2 // Pin 20 DC - digital signal
#define ESP_OLED_RESET 16 // Pin 15 RESET
// external switches
#define PIN_MISC 4
#define PIN_LANDSCAPE 5
// screen types
#define DISPLAY_CONSOLE 1
#define DISPLAY_LANDSCAPE 2
#define DISPLAY_PORTRAIT 3