hadif azli / Mbed 2 deprecated TEST123

Dependencies:   mbed Blynk

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WiFiBlynk.h Source File

WiFiBlynk.h

00001 
00002 #include "ESP8266_HardSer.h"
00003 #include "BlynkSimpleShieldEsp8266_HardSer.h"
00004 #include "SimpleTimer.h"
00005 
00006 Serial EspSerial(PA_9, PA_10);//tx, rx
00007 ESP8266 wifi(EspSerial);
00008 
00009 void notify()
00010 {
00011     Blynk.notify("Alert : DOOR OPENED");
00012 }
00013 
00014 BLYNK_WRITE(V1) { 
00015   int a = param.asInt(); 
00016   if (a == 1) { 
00017     Blynk.notify("BUKAK..");     
00018     
00019   }  
00020   else { 
00021     Blynk.notify("TUTUP...");
00022  
00023   
00024   } 
00025 }