CHANGE ESP32 WIFI CREDENTIALS FROM MOBILE

Một phần của tài liệu EXPLORE ESP32 MICROPYTHON python coding arduino coding raspberry pi ESP8266 iot projects android application projects (Trang 108 - 129)

You can change the S with a D to wifi, SSL ID and password from the mobile app. After changing the assessor ID and password, I will turn on and off led to show you this project is running successfully to access the internet via ESP today.

Do we need to connect it to a nearby network? Suppose I have to connect ESP to my home router.

A simple way to provide router access ID and password is wire code. If you are using this technique, then you know that whenever you doubt your password changes, you need to make some changes in code. And as your code changes, then you have to reapply code the code.

That's why I have developed this project where you can connect us with a D two to any network using mobile app. I'm going to use the Bluetooth function of ESP to change wifi name and password. Let's start with the catering

ceremony, opening the Google browser search for things we don't pump.

I have already account. If you don't tell them, create first to your email and password. And signing. I have created DeGeneres before create new tenant. I signed any name I'm going to assign yes. With they do best. Make sure field one boxes checked, scroll it down. And save cannon

to make sure what is running successfully or not click on API keys from API keys. Copy. I tell food.

Control C open new tab based here, change field one value to any of new medical value, like 99, enter, open your things speaks or what, but I will view you will see same or lose in period level. Mentors or what is working now close that no, Deb next step is to create mobile app or creating a web open new tab search for MIT app inventor.

Create apps, start new project assigned name. I'm going to assign ESP to test,

press. Okay.

This is the homepage of MIT app inventor from user interface. Take list picker, change properties change wit to fill parent, please. Okay. Jenny fold change font. Change font size and now change text Jen specs to connect to Bluetooth. from layout

change, parameter change to feel better and do same procedure. One more

time. Dan take one, one more. and change a bit to feel burdened from user interface. Take level lazier. take one more level and place into the next next box. Less text book one and text box to change. Parameter of level one change with, to feel parent fund and on-site.

Then speaks to society. Select text box one select phone to work on-site is 20 with which is feel pattern. It is hint. do same thing just with the next box change, take sides, font, and wit, and text to password. Do same procedure with the X-Box too. Okay. From layout. change parameter to

take label and take change with it. It is text. I'm not going to use this label change button barometer with, to fill parent foreign sites. It's 20 use font, bold and change text two. And that

from layout take coriander regimen. Change parameter with, to fill parent same from layout, take vertical arrangement. Um, I'm going to do this, put it under regiment five. Okay. Lit select vertical arrangement change with two full parent. This. Okay. Take two and take one more, more than three and place below, but then too, Jenny parameter of going to change with two will parent risk. Okay. Change font size to 20. Change change X to L E D on those same procedure with button three,

instead of led on 10, takes two led of From connectivity, select Bluetooth plane mode will appear at below.

Now half part is done. Next part is connection log Magnum. From block, select variable. First take initiative, global name and change variable. Name to S ID and second variable name to password. Select from text, we're able to condition a done now from list picker, one select list picker, one dot before

picking, and let's pick one after picking. so let's, let's pick her one and say list we one, not eliminate to block from Bluetooth. Plant one, select Bluetooth client, one dot address and names. From the speaker one select block. Okay.

Set list. Bigger one dot selection to block. And from Bluetooth client one select call Bluetooth client one dot connect. And select address from let's pick out one blog, these pick bigger one dot selection. So like button one, button, one click function. When button one is click, we are going to send. As his ID and password said necessarily take a society from textbooks. One dot text.

And say global password from X-Box dot texts, textbooks to dot texts from Bluetooth client one select. Call center call due to plan one, doc, send text going stream.

they can distinct assign in middle. Now get what the variable for two variable is a society. And second variable it's password safe, globalized society, and get, get globalized society and get global password in middle tech comma.

We are going to send this to everyone to Now, when we turn to it's click. This is led on button. Now we have to say URL first set. We have one dot URL from text, take empty string in this thing. We are going to copy you, Aaron.

And from one call with one dot get function, button to function is ready. We need this URL. Copy this URL from things. Speak server,

click on API keys. Copy this right. Jennifer URL, copy control C and based here. Control V. Jen filled one value from zero to one. This function is ready.

Now make a duplicate of this function,

instant of button too. Right. But then three, this is led off function and change string failed one. It will do one. Two failed one equal to zero.

What entry function is also ready? What block diagram is ready now,

download the app from build and save Epic and fire to my computer.

I'm going to save on next door. I didn't see many mites.

Now you can see they pick a file more this, a bigger file to your mobile copy.

Open my computer, opening their mobile. Internal storage and based in any Florida install this app and your mobile open file manager, open Epic FIS it.

We'll see dot APK. Yes and open mobile app is ready.

Now, next part is to write ESP 32 code from file. Create new file closed previous one. Okay. No, save this file. First use any folder I signed name same. Now write the code to save time. I have already died this code. You can download this code from Udo description. Control a copy and paste here.

We need to make few changes before install this code.

First channel number copied channel number from things with server open

things, speak.

click on API keys. You will see channel ID

control C copy, open ID DoubleClick, close update, play and control V.

Now next it, that API key, same copy from things with et cetera, open

Arduino ID. Okay. Double click and paste. Next part is your router, SSL ID and password. First you can assign any . Afterwards, we can change this SSI, then password from mobile app. This is the password. Don't change the

meaning part of the code connect ESP hundred two to your comfort.

From tools, select board I already selected board is ESP 32. They model and

same from tools,

select communication poll compote. In my case com port is 12. Now upload the code.

It will take some time. Code is uploaded. Make a connection. As per the circuit diagram, you can download the circuit diagram from the description below with the alphabet board,

I will develop this circuit diagram. There are two LEDs and one switch switches used to change the password of the router. Green entity is used to indicate we are in Bluetooth mode and ready, ready, ready? It used to on an awful purpose, I'm going to power this circuit using compote. Final output.

First, I'm going to turn on my mobile hotspot. If you see SSI ID and

password, this is the same, which I have used in program this. Okay. Now.

Open mobile app. I said the circuit.

Now, if you press on the red led will done on same. If you press done led, we're done up now. I'm going to change. Password off router. I'm going to change SSI society to any name like M M M five times M. And I'm going to change password any number like eight times nine. and press okay. Now open mobile app. Now, if I turn on led, if I press led on led will not turn on because our ESP 32 is not connected to any network. Now what I'm going to do, I'm going to change password first, down on Bluetooth.

You will see here because I already paired with this with a do. If you are using, if you are, your device is not where your device is available in available devices.

Open app one more time. And if you press connect to BT switch, you will see ESP t-to device here.

No. Now first pressed switch to enter into the Bluetooth mode. Green green.

Ready? We'll turn on to indicate we are in Bluetooth mode now please connect to Bluetooth switch, press ESP 32 and now type SSI ID and

password, and now type new SSI ID and password as society is five times M and password. Is it eight times nine? Right. Green led will turn off when this access ID and password is successfully.

The seal now plays led on led will turn on and press a lady off. Uh, Lily will turn off, turn off. You can change password as many times as you want.

Download the MicroPython firmware

We'll be discussing how to install microbiomes and framework to ESP 32.

Same way. You can also install two ESP ADU, double six. For that you need a framework open any of the browser and go to micro biden.org website. You can go to downloads under download tab.

There are so many boards and it's frame where you can download out of that.

You have to find four. Expressive ESP based bots. It is categorized based upon the board, which you have. You can download the frame where in my case, I'm using ESP 32 Borneo. So I'm clicking on gender ESP 32 module available here. these governments are very important commands. These commands will be using on the coming week.

So just come do the frame where right now we have a lot of options available. So these first few it is showing is unstable. That means let us torsion that they're working on it. So if you wanted to work with the latest one, you can choose any of them. If you under the use with the stable version, you can go with any of this. So I am just trying with, uh, the latest one. I'm going to use this unstable one for right now. So I'm just going download. I can save to download folder name. You can change otherwise, just keep it.

Yeah. The extension of this file is being filed. I'm just saving this. If you are using USB a two double six, you can go to download and under expressive baseboards, you can go to ESP ADW, six module. From there, you can download the latest versions so you can download this and you can use it.

Một phần của tài liệu EXPLORE ESP32 MICROPYTHON python coding arduino coding raspberry pi ESP8266 iot projects android application projects (Trang 108 - 129)

Tải bản đầy đủ (PDF)

(347 trang)