Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
DIY Projects Lab
Published © CC BY-NC-SA

Make Esp8266 Mood Light

In this project, I’ll show you how you can build your own mood light. You’ll use an ESP8266 to remotely control the color of your light

BeginnerFull instructions provided2 hours1,686
Make Esp8266 Mood Light

Things used in this project

Story

Read more

Schematics

circuit Design

Code

Code snippet #1

Plain text
#include <Adafruit_NeoPixel.h>
#include <SPI.h>
#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>

#define PIN D4
#define NUMPIXELS 12
#define BLYNK_PRINT Serial
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup()
{

Serial.begin(9600);
Blynk.begin("uBUTHEDUYUAMVbe3vNeqHhoIi5gqvRBc", "ZTE_2.4G_C7u3c4", "Diyprojectslab");
pixels.begin();
}
BLYNK_WRITE(V4)
{

int R = param[0].asInt();
int G = param[1].asInt();
int B = param[2].asInt();
Serial.println(R);
Serial.println(G);
Serial.println(B);
for(int i=0;i<NUMPIXELS;i++){

pixels.setPixelColor(i, pixels.Color(R,G,B));

pixels.show();
}
}

void loop()
{
Blynk.run();
}

Credits

DIY Projects Lab

DIY Projects Lab

41 projects • 157 followers
I am a DIY hobbyist by passion and an Electronics Engineer by profession. Sponsor (PCB Manufacturer) - www.nextpcb.com

Comments