try starting with a simple basic sketch. add in some serial prints to see what is going on. Make sure your Zebra Widget is set to Virtual Pin 2. How are the LEDs wired?
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[]="auth";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[]="sidd";
char pass[]="pasword";
// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial
// set AT+CWMODE=1
// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200
ESP8266 wifi(&Serial);
int r;
int b;
int g;
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
Serial.begin(ESP8266_BAUD);
delay(20);
pinMode(6,OUTPUT) ;
pinMode(9,OUTPUT) ;
pinMode(11,OUTPUT) ;
Blynk.begin(auth, wifi, ssid, pass);
}
BLYNK_WRITE(V2)
{
r=param[0].asInt();
g=param[1].asInt();
b=param[2].asInt();
Serial.println(r);
Serial.println(g);
Serial.println(b);
analogWrite(6,b);
analogWrite(9,r);
analogWrite(11,g);
}
void loop()
{
Blynk.run();
}
@Kitty_Visser my advice is to stop doing the one line posts to the topic. They mean nothing to the people reading the post and, certainly in my case, put people off responding to your topic.
When you PM’d me regarding posting etiquette, I said:
When you create the new topic please provide ALL of the relevant information that is asked for, and provide links to other relevant topics is necessary.
You haven’t done that, and haven’t even provided the basic information that is requested in the template that appears when you create a new topic.
I’d suggest that you take a step back and attempt to outline what it is that you are attempting to achieve with your project. Explain the hardware that you are using, including the type of LED strips that you are using, and how you are driving them (are you using MOSFETS, or attempting to drive them directly from your GPIOs).
Explain what type of widget is attached to each virtual pin, and what function that widget is supposed to provide.
This is all in addition to the missing information about hardware, library versions, app versions and all the other things that are requested for a new topic.
Your initial code includes no pinMode declarations, so won’t work for that reason. Having digitalWrites in your void loop is not a good idea when using Blynk.