0% found this document useful (0 votes)
2 views1 page

Blynk Arduino

This document contains a simple Arduino sketch that connects to the Blynk platform using a serial connection. It includes an authentication token and sets up three output pins, with a button widget controlling one of the pins (pin 11) based on the button's state. The loop function continuously runs Blynk's processing to maintain the connection and handle incoming commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Blynk Arduino

This document contains a simple Arduino sketch that connects to the Blynk platform using a serial connection. It includes an authentication token and sets up three output pins, with a button widget controlling one of the pins (pin 11) based on the button's state. The loop function continuously runs Blynk's processing to maintain the connection and handle incoming commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include <BlynkSimpleStream.

h>

// You should get Auth Token in the Blynk App.


// Go to the Project Settings (nut icon).
char auth[] = "3NyiiB8i6r6EWvRfuS43nSb8NGexA9KH";

void setup()
{
Serial.begin(9600);
Blynk.begin(auth, Serial);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
}

BLYNK_WRITE(V1) //Button Widget is writing to pin V1


{
int pinData = param.asInt();
if(pinData==1){
digitalWrite(11, HIGH);
}else{
digitalWrite(11, LOW);
}
}

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

You might also like