Use blynk anywhere

Hello everyone,

I would like to know if it’s possible to use blynk with mobile data (4G) or use another wifi than the one at home ? Should I write some lines in the code ?
Thank for your help.

You can use your phone’s hotspot to provide internet connectivity for your device and carry it everywhere.

Some info about the type of device you’re planning to use would be helpful.

Pete.

Oh yes, I created a light cube which give me the temperature and the humidity rate in the same time. I want to use my phone to control the brightness and the color of leds and read the temperature and the humidity through my phone.

That doesn’t tell us what type of MCU you’re using though, which is the important bit of the equation.

Pete.

Ok I’m sorry, I use a wemos d1 mini , a esp8266

In that case you could use Blynk Edgent to allow you to re-provision new WiFi credentials at any time via the app.

You’ll need two spare GPIOs to do this though.

Pete.

Without disrespecting you, how we do it ?

Click the “Docs” link at the top of the page and search for “Edgent” and “Dynamic Provisioning”

If you have the Blynk C++ library installed then look at File > Examples > Blynk > Blynk.Edgent > Edgent_ESP8266

Pete.

For this I know how it works, so I put my device’s name and template’s name then I write and upload my code into the MCU. So I can use my project at home. What are the other steps to use my project anywhere ?

The Settings.h tab of the Edgent example sketch is where you specify which pins are used for the Blynk LED and button that will clear the stored WiFi credentials.
You may choose to use the Wemos’s onboard LED, and connect a physical momentary switch between another pin (Maybe GPIO0) and GND.

You provision the device via the app (when the LED is flashing) then iof you wnat to clear the stored credentials you press the button for 10 seconds. You can then re-provision the device via the app with new credentials.

More info here…

Pete.

I read the text and I saw that it’s possible to change wifi credentials on an existing device with the mobile app thanks to the command “Reconfigure”. Can I do this in my case ?

Yes.

Pete.

Ok, so I can use this command without press a physical button to reset wifi credentials.

I don’t know. Try it.

Pete.

Ok thanks for your help. I’ll try this and I’ll give you some news about the test.

Yes you can click on configure device on the app and change the credentials.

But,

Your device needs to be connected to the previous wifi router and active internet connection to receive this command.

If this is not the case, then you will have to press the reset button manually to put the device into reconfigure mode.

1 Like

Thank you for your help everyone, my project work correctly I reconfigure my MCU and I connect my project with mobile data