Blynk2.0 for Mega2560 + ESP-01

Is it possible to migrate a Mega2560+ESP-01 project to Blynk2.0?

I am trying to compile, but get the error “BlynkEdgent.h:3:12: fatal error: user_interface.h: No such file or directory”. I believe this is because it want to communicate directly with ESP8266 and not to ESP-01 via serial interface.

If not possible, would Arduino 33 Nano IoT work, or is ESP32 best?

Thanks in advance.

Yes.

You can’t use the examples Edgent with your hardware.

I don’t understand what you’re saying here.

The Arduino is supported, but personally I’d recommend an ESP32. They are cheaper and more widely used.

Pete.

What can I use instead of the Edgent examples?
Thanks.

Your Legacy sketch, with the three lines of IoT firmware configuration code copied from the Device Info screen pasted at the very top of the sketch.

Pete.

Thanks, but the “Blynk.begin(auth, wifi…” lines should be replaced with something else for the Blynk 2.0?

No, not really.
You can either directly reference the BLYNK_AUTH_TOKEN variable in your Blynk.begin command…

Blynk.begin(BLYNK_AUTH_TOKEN, wifi…

or you can leave the Blynk.begin(auth, wifi… code as it is, and change…

char auth[] = "your legacy auth token";

to…

char auth[] = BLYNK_AUTH_TOKEN;

If you’re referencing the Blynk legacy server url or IP address in your Blynk.begin command then you should stop doing that, or replace the url with blynk.cloud

Pete.