Files
led-hoop/c/src/main.c
T
jimmyandClaude Opus 5.5 bf0429c505 Embed gzipped web assets at build time and type LED edit commands.
Generate the web UI headers from c/web/ via scripts/embed_file.py (minify + gzip) and serve them with Content-Encoding, replacing the checked-in web_*.h blobs. Move the LED driver/presets into lib/leds, and parse preset edits into a typed cmd_preset_t on core0 instead of passing raw JSON to core1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:18:10 +13:00

39 lines
769 B
C

#include <stdio.h>
#include "pico/stdlib.h"
#include "pico/multicore.h"
#include "pico/cyw43_arch.h"
#include "ap.h"
#include "web.h"
#include "led_core.h"
#include "cmd_queue.h"
int main() {
stdio_init_all();
sleep_ms(200);
while (cyw43_arch_init()) {
printf("cyw43_arch_init failed; retrying...\n");
sleep_ms(1000);
}
printf("led_hoop: Soft-AP + web + LEDs\n");
cmd_queue_init();
multicore_launch_core1(led_core_entry);
ap_start();
web_start();
unsigned count = 0;
while (true) {
/* Keep core0 responsive for cyw43 background; light status print */
if (count % 20 == 0) {
printf("core0 alive count=%u\n", count);
}
count++;
sleep_ms(500);
}
}