Skip to content

Commit

Permalink
Fix Arduino IDE compilation + esp8266 core version (#94)
Browse files Browse the repository at this point in the history
- Add additional ESP32-xx boards.
  • Loading branch information
AronHetLam authored Nov 4, 2023
1 parent 438a9cd commit 9a057ce
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 6 deletions.
8 changes: 8 additions & 0 deletions ATEM_tally_light/ATEM_tally_light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
// #define DEBUG_LED_STRIP
#define FASTLED_ALLOW_INTERRUPTS 0

#ifndef CHIP_FAMILY
#define CHIP_FAMILY "Unknown"
#endif

#ifndef VERSION
#define VERSION "Unknown"
#endif

#ifdef TALLY_TEST_SERVER
#define DISPLAY_NAME "Tally Test server"
#else
Expand Down
4 changes: 2 additions & 2 deletions ATEM_tally_light/ATEM_tally_light.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

#include "Arduino.h"
#include "Improv_wifi/ImprovWiFiLibrary.h"
#include "ImprovWiFiLibrary.h"

//Perform initial setup on power on
//Handle the change of states in the program
Expand Down Expand Up @@ -69,4 +69,4 @@ void setWiFi(String ssid, String pwd);
// void improvCallback(improv::ImprovCommand d);
//Commented out for users without batteries - Also timer is not done properly
//Main loop for things that should work every second
// void batteryLoop();
// void batteryLoop();
2 changes: 1 addition & 1 deletion gh-pages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
$ bundle exec jekyll build
$ bundle exec jekyll serve
```
Serve will hot reload the site on [127.0.0.1:4000](127.0.0.1:4000)
Serve will hot reload the site on [127.0.0.1:4000](127.0.0.1:4000)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void ImprovWiFi::getAvailableWifiNetworks()
{
std::vector<std::string> wifinetworks = {
WiFi.SSID(id).c_str(),
std::to_string(WiFi.RSSI(id)),
String(WiFi.RSSI(id)).c_str(),
( WiFi.encryptionType(id) == WIFI_OPEN ? "NO" : "YES")
};

Expand Down
File renamed without changes.
File renamed without changes.
56 changes: 54 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = ESP8266, ESP8266_test_server, ESP32, ESP32_test_server
default_envs = ESP8266, ESP8266_test_server, ESP32, ESP32_test_server, ESP32_C3, ESP32_S2, ESP32_S3, ESP32_C3_test_server, ESP32_S2_test_server, ESP32_S3_test_server
src_dir = $PROJECT_DIR/ATEM_tally_light
lib_dir = $PROJECT_DIR/libraries

Expand All @@ -21,11 +21,13 @@ monitor_speed = 115200
extra_scripts =
post:pio_scripts/publish_binaries.py

; General platform builds

[env:ESP8266]
build_flags =
-D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
-D CHIP_FAMILY='"ESP8266"'
platform = espressif8266
platform = espressif8266@2.6.3
board = d1_mini
board_build.f_cpu = 160000000L
custom_web_flasher_name = Tally light
Expand All @@ -51,10 +53,60 @@ build_flags =
-D TALLY_TEST_SERVER
custom_web_flasher_name = Tally test server

[env:ESP32_C3]
build_flags =
-D CHIP_FAMILY='"ESP32-C3"'
-D TALLY_DATA_PIN=4
platform = espressif32
board = esp32-c3-devkitc-02
custom_web_flasher_name = Tally light

[env:ESP32_C3_test_server]
extends = env:ESP32_C3
build_flags =
${env:ESP32_C3.build_flags}
-D TALLY_TEST_SERVER
custom_web_flasher_name = Tally test server

[env:ESP32_S2]
build_flags =
-D CHIP_FAMILY='"ESP32-S2"'
platform = espressif32
board = esp32-s2-kaluga-1
custom_web_flasher_name = Tally light

[env:ESP32_S2_test_server]
extends = env:ESP32_S2
build_flags =
${env:ESP32_S2.build_flags}
-D TALLY_TEST_SERVER
custom_web_flasher_name = Tally test server

[env:ESP32_S3]
build_flags =
-D CHIP_FAMILY='"ESP32-S3"'
platform = espressif32
board = esp32-s3-devkitc-1
custom_web_flasher_name = Tally light

[env:ESP32_S3_test_server]
extends = env:ESP32_S3
build_flags =
${env:ESP32_S3.build_flags}
-D TALLY_TEST_SERVER
custom_web_flasher_name = Tally test server

; Board specific builds

[env:ATOM_Matrix]
build_flags =
-D CHIP_FAMILY='"ESP32"'
-D PIN_RED1=22
-D PIN_GREEN1=19
-D PIN_BLUE1=23
-D PIN_RED2=32
-D PIN_GREEN2=26
-D PIN_BLUE2=33
-D TALLY_DATA_PIN=27
platform = espressif32
board = m5stack-atom
Expand Down

0 comments on commit 9a057ce

Please sign in to comment.