Eloquence today, I will tell you how to use Blink 2.0 application to control the.
In this video, I also sold our different problems associated with the programming related to Node MCU
and Blink 2.0.
So for that purpose, first, you have to create a count on blink.
Like I just open the platform here.
You have to first create a account or here, just click on Start free.
I already have an account.
I just log in or here.
You can also create a new account when you log in or here.
You have to just click on new template.
Let's say I just use.
Smart.
Or let's see a lady on off.
Okay.
Over here.
You can put any description.
Just done it as you see over here.
We got a lady on off here.
You.
You get all the details related to your hardware and connection.
Then you just go to data stream and blink application.
That is blink 2.0 only.
Virtual pins are available means you have to set what should happen, and you have to read that virtual
pin in your program.
I also show you how we can do that.
So first you have to create new string.
Only virtual pins are there.
So right now over here, you have to name it.
Let's see a lady.
Then over here.
This is my opinion.
Right now PIN number zero is selected.
Zero is selected.
You can select it.
And over here we have data type.
You can use integer double or right now I'm just using integer type.
Just create this.
And as you see, once green is created or you can see one virtual pin is assigned that is visio.
Next, you have to go to your webcast board over here.
You can drag and drop your switch.
Freely available are switch and slider and some display like this.
And over here it is labeled.
And these are freely available.
You can add as number of as which is like over here I see right now.
So I just delete I am just using only one right now.
So in this case, you have to just assign your data stream over here.
Go to settings.
This is my switch.
You can name it.
And over here, this is led with zero.
That is my data stream.
You can also put on and off label over here.
And you can check from here like this.
And you also hide this.
That is your label.
Right now, I just put a zero.
Just saved this part from the dashboard.
Now we just go to our code.
So first I have to save it.
Save?
This is saved.
Now just search.
Go to search.
Over here.
You have to create this form template.
Select the one off that is already created.
Just create as you see.
Or here you got three parts.
That is blank.
Template ID link device Name.
Link.
Authentication token.
You require these three in your code.
So just copy this clipboard.
Go to the code.
Over here.
I just copy this.
Remove the previous one.
So this is from the code or here?
This is from the code.
So I just again, go over here.
This is my load on off.
And when I click on this, I got this dashboard.
So from search, every time, if you want to work with your dashboard, so just go to search and go
over here.
This is my dashboard.
So now.
Just to go through the program.
I just explained this in this program.
This part comes from the dashboard or your project ID then define blink, underscore print serial,
include your SB 826 verify library include blink simply 8266 library over here the authentication code
and this part is your or your verify.
This is your verify login and this is password.
In my case, this is my login and this is my password.
And over here this is the main code.
This part is the main part.
So over here, blink underscore, right.
Virtual pin zero is selected.
And because I'm working with integer value and value, just assign a variable.
Right now, I'll just assign a name value.
And over here it is equal to bottom.
Dot is.
As integer.
Okay.
And then I went, Let's see, really, if you want to check, I'll put on your serial monitor.
Then you can use this or you can remove also just use this.
Then if this value, this variable value that comes from v zero is equal to one.
In that case, they still write own pin number 16.
Hi.
Basically, these these numbers where you can say PIN numbers comes from node MCU.
Node node MCU.
You know, maximum case.
In maximum case, the users confused with these PIN numbers like in every video available on YouTube,
they just use the 765 and the code will create some error.
So over here, as you see, I'm just using 16.
This is the general purpose input output number 4d04d0.
In we have 16 number for D one pin, we have five, number 42, we have four for the three it is zero
and before it is two.
So like this you have to put these numbers inside your code.
So right now I'm just using 616 that is my distal pin zero.
So when value is equal to one it will write high on my 16th pin means they still pin zero.
I just remove it also because it is not needed over here.
Then if value is equal to zero, in that case it will write low on this pin zero.
The number for this zero is 60.
So this is the mean error available in every video.
They didn't tell you what we have to assign over here does use D seven, d6b5 and it will create some
error.
And now over here we have will set up serial begin.
This is the board rate for node MCU.
Then blink begin or here authentication ID as ID and password.
Then over here you have to set your pin mode right now.
PIN more.
That is my pin and it is working as a output.
So this is my final code.
Now you connect your node MCU with your PC.
Right now I'm connecting my load MCU.
So you have to when you are working with Node MCU, you have to add Blink Library also to your Arduino
ID.
So I already did that and you have to select your board.
I select my board SB module already over here and you have to select your home port like this.
Then just check and see.
So I was always.
Filing is done.
So just download this code to your node MCU and connect a positive bin to the zero of node MCU and negative
bin to the ground of Node MCU.
Take some time.
As you see right now, it is connecting 7%, 15%, 23%, 30%.
It is 100%.
It will ask me to hard reset your.
Resettlement.
Or the city.
Where is it?
So you just disconnect your node MCU from USB and again connect and also put reset on off.
Once only.
So right now you just go to your.
Blink console and when you own it, Lady Will goes on when you're off it.
Lady Will goes off.
So this is for dashboard part.
For the mobile application, you have to go to your play store and install the link application to your
system and login your credentials.
So over here also you have your own on off app.
In this app, you have to just go to click on your template.
And over here you just have a editing option in this editing option.
Just go to a lady on Off and over here we have a gear option, and on the gear option you have to just
add a button when you add a button to your application.
It demands data stream that is already created.
So select that led v zero data pin.
Just make it in the settings push or switch.
So I just go to switch.
Close this back.
And when I hit on run button from the app as you see.
I just remove the header.
So when I right now I'm controlling it from my mobile phone so you can see it on the dashboard also.
It is on, off, on, off.
And the LED also goes on and off.
So this is forcing the lid if you want to work with multiple panes like.
You want to control multiple relays, multiple switches.
In that case, you have to first go to your amp plate, select this or here you have to create more
data streams.
So I just go to edit over here right now, create new data stream like or here I'll just use virtual
PIN.
In this case, my loved one is there and the pin is as you see, V zero is already used.
I just select the one, just create it.
So over here we have the one data stream.
Go to web dashboard.
Over here you can just select another switch, select data stream for it.
So we already used select v one again, save it.
So over here, this is my second switch.
And in the program you just make two changes.
First, just copy this code from here to here.
And raised it.
Right now we in place of zero we have we won and the value or here the variable we'll use or use.
So I just we'll in place of this.
And the PIN number I'm just using from the node MCU.
Let's see right now for the d04 16 and for the one I just use five over here.
So I just put five over here.
So put Node over here in the second one over here to put five and four here.
Five.
And just add on the node copy place.
As you see here it is five just.
Download the code or burn the code to your node MCU and just connect your led host in another led host
pin to your.
D one.
Because we use the one pin over here.
So when it is done, you can also add on another button to your mobile application.
So I just adding by click on plus button.
And over here also you have to select the data stream that is our.
The one can you read a stream is.
Even right now it is done.
So you have to reset.
You have been.
And when I just own, it will own.
And when I just off it, we off.
So over here we also save it.
Right now it is not saved.
So you have to just select the data stream.
So as you see here, I just go to search.
This is my.
Control or template.
So when I own it, my first lady goes on and I own this.
My second lady goes on.
And right now I'm just controlling from my mobile app.
As you see, it is off, off, on, on.
So this is how you can control multiple LEDs using new Blink application.
That is blink 2.0.
That is all about for this.
Thank you.