Help me I want to connect LED+NodeMCU+Blynk

I am a beginner of blynk, I want to control On-Off to the LED light by using NodeMCU and Blynk

Now my arduino is installed for NodeMCU board now, but I don’t have a code of it,
please show me the code and tell the process to connect it with blynk. I don’t know anything
My teacher want to see it from me very soon, please help me

1 Like

Hi…

so this is very basic. NodeMCU and blynk? So you want use the ESP8266, right?
You need on the hardware-side:

  • a ESP8266 (obviously). A 01 is sufficient
  • a LED
  • a resistor (470 Ohm should work)
  • a FTDI or an arduino (for uploading the script to the ESP)
  • some wifi-connection

On the software-side:

  • Arduino App
  • ESP Board add-on install as decribed here in the very first paragraph (i.e. “Installing with boards manager”)
  • Blynk library installed (download as ZIP and install from within arduino and added via ->sketch->include library->ZIP). Afterwards restart arduino
  • Blynk app of course

After that it’s easy going.

  • you solder the resistor to the positive side of the LED.
  • in Arduino you take the basic example for the ESP standalone: File->example->blynk->boards’n’shields->ESP standalone.
  • you modify two parts of the example:
    a) auth token (you get one in the app upon creation of a new project, where you also have to define the ESP8266 as the board to work with).
    b) the wifi info (SSID as well as password)
  • You upload the code via the arduino app (remember to select right board type and com port)
  • connect the led with the resistor to GPIO2 on the plus side and to ground on minus, power cycle the ESP and let it load the new firmware
  • in Blynk you chose the new project, add a button, choose digital GP2 and make it a switch
  • run the project and… blynk.

:smile:

4 Likes

Oh !!
can’t believe it’s work now
Thank you very much Minc
I really appreciate your help :smiley:

1 Like

Wow! Thanks for such a detailed step by step guide!

Can we hire you for writing tutorials? :slight_smile:

2 Likes

Very very Well Minc!

Now, we increase the difficulty
Can you tell us, how to use more than one ESP8266-01 in Blynk?
I´m asking the same question in the community, but may be you
have a different strategic

Thanks

This is sooo cool! I had a long term goal of figuring this out, but I stumbled upon this when searching for something else. I followed your steps and it ‘just worked’. Thanks much!