BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

New beginner here..how to control 4 LED on/off with blynk, uno , ESP8266?

hi all friends…
need help in my first project with blynk. My project is control 4 output LED with blynk app
i use hardware arduino uno , ESP8266 and blynk app.
i try start with simple example coding from Blynk example coding library but not sure which one to use.
can any one suggest to me which one Blynk example coding suitable for my project?

thanks

Welcome to the Blynk forum.

For the Sketch Builder, start with the first and work your way through them all :wink: You can try to start with a particular project in mind, but until you get a basic understanding of the most basic Blynk commands and structures, you may find it harder to do.

Here is one of the examples that starts with blinking Virtual LED’s in the App, but you can just as easily include physical LEDS by adding pinMode() and digitalWrite() commands:

https://examples.blynk.cc/?board=Arduino%20Uno&shield=ESP8266%20WiFi%20Shield&example=Widgets%2FLED%2FLED_Blink

2 Likes

ok thanks friend…
but what meaning led1(V1)? normally i use this command led1=10; that mean led1 at D10 arduino.
V1 = ?

v1 or vxx are virtual pins.
http://docs.blynk.cc/#blynk-main-operations-virtual-pins

ok thanks friends…i think i start get clear about this…let me try this example project…thanks for helping…:blush:

you should master really good the theory behind virtual pins, because they are one of the key elements in blynk world…

yes u right…need more time to be master hahaha…:blush:

I admire your courage to respond the same answer to different people multiple times a day. :grin:

hahaha…

At the beginning of the sketch it is shown as WidgetLED led1(V1); Led1 is a generic name to reference a virtual LED widget that has been assigned to virtual pin V1 on the App

It could just as easily be MyLED(V0) or Blue(V8) etc.

Then in later code you would control that widget by a command such as led1.on(); or led1.off(); or vary the “brightness” with a command led1.setValue(127); // set for half intensity

http://docs.blynk.cc/#widgets-displays-led

hi firend…i already try example code LED widget on V1. i using arduino uno and ESP8266.
why my device always online and offline…intermittent online/offline…
i setting my blynk app
HARDWARE MODEL = ARDUINO UNO
CONNECTION TYPE = WIFI

it’s correct ?

Bonjour;
J’avais le même problème avec vous!!!
je contrôle une maison intelligente !!

@zennouche please don’t tag a “me too” comment on to the end of a topic that is two and a half years old.

Create a new topic with full details of your hardware, code, serial output, baud rate settings etc.

Pete.