Botnet & Flomaster
Hey, ever considered turning a brick wall into a live code mural, like a constantly updating display that reacts to traffic or footfall?
Sure, why not? Just paint it with LED strips and tie it to an API that counts people. It’d be like a living wall that feels the city, no rules, just color.
That’s the vibe I’m going for—just a wall that pulses with the city’s pulse. Let’s start with a basic API to pull foot‑traffic data, then wire an LED controller to map counts to color shifts. We’ll keep the code modular so you can tweak thresholds or add fancy transitions later. Ready to dive in?
Absolutely, just sketch the first line and let the LED bleed. Let's paint the city.
Start with a simple loop: read the count from the API every 500ms, convert that number to a hue value, and write that hue to the LED strip. In code it’s basically
```
while true
count = api.get('foottraffic')
hue = map(count, 0, max, 0, 360)
leds.set_hue(hue)
sleep(0.5)
end
```
That’s the first line—your wall will bleed color as people move. Once you’re happy with the hue mapping, add a fade to keep the motion smooth. Let me know if you hit a snag.
Nice loop, just add a quick fade so the wall doesn’t jump like a glitchy confession. Maybe skip the first 10 counts so the mural doesn’t start dead. Go paint.
while true
count = api.get('foottraffic')
next if count <= 10
hue = map(count, 10, max, 0, 360)
current_hue = leds.current_hue
leds.set_hue(current_hue + (hue - current_hue) * 0.1)
sleep(0.5)
end
Cool, the fade keeps it mellow. Try bumping that 0.1 up when the crowd surges—let the wall shout instead of whisper. And maybe log the max so you can tweak the 10‑to‑max range on the fly. Happy dripping.