Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESP32 S2 Support #175

Open
wants to merge 2 commits into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

scripts/
tinyGS/tinyGS.ino.cpp
*.log
44 changes: 26 additions & 18 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;PlatformIO Project Configuration File
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
Expand All @@ -9,30 +9,38 @@
; https://docs.platformio.org/page/projectconf.html

[platformio]
src_dir = tinyGS
data_dir = tinyGS/data
src_dir = /Users/tkerby/Github/tinyGS/tinyGS
data_dir = /Users/tkerby/Github/tinyGS/tinyGS/data

[env]
build_flags =
!python git_rev_macro.py
-DMQTT_MAX_PACKET_SIZE=1000
-DCORE_DEBUG_LEVEL=0
-DIOTWEBCONF_DEBUG_DISABLED=1
-DARDUINOJSON_USE_LONG_LONG=1
!python git_rev_macro.py
-DMQTT_MAX_PACKET_SIZE=1000
-DCORE_DEBUG_LEVEL=0
-DIOTWEBCONF_DEBUG_DISABLED=1
-DARDUINOJSON_USE_LONG_LONG=1

# Uncomment these 2 lines by deleting ";" and edit as needed to upload through OTA
;upload_protocol = espota
;upload_port = IP_OF_THE_BOARD



; NOTE: There is no need to change anything below here, the board is configured through the Web panel
; Only make changes if you know what you are doing
[env:heltec_wifi_lora_32]
platform = espressif32
board = heltec_wifi_lora_32
framework = arduino
monitor_speed = 115200
upload_speed = 921600
monitor_port = /dev/ttyUSB*
upload_port = /dev/ttyUSB*
monitor_filters =
log2file
time
default
esp32_exception_decoder
upload_port = /dev/cu.wchusbserial*

[env:s2mini]
platform = espressif32
board = lolin_s2_mini
framework = arduino
monitor_speed = 115200
monitor_filters =
log2file
time
default
esp32_exception_decoder
upload_speed = 921600
6 changes: 5 additions & 1 deletion tinyGS/src/Radio/Radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ bool eInterrupt = true;
bool noisyInterrupt = false;

Radio::Radio()
: spi(VSPI)
#ifdef ESP32-S2
: spi(FSPI)
#else
: spi(VSPI)
#endif
{
}

Expand Down