Files
Jonathan BennettGitHubThomas Göttgenscoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>IxitxachitlCopilot Autofix powered by AI
8d1fbbf55f Snake! (#10936)
* Snake!

* Add spiLock to snake score saving

* Check fixes

* More careful locking

* WIP: Big Display Node

* Update src/graphics/HUB75Display.cpp

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add HUB75 Native

* Add Tetris game module with core logic and UI integration

- Implement TetrisGame class for game logic, including piece movement, rotation, and line clearing.
- Create TetrisModule class to manage game state, input handling, and rendering on OLED display.
- Introduce high score tracking with persistence and optional mesh broadcasting.
- Define UI states for title, playing, paused, game over, and high scores.
- Implement input handling for game controls and state transitions.
- Add rendering functions for the game board, high scores, and title screen.

* feat(snake): add snake graphics and update display logic in SnakeModule

* Prompt for Initials for Tetris, too

* refactor games module

* Games refactor

* hub75 native double buffer

* Games tuning

* Make joystick repeat events on held button

* Add clouds and colors

* Fix breakout and more color

* difficulty tuning

* trunk

* refactor game announcements, etc

* Scale chirpy gravity as game speed increases

* Portduino, check for hub75 display before reading in hub75 options

* Final(?) games tuning

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Properly ignore input when games screen not shown

* Fail gracefully when HUB75 is selected but not supported.

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Ixitxachitl <kramerfm@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-16 18:35:33 -05:00

67 lines
1.8 KiB
C

// Big Visualizer - ESP32-S3-DevKitC-1 (N16R8) driving a 128x64 HUB75 RGB matrix
// via the seengreat "RGB Matrix Adapter Board (E)" Rev. 2.2 (V2.x), plus a
// Wio-SX1262 (for XIAO, Seeed p/n 6379) LoRa header board.
#define BUTTON_PIN 0
#define I2C_SDA 41
#define I2C_SCL 42
// --- Display: HUB75 via seengreat Shield (V2.x, hard-wired) -----------------
#define HAS_SPI_TFT 1 // enable the color BaseUI path (TFTColorRegions/theming)
#define DISPLAY_FORCE_SMALL_FONTS // 128x64 panel: keep OLED-sized fonts, not big TFT fonts
#define USE_HUB75 // select HUB75Display in Screen.cpp
#define TFT_WIDTH 128
#define TFT_HEIGHT 64
#define HUB75_BRIGHTNESS_DEFAULT 180
// RGB data lines.
// This panel is BGR: R and B are swapped per half vs. the nominal seengreat
// mapping (R1<->B1, R2<->B2), verified at bring-up. Software-only fix; the
// shield board is unchanged. G / address / control lines stay as routed.
#define HUB75_R1 17
#define HUB75_G1 8
#define HUB75_B1 18
#define HUB75_R2 15
#define HUB75_G2 1
#define HUB75_B2 16
// Row-address lines (1/32 scan -> A..E)
#define HUB75_A 7
#define HUB75_B 48
#define HUB75_C 6
#define HUB75_D 47
#define HUB75_E 2
// Control lines
#define HUB75_CLK 5
#define HUB75_LAT 21
#define HUB75_OE 4
// --- Radio: Wio-SX1262 for XIAO (header board, Seeed p/n 6379) ---------------
#define USE_SX1262
#define LORA_SCK 12
#define LORA_MISO 13
#define LORA_MOSI 11
#define LORA_CS 10
#define LORA_RESET 9
#define LORA_DIO1 40
#define SX126X_CS LORA_CS
#define SX126X_SCK LORA_SCK
#define SX126X_MOSI LORA_MOSI
#define SX126X_MISO LORA_MISO
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY 14
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_RXEN 39
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_MAX_POWER 22
#define LED_HEARTBEAT 38