How to control RGB LED by Phone | Blynk IoT app

RGB Led Control Using Smartphone

Circuit Diagram:

rgb led control

Code:

#define BLYNK_TEMPLATE_ID "***********" //copy id from blynk cloud web template and paste here
#define BLYNK_DEVICE_NAME "***********" //copy id from blynk cloud web template and paste here

#define BLYNK_FIRMWARE_VERSION        "0.1.2"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

const int redled = 16;//D0
const int greenled = 5;//D1
const int blueled = 14;//D5


#include "BlynkEdgent.h"

BLYNK_WRITE(V0)

{
 int pinValue_R = param.asInt(); // assigning incoming value from pin V0 to a variable

  analogWrite(redled,pinValue_R);

}
BLYNK_WRITE(V1)

{
 int pinValue_G = param.asInt(); // assigning incoming value from pin V1 to a variable

  analogWrite(greenled,pinValue_G);
}
BLYNK_WRITE(V2)

{
 int pinValue_B = param.asInt(); // assigning incoming value from pin V2 to a variable

  analogWrite(blueled,pinValue_B);
}

void setup()
{
  Serial.begin(115200);
  delay(100);
  
  BlynkEdgent.begin();
}

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