platformio.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. [Heltec_lora32_v4]
  2. extends = esp32_base
  3. board = heltec_v4
  4. build_flags =
  5. ${esp32_base.build_flags}
  6. ${sensor_base.build_flags}
  7. -I variants/heltec_v4
  8. -D HELTEC_LORA_V4
  9. -D ESP32_CPU_FREQ=80
  10. -D RADIO_CLASS=CustomSX1262
  11. -D WRAPPER_CLASS=CustomSX1262Wrapper
  12. -D P_LORA_TX_LED=35
  13. -D P_LORA_DIO_1=14
  14. -D P_LORA_NSS=8
  15. -D P_LORA_RESET=12
  16. -D P_LORA_BUSY=13
  17. -D P_LORA_SCLK=9
  18. -D P_LORA_MISO=11
  19. -D P_LORA_MOSI=10
  20. -D P_LORA_PA_POWER=7 ;power en
  21. -D P_LORA_PA_EN=2
  22. -D P_LORA_PA_TX_EN=46 ;enable tx
  23. -D PIN_USER_BTN=0
  24. -D PIN_VEXT_EN=36
  25. -D PIN_VEXT_EN_ACTIVE=LOW
  26. -D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm.
  27. -D MAX_LORA_TX_POWER=22 ; Max SX1262 output
  28. -D SX126X_DIO2_AS_RF_SWITCH=true
  29. -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  30. -D SX126X_CURRENT_LIMIT=140
  31. -D SX126X_RX_BOOSTED_GAIN=1
  32. -D PIN_GPS_RX=38
  33. -D PIN_GPS_TX=39
  34. -D PIN_GPS_RESET=42
  35. -D PIN_GPS_RESET_ACTIVE=LOW
  36. -D PIN_GPS_EN=34
  37. -D PIN_GPS_EN_ACTIVE=LOW
  38. -D ENV_INCLUDE_GPS=1
  39. -D PIN_ADC_CTRL=37
  40. -D PIN_VBAT_READ=1
  41. build_src_filter = ${esp32_base.build_src_filter}
  42. +<../variants/heltec_v4>
  43. +<helpers/sensors>
  44. lib_deps =
  45. ${esp32_base.lib_deps}
  46. ${sensor_base.lib_deps}
  47. [heltec_v4_oled]
  48. extends = Heltec_lora32_v4
  49. build_flags =
  50. ${Heltec_lora32_v4.build_flags}
  51. -D HELTEC_LORA_V4_OLED
  52. -D PIN_BOARD_SDA=17
  53. -D PIN_BOARD_SCL=18
  54. -D ENV_PIN_SDA=4
  55. -D ENV_PIN_SCL=3
  56. build_src_filter= ${Heltec_lora32_v4.build_src_filter}
  57. lib_deps = ${Heltec_lora32_v4.lib_deps}
  58. [heltec_v4_tft]
  59. extends = Heltec_lora32_v4
  60. build_flags =
  61. ${Heltec_lora32_v4.build_flags}
  62. -D HELTEC_LORA_V4_TFT
  63. -D PIN_BOARD_SDA=4
  64. -D PIN_BOARD_SCL=3
  65. -D DISPLAY_SCALE_X=2.5
  66. -D DISPLAY_SCALE_Y=3.75
  67. -D PIN_TFT_RST=18
  68. -D PIN_TFT_VDD_CTL=-1
  69. -D PIN_TFT_LEDA_CTL=21
  70. -D PIN_TFT_LEDA_CTL_ACTIVE=HIGH
  71. -D PIN_TFT_CS=15
  72. -D PIN_TFT_DC=16
  73. -D PIN_TFT_SCL=17
  74. -D PIN_TFT_SDA=33
  75. build_src_filter= ${Heltec_lora32_v4.build_src_filter}
  76. lib_deps =
  77. ${Heltec_lora32_v4.lib_deps}
  78. adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0
  79. [env:heltec_v4_repeater]
  80. extends = heltec_v4_oled
  81. build_flags =
  82. ${heltec_v4_oled.build_flags}
  83. -D DISPLAY_CLASS=SSD1306Display
  84. -D ADVERT_NAME='"Heltec Repeater"'
  85. -D ADVERT_LAT=0.0
  86. -D ADVERT_LON=0.0
  87. -D ADMIN_PASSWORD='"password"'
  88. -D MAX_NEIGHBOURS=50
  89. ; -D MESH_PACKET_LOGGING=1
  90. ; -D MESH_DEBUG=1
  91. build_src_filter = ${heltec_v4_oled.build_src_filter}
  92. +<helpers/ui/SSD1306Display.cpp>
  93. +<../examples/simple_repeater>
  94. lib_deps =
  95. ${heltec_v4_oled.lib_deps}
  96. ${esp32_ota.lib_deps}
  97. bakercp/CRC32 @ ^2.0.0
  98. [env:heltec_v4_repeater_bridge_espnow]
  99. extends = heltec_v4_oled
  100. build_flags =
  101. ${heltec_v4_oled.build_flags}
  102. -D DISPLAY_CLASS=SSD1306Display
  103. -D ADVERT_NAME='"ESPNow Bridge"'
  104. -D ADVERT_LAT=0.0
  105. -D ADVERT_LON=0.0
  106. -D ADMIN_PASSWORD='"password"'
  107. -D MAX_NEIGHBOURS=50
  108. -D WITH_ESPNOW_BRIDGE=1
  109. ; -D BRIDGE_DEBUG=1
  110. ; -D MESH_PACKET_LOGGING=1
  111. ; -D MESH_DEBUG=1
  112. build_src_filter = ${heltec_v4_oled.build_src_filter}
  113. +<helpers/bridges/ESPNowBridge.cpp>
  114. +<helpers/ui/SSD1306Display.cpp>
  115. +<../examples/simple_repeater>
  116. lib_deps =
  117. ${heltec_v4_oled.lib_deps}
  118. ${esp32_ota.lib_deps}
  119. [env:heltec_v4_room_server]
  120. extends = heltec_v4_oled
  121. build_flags =
  122. ${heltec_v4_oled.build_flags}
  123. -D DISPLAY_CLASS=SSD1306Display
  124. -D ADVERT_NAME='"Heltec Room"'
  125. -D ADVERT_LAT=0.0
  126. -D ADVERT_LON=0.0
  127. -D ADMIN_PASSWORD='"password"'
  128. -D ROOM_PASSWORD='"hello"'
  129. ; -D MESH_PACKET_LOGGING=1
  130. ; -D MESH_DEBUG=1
  131. build_src_filter = ${heltec_v4_oled.build_src_filter}
  132. +<helpers/ui/SSD1306Display.cpp>
  133. +<../examples/simple_room_server>
  134. lib_deps =
  135. ${heltec_v4_oled.lib_deps}
  136. ${esp32_ota.lib_deps}
  137. [env:heltec_v4_terminal_chat]
  138. extends = heltec_v4_oled
  139. build_flags =
  140. ${heltec_v4_oled.build_flags}
  141. -D MAX_CONTACTS=350
  142. -D MAX_GROUP_CHANNELS=1
  143. ; -D MESH_PACKET_LOGGING=1
  144. ; -D MESH_DEBUG=1
  145. build_src_filter = ${heltec_v4_oled.build_src_filter}
  146. +<../examples/simple_secure_chat/main.cpp>
  147. lib_deps =
  148. ${heltec_v4_oled.lib_deps}
  149. densaugeo/base64 @ ~1.4.0
  150. [env:heltec_v4_companion_radio_usb]
  151. extends = heltec_v4_oled
  152. build_flags =
  153. ${heltec_v4_oled.build_flags}
  154. -I examples/companion_radio/ui-new
  155. -D MAX_CONTACTS=350
  156. -D MAX_GROUP_CHANNELS=40
  157. -D DISPLAY_CLASS=SSD1306Display
  158. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  159. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  160. build_src_filter = ${heltec_v4_oled.build_src_filter}
  161. +<helpers/ui/SSD1306Display.cpp>
  162. +<helpers/ui/MomentaryButton.cpp>
  163. +<../examples/companion_radio/*.cpp>
  164. +<../examples/companion_radio/ui-new/*.cpp>
  165. lib_deps =
  166. ${heltec_v4_oled.lib_deps}
  167. densaugeo/base64 @ ~1.4.0
  168. [env:heltec_v4_companion_radio_ble]
  169. extends = heltec_v4_oled
  170. build_flags =
  171. ${heltec_v4_oled.build_flags}
  172. -I examples/companion_radio/ui-new
  173. -D MAX_CONTACTS=350
  174. -D MAX_GROUP_CHANNELS=40
  175. -D DISPLAY_CLASS=SSD1306Display
  176. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  177. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  178. -D BLE_DEBUG_LOGGING=1
  179. -D OFFLINE_QUEUE_SIZE=256
  180. ; -D MESH_PACKET_LOGGING=1
  181. ; -D MESH_DEBUG=1
  182. build_src_filter = ${heltec_v4_oled.build_src_filter}
  183. +<helpers/ui/SSD1306Display.cpp>
  184. +<helpers/ui/MomentaryButton.cpp>
  185. +<helpers/esp32/*.cpp>
  186. +<../examples/companion_radio/*.cpp>
  187. +<../examples/companion_radio/ui-new/*.cpp>
  188. lib_deps =
  189. ${heltec_v4_oled.lib_deps}
  190. densaugeo/base64 @ ~1.4.0
  191. [env:heltec_v4_companion_radio_wifi]
  192. extends = heltec_v4_oled
  193. build_flags =
  194. ${heltec_v4_oled.build_flags}
  195. -I examples/companion_radio/ui-new
  196. -D MAX_CONTACTS=350
  197. -D MAX_GROUP_CHANNELS=40
  198. -D DISPLAY_CLASS=SSD1306Display
  199. -D WIFI_DEBUG_LOGGING=1
  200. -D WIFI_SSID='"myssid"'
  201. -D WIFI_PWD='"mypwd"'
  202. ; -D MESH_PACKET_LOGGING=1
  203. ; -D MESH_DEBUG=1
  204. build_src_filter = ${heltec_v4_oled.build_src_filter}
  205. +<helpers/ui/SSD1306Display.cpp>
  206. +<helpers/ui/MomentaryButton.cpp>
  207. +<helpers/esp32/*.cpp>
  208. +<../examples/companion_radio/*.cpp>
  209. +<../examples/companion_radio/ui-new/*.cpp>
  210. lib_deps =
  211. ${heltec_v4_oled.lib_deps}
  212. densaugeo/base64 @ ~1.4.0
  213. [env:heltec_v4_sensor]
  214. extends = heltec_v4_oled
  215. build_flags =
  216. ${heltec_v4_oled.build_flags}
  217. -D ADVERT_NAME='"Heltec v4 Sensor"'
  218. -D ADVERT_LAT=0.0
  219. -D ADVERT_LON=0.0
  220. -D ADMIN_PASSWORD='"password"'
  221. -D ENV_PIN_SDA=3
  222. -D ENV_PIN_SCL=4
  223. -D DISPLAY_CLASS=SSD1306Display
  224. ; -D MESH_PACKET_LOGGING=1
  225. ; -D MESH_DEBUG=1
  226. build_src_filter = ${heltec_v4_oled.build_src_filter}
  227. +<helpers/ui/SSD1306Display.cpp>
  228. +<../examples/simple_sensor>
  229. lib_deps =
  230. ${heltec_v4_oled.lib_deps}
  231. ${esp32_ota.lib_deps}
  232. [env:heltec_v4_tft_repeater]
  233. extends = heltec_v4_tft
  234. build_flags =
  235. ${heltec_v4_tft.build_flags}
  236. -D DISPLAY_CLASS=ST7789LCDDisplay
  237. -D ADVERT_NAME='"Heltec Repeater"'
  238. -D ADVERT_LAT=0.0
  239. -D ADVERT_LON=0.0
  240. -D ADMIN_PASSWORD='"password"'
  241. -D MAX_NEIGHBOURS=50
  242. ; -D MESH_PACKET_LOGGING=1
  243. ; -D MESH_DEBUG=1
  244. build_src_filter = ${heltec_v4_tft.build_src_filter}
  245. +<helpers/ui/ST7789LCDDisplay.cpp>
  246. +<../examples/simple_repeater>
  247. lib_deps =
  248. ${heltec_v4_tft.lib_deps}
  249. ${esp32_ota.lib_deps}
  250. bakercp/CRC32 @ ^2.0.0
  251. [env:heltec_v4_tft_repeater_bridge_espnow]
  252. extends = heltec_v4_tft
  253. build_flags =
  254. ${heltec_v4_tft.build_flags}
  255. -D DISPLAY_CLASS=ST7789LCDDisplay
  256. -D ADVERT_NAME='"ESPNow Bridge"'
  257. -D ADVERT_LAT=0.0
  258. -D ADVERT_LON=0.0
  259. -D ADMIN_PASSWORD='"password"'
  260. -D MAX_NEIGHBOURS=50
  261. -D WITH_ESPNOW_BRIDGE=1
  262. ; -D BRIDGE_DEBUG=1
  263. ; -D MESH_PACKET_LOGGING=1
  264. ; -D MESH_DEBUG=1
  265. build_src_filter = ${heltec_v4_tft.build_src_filter}
  266. +<helpers/bridges/ESPNowBridge.cpp>
  267. +<helpers/ui/ST7789LCDDisplay.cpp>
  268. +<../examples/simple_repeater>
  269. lib_deps =
  270. ${heltec_v4_tft.lib_deps}
  271. ${esp32_ota.lib_deps}
  272. [env:heltec_v4_tft_room_server]
  273. extends = heltec_v4_tft
  274. build_flags =
  275. ${heltec_v4_tft.build_flags}
  276. -D DISPLAY_CLASS=ST7789LCDDisplay
  277. -D ADVERT_NAME='"Heltec Room"'
  278. -D ADVERT_LAT=0.0
  279. -D ADVERT_LON=0.0
  280. -D ADMIN_PASSWORD='"password"'
  281. -D ROOM_PASSWORD='"hello"'
  282. ; -D MESH_PACKET_LOGGING=1
  283. ; -D MESH_DEBUG=1
  284. build_src_filter = ${heltec_v4_tft.build_src_filter}
  285. +<helpers/ui/ST7789LCDDisplay.cpp>
  286. +<../examples/simple_room_server>
  287. lib_deps =
  288. ${heltec_v4_tft.lib_deps}
  289. ${esp32_ota.lib_deps}
  290. [env:heltec_v4_tft_terminal_chat]
  291. extends = heltec_v4_tft
  292. build_flags =
  293. ${heltec_v4_tft.build_flags}
  294. -D MAX_CONTACTS=350
  295. -D MAX_GROUP_CHANNELS=1
  296. ; -D MESH_PACKET_LOGGING=1
  297. ; -D MESH_DEBUG=1
  298. build_src_filter = ${heltec_v4_tft.build_src_filter}
  299. +<../examples/simple_secure_chat/main.cpp>
  300. lib_deps =
  301. ${heltec_v4_tft.lib_deps}
  302. densaugeo/base64 @ ~1.4.0
  303. [env:heltec_v4_tft_companion_radio_usb]
  304. extends = heltec_v4_tft
  305. build_flags =
  306. ${heltec_v4_tft.build_flags}
  307. -I examples/companion_radio/ui-new
  308. -D MAX_CONTACTS=350
  309. -D MAX_GROUP_CHANNELS=40
  310. -D DISPLAY_CLASS=ST7789LCDDisplay
  311. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  312. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  313. build_src_filter = ${heltec_v4_tft.build_src_filter}
  314. +<helpers/ui/ST7789LCDDisplay.cpp>
  315. +<helpers/ui/MomentaryButton.cpp>
  316. +<../examples/companion_radio/*.cpp>
  317. +<../examples/companion_radio/ui-new/*.cpp>
  318. lib_deps =
  319. ${heltec_v4_tft.lib_deps}
  320. densaugeo/base64 @ ~1.4.0
  321. [env:heltec_v4_tft_companion_radio_ble]
  322. extends = heltec_v4_tft
  323. build_flags =
  324. ${heltec_v4_tft.build_flags}
  325. -I examples/companion_radio/ui-new
  326. -D DISPLAY_CLASS=ST7789LCDDisplay
  327. -D MAX_CONTACTS=350
  328. -D MAX_GROUP_CHANNELS=40
  329. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  330. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  331. -D BLE_DEBUG_LOGGING=1
  332. -D OFFLINE_QUEUE_SIZE=256
  333. ; -D MESH_PACKET_LOGGING=1
  334. ; -D MESH_DEBUG=1
  335. build_src_filter = ${heltec_v4_tft.build_src_filter}
  336. +<helpers/ui/ST7789LCDDisplay.cpp>
  337. +<helpers/ui/MomentaryButton.cpp>
  338. +<helpers/esp32/*.cpp>
  339. +<../examples/companion_radio/*.cpp>
  340. +<../examples/companion_radio/ui-new/*.cpp>
  341. lib_deps =
  342. ${heltec_v4_tft.lib_deps}
  343. densaugeo/base64 @ ~1.4.0
  344. [env:heltec_v4_tft_companion_radio_wifi]
  345. extends = heltec_v4_tft
  346. build_flags =
  347. ${heltec_v4_tft.build_flags}
  348. -I examples/companion_radio/ui-new
  349. -D MAX_CONTACTS=350
  350. -D MAX_GROUP_CHANNELS=40
  351. -D DISPLAY_CLASS=ST7789LCDDisplay
  352. -D WIFI_DEBUG_LOGGING=1
  353. -D WIFI_SSID='"myssid"'
  354. -D WIFI_PWD='"mypwd"'
  355. ; -D MESH_PACKET_LOGGING=1
  356. ; -D MESH_DEBUG=1
  357. build_src_filter = ${heltec_v4_tft.build_src_filter}
  358. +<helpers/ui/ST7789LCDDisplay.cpp>
  359. +<helpers/ui/MomentaryButton.cpp>
  360. +<helpers/esp32/*.cpp>
  361. +<../examples/companion_radio/*.cpp>
  362. +<../examples/companion_radio/ui-new/*.cpp>
  363. lib_deps =
  364. ${heltec_v4_tft.lib_deps}
  365. densaugeo/base64 @ ~1.4.0
  366. [env:heltec_v4_tft_sensor]
  367. extends = heltec_v4_tft
  368. build_flags =
  369. ${heltec_v4_tft.build_flags}
  370. -D ADVERT_NAME='"Heltec v4 Sensor"'
  371. -D ADVERT_LAT=0.0
  372. -D ADVERT_LON=0.0
  373. -D ADMIN_PASSWORD='"password"'
  374. -D ENV_PIN_SDA=3
  375. -D ENV_PIN_SCL=4
  376. -D DISPLAY_CLASS=ST7789LCDDisplay
  377. ; -D MESH_PACKET_LOGGING=1
  378. ; -D MESH_DEBUG=1
  379. build_src_filter = ${heltec_v4_tft.build_src_filter}
  380. +<helpers/ui/ST7789LCDDisplay.cpp>
  381. +<../examples/simple_sensor>
  382. lib_deps =
  383. ${heltec_v4_tft.lib_deps}
  384. ${esp32_ota.lib_deps}