How to make a DIY simple Christmas tree using an ESP32 board and Blynk app

How to make a DIY simple Christmas tree using an ESP32 board and Blynk app

Hello and welcome back. In this project, we will learn how to make a simple Christmas tree using an ESP32 board. I used the ESP32 DEV board and four WS2811 Pixel LEDs for this. To control the lights, I used the Blynk app. This is an IoT (Internet of Things) project, meaning we can control it from anywhere in the world. We can get any color light by mixing the Red, Green, and Blue colors. For more information, you can visit our Pixel LED tutorial. The body of the Christmas tree is made from 5mm foam board, but you can use cardboard or any other material you have. That is a low-cost and very simple project, perfect for anyone!

  • If you want to know what is the ESP32 board and how to use the Blynk app with this board, please use this link.

Ok, let’s do this project step by step. The required components are given below.

Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.

Step1

Firstly, identify these components.

Step 2

Secondly, cut the foam board pieces using the following sizes and cut two Christmas tree-shaped pieces.

Step 3

Thirdly, cut the following parts for the Christmas tree bottom stand. For that, use the sizes below.

Step 4

Now, cut off the 5mm pieces from two pieces on both sides.

Step 5

Next, place the ESP32 board on the breadboard. Then, drill a hole on the side part to power up the ESP32 board.

Step 6

After that, paste this part on the base piece. Then, paste the ESP32 board attached breadboard near the hole.

Step 7

Next, paste the other side pieces on the base part.

Step 8

Then cut and paste one Christmas tree using the following images.

Step 9

Now, mark the middle point of the top part. Then, Paste the Christmas tree at this point.

Step 10

Next, drill four holes near the Christmas tree corners to hold the LEDs.

Step 11

After that, connect the Pixel LEDs to the ESP32 board. For that, use the circuit diagram below. Then, install the LEDs on the top part.

How to make a DIY simple Christmas tree using an ESP32 board and Blynk app

Step 12

Now, let’s set up the Blynk web dashboard step by step. For that, use the following instructions below.

  • First, go to the Blynk website and create a new account using your email. Then, log in to your account.
  • Next, create a new template. You can name it as you like. Also, select the device as ESP32.
  • After, click the Detastreams tab and create three virtual data streams.
  • Name — Red / PIN — V0 / MIN — 0 / MAX — 255
  • Name — Green / PIN — V1 / MIN — 0 / MAX — 255
  • Name — Blue / PIN — V2 / MIN — 0 / MAX — 255
  • Now, click the web dashboard tab and add three slider widgets to the dashboard.
  • Then, click the gear wheel icons on the widgets and select the data streams we created earlier.
  • Finally, click the save button.
  • After that, click the device tab and create a new device using the template you created earlier.
  • Now, you can see the Blynk Auth Token.

Step 13

Next, connect the ESP32 board to the computer. Then, set up the program.

#include <FastLED.h>//include library
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#define BLYNK_PRINT Serial
#define LED 4//num of leds
#define DATAPIN 13//define arduino pin
#define chip WS2811 //chip name
#define colorArrange RGB//color
CRGB pixel [LED];//create array


// Enter your Auth token
char auth[] = "****************";

//Enter your WIFI SSID and password
char ssid[] = "***********";
char pass[] = "***********";

int r, g, b;


void setup() {
  Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
  FastLED.addLeds<chip, DATAPIN, colorArrange >(pixel, LED);//initializing pixel led
}

BLYNK_WRITE(V0) {
  r = param.asInt();
  pixel[0] = CRGB(r, g, b);
  pixel[1] = CRGB(r, g, b);
  pixel[2] = CRGB(r, g, b);
  pixel[3] = CRGB(r, g, b);
  FastLED.show();
}
BLYNK_WRITE(V1) {
  g = param.asInt();
  pixel[0] = CRGB(r, g, b);
  pixel[1] = CRGB(r, g, b);
  pixel[2] = CRGB(r, g, b);
  pixel[3] = CRGB(r, g, b);
  FastLED.show();
}
BLYNK_WRITE(V2) {
  b = param.asInt();
  pixel[0] = CRGB(r, g, b);
  pixel[1] = CRGB(r, g, b);
  pixel[2] = CRGB(r, g, b);
  pixel[3] = CRGB(r, g, b);
  FastLED.show();
}


void loop() {
  Blynk.run();
}
  • Now, copy and paste the Blynk Auth token. Then, enter your WIFI SSID and password.
  • After, select the board and port. Then, click the upload button.

Step 14

Now, let’s set up the Blynk Mobile dashboard. For that, follow the instructions below.

  • First, download and install the Blynk app from the Play Store or App Store. Then, log in to the app using Gmail and password.
  • Now, click the template we created earlier. Then, click the + icon and add three slider widgets to the dashboard.
  • Next, click the one-by-one widget and select the data stream. You can customize these widgets as you like.

OK, the Blynk mobile dashboard is ready.

Step 15

Next, glue the top part to the base part.

Now, you can test this project. For that, power up this Christmas tree using a USB cable. After that, open the Blynk web or mobile dashboard and enjoy this project. The full video guide is below. So, we hope to see you in the next project.

How to make a DIY simple Christmas tree using an ESP32 board and Blynk app

Troubleshooting

  • Check the jumper wire connections.
  • Include the Library files.
  • Check the Blynk Auth token.
  • Check the WIFI SSID and password.

How to make a DIY simple Christmas tree using an ESP32 board and Blynk app

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *