From c17d0fffba18957d4ce07e7b39bed37b537fa5eb Mon Sep 17 00:00:00 2001 From: witnessmenow Date: Sat, 18 Nov 2023 18:49:30 +0000 Subject: [PATCH] Moving to a generic display implementation, added Matrix support --- .github/workflows/build-deploy-webflash.yml | 44 ++- GitHubPages/index.html | 8 +- README.md | 139 +++++++-- SpotifyDiyThing/CYD28_TouchscreenR.cpp | 237 +++++++++++++++ SpotifyDiyThing/CYD28_TouchscreenR.h | 88 ++++++ SpotifyDiyThing/SpotifyDiyThing.ino | 249 +++++----------- SpotifyDiyThing/cheapYellowLCD.h | 308 ++++++++++++++++++++ SpotifyDiyThing/displayCode.h | 229 --------------- SpotifyDiyThing/matrixDisplay.h | 264 +++++++++++++++++ SpotifyDiyThing/nfc.h | 29 +- SpotifyDiyThing/spotifyDisplay.h | 68 +++++ SpotifyDiyThing/spotifyLogic.h | 128 ++++++++ SpotifyDiyThing/touchScreen.h | 38 ++- 13 files changed, 1377 insertions(+), 452 deletions(-) create mode 100644 SpotifyDiyThing/CYD28_TouchscreenR.cpp create mode 100644 SpotifyDiyThing/CYD28_TouchscreenR.h create mode 100644 SpotifyDiyThing/cheapYellowLCD.h delete mode 100644 SpotifyDiyThing/displayCode.h create mode 100644 SpotifyDiyThing/matrixDisplay.h create mode 100644 SpotifyDiyThing/spotifyDisplay.h create mode 100644 SpotifyDiyThing/spotifyLogic.h diff --git a/.github/workflows/build-deploy-webflash.yml b/.github/workflows/build-deploy-webflash.yml index 946f350..a23ca70 100644 --- a/.github/workflows/build-deploy-webflash.yml +++ b/.github/workflows/build-deploy-webflash.yml @@ -62,7 +62,8 @@ jobs: - name: ESP_DoubleResetDetector - name: ArduinoJson - name: JPEGDEC - - name: XPT2046_Touchscreen + - name: Seeed_Arduino_NFC + source-url: https://github.com/witnessmenow/Seeed_Arduino_NFC.git sketch-paths: | - SpotifyDiyThing enable-warnings-report: true @@ -90,6 +91,47 @@ jobs: # Using a version agnostic search to find the file. grep -m 1 makes sure only one file is copied in case multiple versions are installed. find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -type f | grep -i -m 1 boot_app0.bin$ | xargs -i cp {} GitHubPages/ESPWebTools/cyd + # Build Matrix Arduino Code + - uses: arduino/compile-sketches@v1 + name: Compile Matrix code + with: + fqbn: "esp32:esp32:esp32" + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + # No need to specify ESP-libraries as these are installed with the platform (on the line above). + # Just need to specify the matrix specific libraries, the others are already installed. + libraries: | + - name: ESP32 HUB75 LED MATRIX PANEL DMA Display + source-url: https://github.com/witnessmenow/ESP32-HUB75-MatrixPanel-I2S-DMA.git + - name: Adafruit GFX Library + sketch-paths: | + - SpotifyDiyThing + enable-warnings-report: true + verbose: false + cli-compile-flags: | + - --build-property + - compiler.cpp.extra_flags=-DMATRIX_DISPLAY + - --export-binaries + + # Copy binaries to GitHubPages folder for publishing + - name: Copy compiled binaries to Matrix + run: | + # Make matrix directory + mkdir GitHubPages/ESPWebTools/matrix + + # Copy the manifest file for the matrix + cp GitHubPages/ESPWebTools/manifest.json GitHubPages/ESPWebTools/matrix + + cd SpotifyDiyThing/build + find . -print | grep -i .bin$ | xargs -i cp --parent {} ../../GitHubPages/ESPWebTools/matrix + cd ../.. + + # Copy boot_app0.bin to the esp32Firmware folder. This file will be common for all esp32 boards (i think) + # Using a version agnostic search to find the file. grep -m 1 makes sure only one file is copied in case multiple versions are installed. + find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -type f | grep -i -m 1 boot_app0.bin$ | xargs -i cp {} GitHubPages/ESPWebTools/matrix + + # Build GitHub Page - name: Setup Github Page uses: actions/configure-pages@v3 diff --git a/GitHubPages/index.html b/GitHubPages/index.html index 81a20ba..d369b75 100644 --- a/GitHubPages/index.html +++ b/GitHubPages/index.html @@ -17,9 +17,15 @@

Spotify DIY Thing


- + CYD +
+ Matrix + + +
NOTE: Make sure to close anything using your devices com port (e.g. Serial monitor)