[{"element_type":"text","content":"\n        \u003ch2\u003eIntroduction\u003c/h2\u003e\n\u003cp\u003eThis project will use a Sparkle Motion Mini, two time of flight detectors, an I\u003csup\u003e2\u003c/sup\u003eC extender, and 4m of neopixels to create a staircase which lights up as users pass by. The system can be integrated into \u003ca href=\"https://homeassistant.io\"\u003eHome Assistant\u003c/a\u003e, an open source, popular home control system. This allows the lights to automatically be turned on as users pass by or by any other automation within Home Assistant, giving much more flexibility to the use of the lights.\u0026nbsp;\u003cspan\u003eThe Sparkle Motion Mini is flashed with\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://esphome.io\"\u003eESPHome\u003c/a\u003e\u003cspan\u003e\u0026nbsp;(instead of\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://kno.wled.ge/\"\u003eWLED\u003c/a\u003e\u003cspan\u003e), allowing easier addition of the time of flight detectors to the Sparkle Motion Mini without requiring a separate microcontroller for those.\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eThe idea is to mount lights on each side of the staircase that will light up as a person goes up or down the staircase. I'm using 60 LED/m RGBW strips (sk6812) and a diffusion channel to try to make the lights appear evenly lit all the way up the staircase. However, you could use any other kind of strip (RGB, RGBW, non-RGB, COB) you wanted and change the following yaml file to match. There is even NEON tubing-like RGB lights which may not even need a diffusion channel.\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eAt the top and bottom of the staircase will be a VL53L0X time-of-flight (ToF) detector, providing a break beam system to determine when a person walks by. I employ an I\u003csup\u003e2\u003c/sup\u003eC extender to allow one of the ToF\u0026nbsp; sensors to be over 2 meters away from the microcontroller and still function properly.\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n      ","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6160","metadata":{"name":"Sparkle Motion Mini","url":"https://www.adafruit.com/product/6160","description":"An ESP32-based device made for driving 5V Neopixels, which has I2C connector for adding other devices.","quantity":"1","featured":false}},{"element_type":"product","content":"https://www.adafruit.com/product/3317","metadata":{"name":"VL53L0X Time of Flight Detector","url":"https://www.adafruit.com/product/3317","description":"The VL53L0X is a Time of Flight distance sensor that contains a very tiny invisible laser source, and a matching sensor. The VL53L0X can detect the \"time of flight\", or how long the light has taken to bounce back to the sensor.","quantity":"2","featured":false}},{"element_type":"product","content":"https://www.adafruit.com/product/4756","metadata":{"name":"LTC4311 I2C Extender","url":"https://www.adafruit.com/product/4756","description":"An I2C extender allowing you to separate the I2C from the microcontroller by longer distances.","quantity":"1","featured":false}},{"element_type":"product","content":"https://www.adafruit.com/product/2842","metadata":{"name":"Adafruit NeoPixel Digital RGBW LED Strip - White PCB 60 LED/m 4m","url":"https://www.adafruit.com/product/2842","description":"4 Meters of neopixels","quantity":"1","featured":false}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://www.amazon.com/dp/B0CPM3FFHZ\" class=\"parts-name\" target=\"_blank\"\u003eMuzata 5 pack LED channel\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003eThe LED diffusion channel to mount on the stairs \u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://www.amazon.com/dp/B0CPM3FFHZ\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Muzata 5 pack LED channel","url":"https://www.amazon.com/dp/B0CPM3FFHZ","description":"The LED diffusion channel to mount on the stairs ","quantity":"1"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eFlashing ESPHome\u0026nbsp;\u003c/h2\u003e\n\u003cp\u003eThe SparkleMotion Mini will be flashed with\u0026nbsp;\u003ca href=\"https://esphome.io\" target=\"_blank\"\u003eESPHome\u003c/a\u003e. \u003cspan\u003eESPHome is an open-source firmware framework that simplifies the process of creating custom firmware for popular WiFi-enabled microcontrollers. Devices running ESPHome can be automatically detected by Home Assistant making automation easy.\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eThe easiest way to install ESPHome on the Sparkle Motion Mini is to use the ESPHome add-on inside Home Assistant. The instructions to do this are outside the scope of this guide, but you can find the instructions \u003ca href=\"https://esphome.io/guides/getting_started_hassio\" target=\"_blank\"\u003ehere\u003c/a\u003e.\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eIf you don't wish to use Home Assistant, you can manually add ESPHome by following the manual installation instructions \u003ca href=\"https://esphome.io/guides/installing_esphome\" target=\"_blank\"\u003ehere\u003c/a\u003e.\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eIn order to use ESPHome on the Sparkle Motion Mini we need to create a YAML file, which defines the properties and devices hooked to the Sparkle Motion Mini. This YAML file is then used by ESPHome to create the actual code that will run on the device. \u003c/span\u003e\u003cspan\u003eThe YAML file will add support for the SK6812 LEDs, the time of flight detectors, and set up basic animations.\u003c/span\u003e\u003c/p\u003e\n\u003ch3\u003e\u003cspan\u003eYAML\u003c/span\u003e\u003c/h3\u003e\n\u003cp\u003e\u003cspan\u003eThe first\u0026nbsp;\u003c/span\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\u003cspan\u003eesphome:\u003cbr\u003e  name: sparkle-motion-mini\u003cbr\u003e  friendly_name: Sparkle Motion Mini\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe yaml file consists of ...\u003cspan\u003e\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n","metadata":{}}]