Wifi Connection making easy

Hello,
So I have been working on a project. I have made a device but I am now facing a new problem.
I am using esp8266 and arduino uno

I have a device which needs to be connected to internet in order to check live data .
But I am planning on moving this device very often so that will be a problem because everytime I move the device to a new place I will have to write the new SSID and PASSWORD to the device which is hard. So I have two solutions which I want to try.

I will attach an external keyboard to the device and everytime I move It will enter new SSID and PASSWORD to the device. (Can be done Easily.)

I some how make my device hotstop connect my mobile to it and feed new SSID and PASSWORD to the device . Need Your Help GUyz .

Regards

Umair78:
I some how make my device hotstop connect my mobile to it and feed new SSID and PASSWORD to the device .

Unless you happen to need a keyboard attached to your ESP8266 for other purposes, you are much better off with this sort of approach. What you do is put the ESP8266 in AP mode and then connect to the ESP8266's access point with your mobile. The ESP8266 runs a webserver that serves a configuration web page. You open that page with the browser on your mobile and input the SSID, password, and any other configuration values you might like.

To make things even easier, you can create a captive portal, so that no matter which URL you load in the browser when connected to the ESP8266's AP, it will load the configuration page. That way you don't need to know a specific IP address to load in your browser.

There is a nice library that makes all this very easy:

I am now facing a new problem...I am using esp8266 and arduino uno

Hmm.. yes, that is a problem. I would get rid of the Uno.

I'm only half joking. I really would get rid of the Uno. Use an esp8266-based board like Wemos Mini. No need for Uno, and your whole project gets simpler.

Plus, when uploading your sketch to the esp rather than the Uno, you can use the "WiFiManager" library. This tries to connect using the previous network it successfully connected to, but if that fails, it switches to AP mode, allowing you to connect to it using your smartphone and enter a new SSID & password.

I don't know if a similar thing is available if using an esp via an Uno.

EDIT: pert beat me to it. Curse my slow fingers!

PaulRB makes a very good point. I didn't mean to imply that you can use the WiFiManager library on the Uno. You need to program the ESP8266 directly to use that library.

so maybe we should first ask how does OP use the esp8266 with Uno

I am using uno/mega for one reason mainly.

in future i have to attach alot of sensors to my device.

What sensors?

You can connect a lot of sensors to an esp if you know how.

how do you use the esp8266? with what firmware or programmed with Arduino?