platformio.ini 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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_BOARD_SDA=17
  24. -D PIN_BOARD_SCL=18
  25. -D PIN_USER_BTN=0
  26. -D PIN_VEXT_EN=36
  27. -D PIN_VEXT_EN_ACTIVE=HIGH
  28. -D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm.
  29. -D SX126X_DIO2_AS_RF_SWITCH=true
  30. -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  31. -D SX126X_CURRENT_LIMIT=140
  32. -D SX126X_RX_BOOSTED_GAIN=1
  33. -D PIN_GPS_RX=38
  34. -D PIN_GPS_TX=39
  35. -D PIN_GPS_RESET=42
  36. -D PIN_GPS_RESET_ACTIVE=LOW
  37. -D PIN_GPS_EN=34
  38. -D PIN_GPS_EN_ACTIVE=LOW
  39. -D ENV_INCLUDE_GPS=1
  40. -D PIN_ADC_CTRL=37
  41. -D PIN_VBAT_READ=1
  42. build_src_filter = ${esp32_base.build_src_filter}
  43. +<../variants/heltec_v4>
  44. +<helpers/sensors>
  45. lib_deps =
  46. ${esp32_base.lib_deps}
  47. ${sensor_base.lib_deps}
  48. [env:heltec_v4_repeater]
  49. extends = Heltec_lora32_v4
  50. build_flags =
  51. ${Heltec_lora32_v4.build_flags}
  52. -D DISPLAY_CLASS=SSD1306Display
  53. -D ADVERT_NAME='"Heltec Repeater"'
  54. -D ADVERT_LAT=0.0
  55. -D ADVERT_LON=0.0
  56. -D ADMIN_PASSWORD='"password"'
  57. -D MAX_NEIGHBOURS=8
  58. ; -D MESH_PACKET_LOGGING=1
  59. ; -D MESH_DEBUG=1
  60. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  61. +<helpers/ui/SSD1306Display.cpp>
  62. +<../examples/simple_repeater>
  63. lib_deps =
  64. ${Heltec_lora32_v4.lib_deps}
  65. ${esp32_ota.lib_deps}
  66. bakercp/CRC32 @ ^2.0.0
  67. [env:heltec_v4_repeater_bridge_espnow]
  68. extends = Heltec_lora32_v4
  69. build_flags =
  70. ${Heltec_lora32_v4.build_flags}
  71. -D DISPLAY_CLASS=SSD1306Display
  72. -D ADVERT_NAME='"ESPNow Bridge"'
  73. -D ADVERT_LAT=0.0
  74. -D ADVERT_LON=0.0
  75. -D ADMIN_PASSWORD='"password"'
  76. -D MAX_NEIGHBOURS=8
  77. -D WITH_ESPNOW_BRIDGE=1
  78. -D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
  79. ; -D MESH_PACKET_LOGGING=1
  80. ; -D MESH_DEBUG=1
  81. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  82. +<helpers/bridges/ESPNowBridge.cpp>
  83. +<helpers/ui/SSD1306Display.cpp>
  84. +<../examples/simple_repeater>
  85. lib_deps =
  86. ${Heltec_lora32_v4.lib_deps}
  87. ${esp32_ota.lib_deps}
  88. [env:heltec_v4_room_server]
  89. extends = Heltec_lora32_v4
  90. build_flags =
  91. ${Heltec_lora32_v4.build_flags}
  92. -D DISPLAY_CLASS=SSD1306Display
  93. -D ADVERT_NAME='"Heltec Room"'
  94. -D ADVERT_LAT=0.0
  95. -D ADVERT_LON=0.0
  96. -D ADMIN_PASSWORD='"password"'
  97. -D ROOM_PASSWORD='"hello"'
  98. ; -D MESH_PACKET_LOGGING=1
  99. ; -D MESH_DEBUG=1
  100. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  101. +<helpers/ui/SSD1306Display.cpp>
  102. +<../examples/simple_room_server>
  103. lib_deps =
  104. ${Heltec_lora32_v4.lib_deps}
  105. ${esp32_ota.lib_deps}
  106. [env:heltec_v4_terminal_chat]
  107. extends = Heltec_lora32_v4
  108. build_flags =
  109. ${Heltec_lora32_v4.build_flags}
  110. -D MAX_CONTACTS=300
  111. -D MAX_GROUP_CHANNELS=1
  112. ; -D MESH_PACKET_LOGGING=1
  113. ; -D MESH_DEBUG=1
  114. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  115. +<../examples/simple_secure_chat/main.cpp>
  116. lib_deps =
  117. ${Heltec_lora32_v4.lib_deps}
  118. densaugeo/base64 @ ~1.4.0
  119. [env:heltec_v4_companion_radio_usb]
  120. extends = Heltec_lora32_v4
  121. build_flags =
  122. ${Heltec_lora32_v4.build_flags}
  123. -I examples/companion_radio/ui-new
  124. -D MAX_CONTACTS=300
  125. -D MAX_GROUP_CHANNELS=8
  126. -D DISPLAY_CLASS=SSD1306Display
  127. ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
  128. ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
  129. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  130. +<helpers/ui/SSD1306Display.cpp>
  131. +<helpers/ui/MomentaryButton.cpp>
  132. +<../examples/companion_radio/*.cpp>
  133. +<../examples/companion_radio/ui-new/*.cpp>
  134. lib_deps =
  135. ${Heltec_lora32_v4.lib_deps}
  136. densaugeo/base64 @ ~1.4.0
  137. [env:heltec_v4_companion_radio_ble]
  138. extends = Heltec_lora32_v4
  139. build_flags =
  140. ${Heltec_lora32_v4.build_flags}
  141. -I examples/companion_radio/ui-new
  142. -D MAX_CONTACTS=300
  143. -D MAX_GROUP_CHANNELS=8
  144. -D DISPLAY_CLASS=SSD1306Display
  145. -D BLE_PIN_CODE=123456 ; dynamic, random PIN
  146. -D AUTO_SHUTDOWN_MILLIVOLTS=3400
  147. -D BLE_DEBUG_LOGGING=1
  148. -D OFFLINE_QUEUE_SIZE=256
  149. ; -D MESH_PACKET_LOGGING=1
  150. ; -D MESH_DEBUG=1
  151. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  152. +<helpers/ui/SSD1306Display.cpp>
  153. +<helpers/ui/MomentaryButton.cpp>
  154. +<helpers/esp32/*.cpp>
  155. +<../examples/companion_radio/*.cpp>
  156. +<../examples/companion_radio/ui-new/*.cpp>
  157. lib_deps =
  158. ${Heltec_lora32_v4.lib_deps}
  159. densaugeo/base64 @ ~1.4.0
  160. [env:heltec_v4_companion_radio_wifi]
  161. extends = Heltec_lora32_v4
  162. build_flags =
  163. ${Heltec_lora32_v4.build_flags}
  164. -I examples/companion_radio/ui-new
  165. -D MAX_CONTACTS=300
  166. -D MAX_GROUP_CHANNELS=8
  167. -D DISPLAY_CLASS=SSD1306Display
  168. -D WIFI_DEBUG_LOGGING=1
  169. -D WIFI_SSID='"myssid"'
  170. -D WIFI_PWD='"mypwd"'
  171. ; -D MESH_PACKET_LOGGING=1
  172. ; -D MESH_DEBUG=1
  173. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  174. +<helpers/ui/SSD1306Display.cpp>
  175. +<helpers/ui/MomentaryButton.cpp>
  176. +<helpers/esp32/*.cpp>
  177. +<../examples/companion_radio/*.cpp>
  178. +<../examples/companion_radio/ui-new/*.cpp>
  179. lib_deps =
  180. ${Heltec_lora32_v4.lib_deps}
  181. densaugeo/base64 @ ~1.4.0
  182. [env:heltec_v4_sensor]
  183. extends = Heltec_lora32_v4
  184. build_flags =
  185. ${Heltec_lora32_v4.build_flags}
  186. -D ADVERT_NAME='"Heltec v3 Sensor"'
  187. -D ADVERT_LAT=0.0
  188. -D ADVERT_LON=0.0
  189. -D ADMIN_PASSWORD='"password"'
  190. -D ENV_PIN_SDA=3
  191. -D ENV_PIN_SCL=4
  192. -D DISPLAY_CLASS=SSD1306Display
  193. ; -D MESH_PACKET_LOGGING=1
  194. ; -D MESH_DEBUG=1
  195. build_src_filter = ${Heltec_lora32_v4.build_src_filter}
  196. +<helpers/ui/SSD1306Display.cpp>
  197. +<../examples/simple_sensor>
  198. lib_deps =
  199. ${Heltec_lora32_v4.lib_deps}
  200. ${esp32_ota.lib_deps}