[{"data":1,"prerenderedAt":85},["ShallowReactive",2],{"page:\u002Farticles\u002Fpico-light-bulbs":3},{"id":4,"title":5,"author":6,"body":10,"cover":71,"date":72,"description":73,"extension":74,"head":75,"layout":78,"meta":79,"navigation":80,"path":81,"seo":82,"stem":83,"__hash__":84},"pages\u002Farticles\u002F31.pico-light-bulbs.md","Building Pico-Controlled Smart Lights",{"name":7,"avatarUrl":8,"link":9},"Likun Cai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103620968?v=4","https:\u002F\u002Fgithub.com\u002FAlchemist-Aloha",{"type":11,"value":12,"toc":67},"minimark",[13,17,25,32,55,58],[14,15,5],"h1",{"id":16},"building-pico-controlled-smart-lights",[18,19,20,24],"p",{},[21,22,23],"code",{},"rp2040_ws2812_led_controller"," is a MicroPython lighting controller built around a Raspberry Pi Pico, an LD2410 presence sensor, an SSD1306 OLED, and a WS2812 LED strip. Physical buttons change brightness and operating mode, while a second Pico can receive infrared remote commands and forward them over UART.",[18,26,27,28,31],{},"The OLED menu exposes 24 color and animation modes, from warm white and solid colors to breathing, rainbow, chase, comet, fire, ocean, and twinkle effects. Brightness, run mode, and color mode are saved to ",[21,29,30],{},"light_config.json"," and restored on boot. Missing or invalid saved data falls back to built-in defaults.",[18,33,34,35,38,39,42,43,46,47,54],{},"The source is divided by responsibility: ",[21,36,37],{},"ld2410.py"," handles the presence sensor, ",[21,40,41],{},"ssd1306.py"," drives the display, and ",[21,44,45],{},"main.py"," connects inputs, menus, persistence, and LED output. The companion ",[48,49,53],"a",{"href":50,"rel":51},"https:\u002F\u002Fgithub.com\u002FAlchemist-Aloha\u002Fpico_ir_receiver",[52],"nofollow","pico_ir_receiver"," repository contains the dedicated remote-control board.",[18,56,57],{},"This is real hardware, so the useful knobs should remain adjustable. Presence thresholds, LED count, brightness limits, UART pins, and saved defaults depend on the room, power supply, strip, and sensor placement. Validate current draw before enabling high brightness across a long strip.",[18,59,60,61,66],{},"Visit the ",[48,62,65],{"href":63,"rel":64},"https:\u002F\u002Fgithub.com\u002FAlchemist-Aloha\u002Frp2040_ws2812_led_controller",[52],"Pico Light Bulbs repository"," for the MicroPython source and menu behavior.",{"title":68,"searchDepth":69,"depth":69,"links":70},"",2,[],"\u002Farticles\u002Fpico-hardware-cover.webp","2026-08-12T00:31:00.000Z","Combine presence sensing, an OLED menu, saved modes, WS2812 LEDs, buttons, and a second Pico for infrared control.","md",{"title":76},{"Pico Light Bulbs":77},"Presence-Aware WS2812 Control in MicroPython","page",{},true,"\u002Farticles\u002Fpico-light-bulbs",{"title":5,"description":73},"articles\u002F31.pico-light-bulbs","pyZdHFBk4k1VhjzJKwNY4u8DQUEGyCADKo-PniSdXWI",1786980373679]