forked from melkati/CO2-Gadget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
250 lines (240 loc) · 8.47 KB
/
platformio.ini
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = .
data_dir = data
; build_dir = ${sysenv.TEMP}/pio-build/$PROJECT_HASH
default_envs = TTGO_TDISPLAY, TTGO_TDISPLAY_SANDWICH, esp32dev_OLED
[common_env_data]
framework = arduino
upload_speed = 921600
monitor_speed = 115200
monitor_port = COM13
upload_port = COM13
monitor_filters = time
board_build.partitions = CO2_Gadget_Partitions.csv ; Others at Windows at C:\Users\%USER%\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\tools\partitions
; board_build.partitions = min_spiffs.csv
lib_ldf_mode = chain+
lib_deps =
me-no-dev/ESP Async WebServer @ ^1.2.3
ayushsharma82/AsyncElegantOTA @ ^2.2.6
knolleary/PubSubClient @ ^2.8
neu-rah/ArduinoMenu library @ ^4.21.4
lennarthennigs/Button2 @ ^1.6.5
hpsaturn/CanAirIO Air Quality Sensors Library @ ^0.4.2
git+https://github.com/melkati/arduino-ble-gadget.git#setSampleIntervalMs ; sensirion/Sensirion Gadget BLE Arduino Lib@^0.10.0
; neu-rah/streamFlow @ 0.0.0-alpha+sha.bf16ce8926 ; Needed for -DMENU_DEBUG
rlogiacco/Battery Sense @ ^1.1.2
build_flags =
; If you want you can keep sensitive data in a file, you can define it in environment variables so you don't need a credentials.h file with your secrets
;
; Unix
; export WIFI_SSID='\"my\ ssid\ name\"'
; export WIFI_PASS='\"my\ password\"'
; Windows
; set WIFI_SSID="my ssid name"
; set WIFI_PASS="my password"
;
; To use these environment variables uncomment next two lines (delete front semicolon)
'-DWIFI_SSID_CREDENTIALS="${sysenv.WIFI_SSID}"'
'-DWIFI_PW_CREDENTIALS="${sysenv.WIFI_PASS}"'
-D MQTT_BROKER_SERVER="\"192.168.1.145"\"
-D CO2_GADGET_VERSION="\"0.5."\"
-D CO2_GADGET_REV="\"041"\"
-D CORE_DEBUG_LEVEL=0
-DBTN_UP=35 ; Pinnumber for button for up/previous and select / enter actions
-DBTN_DWN=34 ; Pinnumber for button for down/next and back / exit actions
-DENABLE_PIN=27 ; Reserved for the future to enable the sensor
-D ENABLE_PIN_HIGH=1 ; Should be ENABLE_PIN high or low to enable the sensor?
-D ORANGE_PIN=32 ; GPIO to go HIGH on orange color range
-D ORANGE_PIN_LOW=0
-D ORANGE_PIN_HIGH=1 ; Should the ORANGE_PIN_HIGH go high or low at threshold
-D RED_PIN=33 ; GPIO to go HIGH on red color range
-D RED_PIN_LOW=0
-D RED_PIN_HIGH=1 ; Should the RED_PIN_HIGH go high or low at threshold
-D GREEN_PIN=25 ; GPIO to go HIGH bellow range (goes LOW at orange range)
-D GREEN_PIN_LOW=0
-D GREEN_PIN_HIGH=1 ; Should the GREEN_PIN_HIGH go high or low bellow orange threshold
-D PIN_HYSTERESIS=100 ; Hysteresis PPM to avoid pins going ON and OFF continuously. TODO : Minimum time to switch
-D WIFI_PRIVACY ; Uncomment to hide WiFi password in the menu
-D SUPPORT_BLE ; Comment to dissable Bluetooth (makes more memory available)
; -D SUPPORT_OTA ; Needs SUPPORT_WIFI
; -D SUPPORT_MDNS ; Needs SUPPORT_WIFI
-D SUPPORT_MQTT ; Needs SUPPORT_WIFI
; -D DEBUG_ARDUINOMENU
; -D MENU_DEBUG ; Needs streamFlow library
-Os ; Optimize compilation for use memory
-w ; Supress compilation warnings
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
upload_port = ${common_env_data.upload_port}
monitor_port = ${common_env_data.monitor_port}
monitor_filters = ${common_env_data.monitor_filters}
board_build.partitions = ${common_env_data.board_build.partitions}
lib_deps =
${common_env_data.lib_deps}
build_flags =
${common_env_data.build_flags}
-DUNITHOSTNAME="\"CO2-Gadget"\"
-DFLAVOUR="\"ESP32 BASIC"\"
[env:esp32dev-sandwich]
platform = espressif32
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
upload_port = ${common_env_data.upload_port}
monitor_port = ${common_env_data.monitor_port}
monitor_filters = ${common_env_data.monitor_filters}
board_build.partitions = ${common_env_data.board_build.partitions}
lib_deps =
${common_env_data.lib_deps}
build_flags =
${common_env_data.build_flags}
-DUNITHOSTNAME="\"CO2-Gadget-S"\"
-DALTERNATIVE_I2C_PINS
-DFLAVOUR="\"ESP32 SANDWICH"\"
[env:TTGO_TDISPLAY]
platform = espressif32
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
upload_port = ${common_env_data.upload_port}
monitor_port = ${common_env_data.monitor_port}
monitor_filters = ${common_env_data.monitor_filters}
board_build.partitions = ${common_env_data.board_build.partitions}
lib_deps =
bodmer/TFT_eSPI @ ^2.4.0 ; https://github.com/melkati/TFT_eSPI.git
${common_env_data.lib_deps}
build_flags =
${common_env_data.build_flags}
-DBTN_DWN=0 ; Redefine pinnumber for button for down/next and back / exit actions
-DSUPPORT_TFT
-DTTGO_TDISPLAY=1
-DBACKLIGHT_PIN=4 ; Pin used for backlight
-DUSER_SETUP_LOADED=1
-DST7789_DRIVER=1
-DENABLE_TFT=1
-DTFT_WIDTH=135
-DTFT_HEIGHT=240
-DCGRAM_OFFSET=1
-DTFT_MOSI=19
-DTFT_SCLK=18
-DTFT_CS=5
-DTFT_DC=16
-DTFT_RST=23
-DTFT_BL=4
-DTFT_BACKLIGHT_ON=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT6=1
-DLOAD_FONT7=1
-DLOAD_FONT8=1
-DLOAD_GFXFF=1
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=40000000
-DSPI_READ_FREQUENCY=6000000
-DUNITHOSTNAME="\"CO2-Gadget"\"
-DFLAVOUR="\"TTGO T-Display"\"
[env:TTGO_TDISPLAY_SANDWICH]
platform = espressif32
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
upload_port = ${common_env_data.upload_port}
monitor_port = ${common_env_data.monitor_port}
monitor_filters = ${common_env_data.monitor_filters}
board_build.partitions = ${common_env_data.board_build.partitions}
lib_deps =
${common_env_data.lib_deps}
bodmer/TFT_eSPI @ ^2.4.0 ; https://github.com/melkati/TFT_eSPI.git
build_flags =
${common_env_data.build_flags}
-DBTN_DWN=0 ; Redefine pinnumber for button for down/next and back / exit actions
-DSUPPORT_TFT
-DTTGO_TDISPLAY=1
-DBACKLIGHT_PIN=4 ; Pin used for backlight
-DUSER_SETUP_LOADED=1
-DST7789_DRIVER=1
-DENABLE_TFT=1
-DTFT_WIDTH=135
-DTFT_HEIGHT=240
-DCGRAM_OFFSET=1
-DTFT_MOSI=19
-DTFT_SCLK=18
-DTFT_CS=5
-DTFT_DC=16
-DTFT_RST=23
-DTFT_BL=4
-DTFT_BACKLIGHT_ON=1
-DLOAD_GLCD=1
-DLOAD_FONT2=1
-DLOAD_FONT4=1
-DLOAD_FONT6=1
-DLOAD_FONT7=1
-DLOAD_FONT8=1
-DLOAD_GFXFF=1
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=40000000
-DSPI_READ_FREQUENCY=6000000
-DUNITHOSTNAME="\"CO2-Gadget-S"\"
-DALTERNATIVE_I2C_PINS
-DFLAVOUR="\"TTGO T-Display Sandwich"\"
[env:esp32dev_OLED]
platform = espressif32
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
upload_port = ${common_env_data.upload_port}
monitor_port = ${common_env_data.monitor_port}
monitor_filters = ${common_env_data.monitor_filters}
board_build.partitions = ${common_env_data.board_build.partitions}
lib_deps =
${common_env_data.lib_deps}
olikraus/U8g2@^2.32.6
build_flags =
${common_env_data.build_flags}
-DSUPPORT_OLED
-DUNITHOSTNAME="\"CO2-Gadget-OLED"\"
-DFLAVOUR="\"ESP32 OLED"\"
[env:esp32dev_OLED_OTA]
platform = espressif32
board = esp32dev
framework = ${common_env_data.framework}
; upload_speed = ${common_env_data.upload_speed}
; monitor_speed = ${common_env_data.monitor_speed}
; upload_port = ${common_env_data.upload_port}
; monitor_port = ${common_env_data.monitor_port}
; monitor_filters = ${common_env_data.monitor_filters}
; upload_speed = 921600
; monitor_speed = 115200
; monitor_port = COM6
; upload_port = COM6
monitor_filters = ${common_env_data.monitor_filters}
board_build.partitions = ${common_env_data.board_build.partitions}
lib_deps =
${common_env_data.lib_deps}
olikraus/U8g2@^2.32.6
build_flags =
${common_env_data.build_flags}
-DSUPPORT_OLED
-DUNITHOSTNAME="\"CO2-Gadget-OLED-OTA"\"
-DFLAVOUR="\"ESP32 OLED OTA"\"
-USUPPORT_BLE
-DSUPPORT_OTA
-DSUPPORT_MDNS