Étape 9: Préparer le code pour l’Arduino
Étape 1: Ouvrez une nouvelle esquisse
Étape 2: Remplacez le code existant par le code ci-dessous et l’enregistrer. Ne pas télécharger encore, cependant. Laissez cette fenêtre ouverte. Nous y reviendrons à elle plus tard.
//#define BLYNK_DEBUG#define BLYNK_PRINT Serial // Comment this out to disable prints and save space #include <ESP8266_HardSer.h>#include <BlynkSimpleShieldEsp8266_HardSer.h>// Set ESP8266 Serial object #define EspSerial SerialESP8266 wifi(EspSerial);// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "???";void setup() { // Set console baud rate Serial.begin(9600); delay(10); // Set ESP8266 baud rate EspSerial.begin(115200); delay(10); Blynk.begin(auth, wifi, "???", "???"); }void loop() { Blynk.run(); }