Vidéo
Le Code
//------------------------------------------------------
// https://gammatroniques.fr/
// Code Blynk
// 01/2020
//------------------------------------------------------
//Lien de la bibliothèque: https://github.com/blynkkk/blynk-library/releases/latest
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "token"; //Token
char ssid[] = "WIFI";
char pass[] = "Motdepasse";
WidgetLED Button1(V1);
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(D8, INPUT);//Bouton
}
void loop()
{
Blynk.run();
if (digitalRead(D8))//si bouton on
{
Blynk.notify("Test, Le bouton fonctionne");
Button1.on();
}
else {
Button1.off();
}
}