Всем доброго времени суток!
Возникла проблема. Постоянные дисконекты.
Использую NodeMCU v3 esp8266 c USB разъемом. RGB светодиодную ленту WS2812b.
Смартфон на Android 9.
Библиотека Blynk 0.6.1
Использую сервер Blynk
Использую стандартный пример для NeoPixel
/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
Control a color gradient on NeoPixel strip using a slider!
For this example you need NeoPixel library:
https://github.com/adafruit/Adafruit_NeoPixel
App project setup:
Slider widget (0...500) on V1
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Adafruit_NeoPixel.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "mytoknvjY";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "myssid";
char pass[] = "mypass";
#define PIN 8
Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, PIN, NEO_GRB + NEO_KHZ800);
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if (WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if (WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}
BLYNK_WRITE(V1)
{
int shift = param.asInt();
for (int i = 0; i < strip.numPixels(); i++)
{
strip.setPixelColor(i, Wheel(shift & 255));
// OR: strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + shift) & 255));
}
strip.show();
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
strip.begin();
strip.show();
}
void loop()
{
Blynk.run();
}
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.1 on NodeMCU
[624] Connecting to blynk-cloud.com:80
[1239] Ready (ping: 253ms).
*⸮⸮⸮⸮Z⸮⸮[46] Connecting to tosyak
[550] Connected to WiFi
[550] IP: 192.168.0.103
[550]