Skip to content

modern-hobbyist/modern-hexleaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HexLeaf

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.

Hardware List

Software

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.

  1. Open Project in Arduino IDE
  2. Copy credentials_example.h to credentials.h
  3. Set Credentials for WiFi in credentials.h
    char ssid[] = "My WiFi Connection";
    char pass[] = "examplePassword";
    
  4. Download the Blynk app and create a new project
    1. This will create an Auth key for you
  5. Add Blynk Auth key to credentials.h
    char auth[] = "BLYNK AUTH CODE";
    
  6. 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
    
  7. Configure settings in HexLeaf.ino
    #define ID_LIGHT            "NanoLeaf"
    CRGB primary_color = CRGB(0, 153, 204);
    CRGB secondary_color = CRGB(254, 201, 1);
    
  8. Setup the Blynk App
    1. Configure a Button on V2 for power

    2. Configure the ZERGBA on V3 with the MERGE setting

    3. Configure a brightness slider on V1

    4. Configure a 'Segmented Switch' on V0 for:

      1. Primary Mode
      2. Solid Mode
      3. Breathing Mode

      BlynkImage

  9. Plug it in, press Play and control your hexes!
  10. Have Alexa scan for new devices and add the newly found light to any groups you want.
    1. 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."

BlynkImage BlynkImage BlynkImage