Blynk with wifimanager and autoonnect

I want to use wifi manager(auto connect) into the Arduino code, so there is no use of “SSID” and “pass” to define first.

But during Blynk.begin() it requires “SSID” and “pass”, so I am unable to that.

Even in the Wifi manager code, there was a term-“String esid” and “String epass” so I thought I should use this instead of “SSID” and “pass” into the Blynk.begin() but shows the error “no matching function for call to 'BlynkWifi::begin(String&, String&, char [33])” here char[33] is my auth number.

This was a summary of my problem, actually, I am trying to build a home automation system with ttp223 touch switches along with relays, and I am also controlling these switches with the Blynk app as well as with touch.

But in the code, there was predefined “SSID” and “pass”, so I thought whenever I will change my wifi credentials it will not work, that’s why I wanted to use wifi manager (auto connect).
Here is my code-

[Unformatted code removed by moderator]

@pawan700 please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

2 Likes

@pawan700 When using wifimanager, use Blynk.auth(your_token); instead of Blynk.begin.

You might find this thread helpful, too: Way smarter lights

Here’s an example that should get you going to use blynk with wifimanager:

Thanks @primerIsNerdArt, your example is clean and easy to follow. I manage to get my sketch work :slight_smile: