A modular NanoLeaf lights that not only allows you to make any NanoLeaf shape using as many or as little segments as you want, but you can also use the same identical modular segments to create a 4-digit display, which can be used to display the time, temperature, humidity, or pretty much anything you want!
There is a video associated with this repository/project, I highly recommend watching it before using this repo.
You simply just need to go to here, press install and follow the instructions.
Keep in mind, that you don't need to do any of the steps below if you are just creating a NanoLeaf shape. For the code for any NanoLeaf shape, see Code for any custom NanoLeaf shape.
Please note, in the video (time: 13:37
) I go through and show the exact steps on how to upload and use the code for the 4-digit display. Below is just a short text version.
- Install VSCode.
- In VSCode, install the
PlatformIO IDE
extension. - Clone/download this repo.
- Open the
/WLED
directory in VSCode. - There are two changes you need to make before uploading the code:
- In
WLED/platformio.ini
, under the[env:esp32dev]
environment, change theupload_port
to your micro-controller port. - In
WLED/usermods/NanoLeaf_Display/usermod_nanoleaf_display.h
, change theADDR_LEDS_PER_SEG
variable to the number of addressable LED sections there are in your LED strip. Below is an illustration to explain this further. In the example below, there are 3 sections, since there are 2 cut marks, so if you were to cut the LED strip on the cut marks, you will get 3 seperate sections, this is the number you need to set theADDR_LEDS_PER_SEG
variable to.
- In
- Now you can upload the code.
- For the setup you need to do on the phone and how to use the usermod settings to control the 4-digit display, refer to the video (time:
14:42
).
- ESP32, for the micro-controller.
- 12V 8A, power supply.
- LM2596 or any step down converter, to convert 12V to 5V for the ESP32. Remember to use the screw on this component to adjust its output voltage to 5V using a voltmeter.
- LED strip, the specific one used in this project is the
WS2811
LED strip. Each segment requires 15cm long LED strip. For the 4-digit display, you will need at least 5 meters. - 1000μF capacitor, across the LED strip.
- A4 3mm matte opal acrylic sheets (x7), used to get the glowing effect. I recommend getting extra A4 sheets just in case something bad happens...
- Refer to Acrylic sheet shape to see what shape you need to cut from the acrylic sheets.
- DHT11(optional), used to get the temperature and humidity when using the 4-digit display.
- Power switch, to turn on and off.
- M2 bolts, to attach the lid to the main housing part. They can be from 8mm to 12mm long.
- 20 AWG flexible silicon wires, for connecting segments together.
- Dupont crimping tool, the tool used to make the dupont connectors.
Please refer to the /3d_printing
directory.
To cut the acrylic to the correct shape, print this A4 sheet. To ensure you have printed it to the correct scale, measure the top size of the shape, which should be 12 cm
.