From 3caaa62128f0562f4033fda17e81f88ab0eb58bf Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 14 Jul 2023 13:27:50 -0400 Subject: [PATCH 1/2] test build --- .gitignore | 2 -- platformio.ini | 1 + rename_usb_config.py | 16 ++++++++++++++++ src/Wippersnapper_demo.ino | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 rename_usb_config.py create mode 100644 src/Wippersnapper_demo.ino diff --git a/.gitignore b/.gitignore index c47eb26ce..4ab1f2a5d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,8 +35,6 @@ *.bak html/* -# Clang-format Python Script -*.py # VSCode artifacts .vscode/* diff --git a/platformio.ini b/platformio.ini index 2347c8393..3013b98a7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -49,6 +49,7 @@ lib_deps = https://github.com/Sensirion/arduino-i2c-scd4x.git https://github.com/Sensirion/arduino-i2c-sen5x.git https://github.com/adafruit/WiFiNINA.git + https://github.com/Starmbi/hp_BH1750.git ; Common build environment for ESP32 platform [common:esp32] diff --git a/rename_usb_config.py b/rename_usb_config.py new file mode 100644 index 000000000..a8c6009a1 --- /dev/null +++ b/rename_usb_config.py @@ -0,0 +1,16 @@ +# Renames tinyusb's tusb_config.h to tusb_config.h_backup for PlatformIO build environments using TinyUSB +# see: https://github.com/platformio/platform-espressif32/issues/809#issuecomment-1132079120 +import os + +Import("env") + +adafruit_usb_config = os.path.join( + env.subst("$PROJECT_LIBDEPS_DIR"), + env.subst("$PIOENV"), + "Adafruit TinyUSB Library", + "src", + "tusb_config.h", +) + +if os.path.isfile(adafruit_usb_config): + os.rename(adafruit_usb_config, adafruit_usb_config + "_backup") \ No newline at end of file diff --git a/src/Wippersnapper_demo.ino b/src/Wippersnapper_demo.ino new file mode 100644 index 000000000..489a3d96c --- /dev/null +++ b/src/Wippersnapper_demo.ino @@ -0,0 +1,35 @@ +// Adafruit IO WipperSnapper Beta +// +// +// NOTE: This software is a BETA release and in active development. +// Please report bugs or errors to https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/issues +// +// +// Adafruit invests time and resources providing this open source code. +// Please support Adafruit and open source hardware by purchasing +// products from Adafruit! +// +// Brent Rubell for Adafruit Industries, 2021-2022 +// +// All text above must be included in any redistribution. + +#include "Wippersnapper_Networking.h" +Wippersnapper_WiFi wipper; + +// Enable debug output for beta builds +#define WS_DEBUG + +void setup() { + // Provisioning must occur prior to serial init. + wipper.provision(); + + Serial.begin(115200); + //while (!Serial) delay(10); + + wipper.connect(); + +} + +void loop() { + wipper.run(); +} \ No newline at end of file From 43dc4d4a83e148e679922a3e0b345d3d354fc858 Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 14 Jul 2023 13:29:24 -0400 Subject: [PATCH 2/2] push for env. --- rename_usb_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rename_usb_config.py b/rename_usb_config.py index a8c6009a1..874b03e59 100644 --- a/rename_usb_config.py +++ b/rename_usb_config.py @@ -1,5 +1,5 @@ # Renames tinyusb's tusb_config.h to tusb_config.h_backup for PlatformIO build environments using TinyUSB -# see: https://github.com/platformio/platform-espressif32/issues/809#issuecomment-1132079120 +# https://github.com/platformio/platform-espressif32/issues/809#issuecomment-1132079120 import os Import("env")