Add multi-panel Pico UDP firmware and Python LED control.

Pico panels get static IPs on 10.1.1.10–14 with per-panel LED counts, Makefile deploy targets, and Python examples for animations, sync tests, and direct Pi SPI control.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-28 22:46:08 +12:00
parent d8323bb9a3
commit d5cab2efdf
52 changed files with 4677 additions and 1 deletions

View File

@@ -0,0 +1,53 @@
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
/* Matches adapter/code.py — W5500 on SPI1, WS2812 on GP27 */
#define PIN_LED_STATUS 25
#define SPI_PORT spi1
#define SPI_CLK_MHZ 20
#define PIN_CS 9
#define PIN_SCK 10
#define PIN_MOSI 11
#define PIN_MISO 12
#define PIN_RST 13
#ifndef PIN_WS2812
#define PIN_WS2812 27
#endif
#ifndef NUM_LEDS
#define NUM_LEDS 405
#endif
#define LED_RGB_BYTES (NUM_LEDS * 3)
/* W5500 socket assignments */
#define SOCKET_DHCP 0
#define SOCKET_UDP 1
/* UDP port (same as CircuitPython adapter) */
#define UDP_PORT 50007
/* Compile-time panel index for filtered frames (04). 255 = accept all. */
#ifndef PANEL_ID
#define PANEL_ID 255
#endif
/* 1 = DHCP, 0 = static IP below */
#ifndef USE_DHCP
#define USE_DHCP 0
#endif
#define STATIC_IP_OCT4 ((PANEL_ID) == 255 ? 19u : (10u + (unsigned)(PANEL_ID)))
#define STATIC_IP {10, 1, 1, (uint8_t)STATIC_IP_OCT4}
#define STATIC_SN {255, 255, 255, 0}
#define STATIC_GW {10, 1, 1, 1}
#define STATIC_DNS {10, 1, 1, 1}
/* Locally administered; last byte = PANEL_ID (unique per panel 04). */
#define MAC_ADDR {0x02, 0x50, 0x52, 0x54, 0x4C, (uint8_t)PANEL_ID}
#endif