https://github.com/notnite/lightning
Torture me with the power of RGB LEDs
https://github.com/notnite/lightning
Last synced: 5 months ago
JSON representation
Torture me with the power of RGB LEDs
- Host: GitHub
- URL: https://github.com/notnite/lightning
- Owner: NotNite
- Created: 2024-01-01T22:47:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T01:59:40.000Z (over 1 year ago)
- Last Synced: 2025-05-05T23:16:42.173Z (about 1 year ago)
- Language: Rust
- Size: 31.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lightning
torturing myself with LED lights
## HTTP API
GET `https://soulja-boy-told.me/light`, send query params `r` `g` `b` `a`. all required between 0-255
## WebAssembly
POST `https://soulja-boy-told.me/light` send the WASM file as the body. API:
- `size() -> u32`
- `get_pixel(idx: u32) -> u32`
- `set_pixel(idx: u32, col: u32)`
- `time() -> u64`
- returns unix time in ms
you export a `tick(elapsed: f32)`, where elapsed is the seconds since program started (NOT delta time!). program runs for 30 seconds. colors in format `0xRRGGBB`, idx from zero to the return value of `size()`. compile to wasm32