4531 views|3 replies

85

Posts

0

Resources
The OP
 

【Zero Knowledge ESP8266】Tutorial: Mobile APP Control RGB LED [Copy link]

This time, we use the combination of blynk app + server (local) + zero-knowledge ESP8266 development board to control the RGB LED to display various colors through the mobile phone APP.

1. Hardware preparation

(1) Zero-knowledge ESP8266 development board

(2) RGB LED

(3) Several DuPont lines

2. Circuit connection

The wiring is very simple, corresponding to R-D5, G-D6, B-D7, which corresponds to the pin settings of the controls in the Blynk app:

3. Mobile APP

For detailed description of mobile APP and Blynk, please refer to: http://www.lingzhilab.com/bbs/index/showonepostz?pid=356

4. Software

(1) Mobile phone

Create a new project using Blynk, select the device NodeMCU or ESP8266, and then add the ZERGBA control as follows:

(2) The ESP8266 end is as follows:

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
 
 
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
 
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xx";
 
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xx";
char pass[] = "xx";
 
char local_domain[] = "192.168.0.111";
 
 
 
void setup()
{
        // Debug console
        Serial.begin(9600);
         
        Blynk.begin(auth, ssid, pass, local_domain,8080);
         
         
         
}
 
void loop()
{
        Blynk.run();
         
}

The above code only requires you to fill in your own TOKEN, wifi hotspot name and password.

5. Test verification

(1) In the Zero-Knowledge Development Tool, open the serial port debugging window and see the following information:

This indicates that we have successfully communicated with the server.

(2) On the Blynk app on your phone, click the Run button to start running. Then you can control the RGB LED to display various colors:

More detailed information can be obtained for free on the official website of Zero Knowledge Laboratory.

This content is originally created by EEWORLD forum user roc2 . If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source

二维码.png (34.92 KB, downloads: 0)

二维码.png
This post is from DIY/Open Source Hardware

Latest reply

Take time to play   Details Published on 2019-6-24 08:25
 

5791

Posts

44

Resources
2
 

Not bad, not bad, looks fun

This post is from DIY/Open Source Hardware
Personal signature

射频【放大器】

 
 

85

Posts

0

Resources
3
 
btty038 posted on 2019-6-21 16:16 Not bad, it looks very interesting

Then give it a try~

This post is from DIY/Open Source Hardware

Comments

Take time to play  Details Published on 2019-6-24 08:25
 
 
 

5791

Posts

44

Resources
4
 
roc2 posted on 2019-6-22 10:45 Then give it a try~

Take time to play

This post is from DIY/Open Source Hardware
Personal signature

射频【放大器】

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list