This project is my attempt to create my own NanoLeafs based on NanoLeafs and by adding alexa to it. This will allow me to not only control the colors and brightness of the lights with the Blynk app, but to also turn them on/off with Alexa. These lights will be in my home office, so I can say "Alexa, turn on the office" and she will turn all my office lights on, including the HexLeaf setup.
- ESP32 Dev Module
- WS2811 Led Strip
- Buck Converter
- LED Connector
- 12V Power Supply
- AnyCubic i3 Mega 3d Printer
This software uses the FastLED library and some custom classes to construct an array of HexNodes which can each be set to an individual color. There are a few things to configure in the code before you can get started, so make sure to download this project and open it up in the Arduino IDE.
- Open Project in Arduino IDE
- Copy
credentials_example.h
tocredentials.h
- Set Credentials for WiFi in
credentials.h
char ssid[] = "My WiFi Connection"; char pass[] = "examplePassword";
- Download the Blynk app and create a new project
- This will create an Auth key for you
- Add Blynk Auth key to
credentials.h
char auth[] = "BLYNK AUTH CODE";
- Configure settings in
Nanohex.h
/* Number of LEDs in each box/leaf */ #define LEDS_IN_BOX 7 /*The number of boxes */ #define NUM_BOXES 8 /*The pin the LED is connected to */ #define LED_PIN 27
- Configure settings in
HexLeaf.ino
#define ID_LIGHT "NanoLeaf" CRGB primary_color = CRGB(0, 153, 204); CRGB secondary_color = CRGB(254, 201, 1);
- Setup the Blynk App
- Plug it in, press Play and control your hexes!
- Have Alexa scan for new devices and add the newly found light to any groups you want.
- I have an "Office" group so I can turn all my lights on and off by saying "Alexa, start up the office" or "Alexa, shut down the office."