As of right now, I am in a team that is working on a project, using an Adafruit ESP8266 Huzzah breakout board, and an Arduino MEGA. We plan on making a rover that is controlled with Blynk. Although, weāre having a few issues with the code, and where to upload them.
We want the Arduino MEGA to hold basic instructions on powering motors through a DC motor shield, as well as servos through a servo shield. How would we know which code goes to the ESP and the MEGA? I have used the ESP8266_standalone example, but didnāt really know what to upload to the MEGA after that. The esp worked with Blynk, but would the MEGA be programmed the same way? I am just confused on how the two would communicate with Blynk.
We have two esps, one flashed with AT firmware(SDK NONOS V2.0.0), and another that has some code that we tried flashing for Blynk. Should we flash our esp with custom firmware?
I have seen code such as this:
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
Will most of the code when using Blynk be this simple? Where do we program the Blynk buttons and functions? What does Blynk.run() do exactly?