Blynk_Example

Dependencies:   WIZwiki-7500_Blynk WIZnetInterface mbed

Dependents:   Blynk_NeoPixelRing_WIZwiki-W7500

Revision:
1:030843f74e27
Parent:
0:decc160be69d
--- a/main.cpp	Wed Aug 02 02:04:39 2017 +0000
+++ b/main.cpp	Tue Sep 05 23:22:02 2017 +0000
@@ -31,36 +31,25 @@
 #include <BlynkSimpleEthernet2.h>
 
 
-EthernetInterface eth;
+EthernetInterface eth0;
 
 // You should get Auth Token in the Blynk App.
 // Go to the Project Settings (nut icon).
 char auth[] = "f6e02fba337e45f19f9c51567323ea8d";
 
 
-void setup()
-{   
-    uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0xff, 0xff, 0x25};   
-    eth.init(mac_addr);
-    eth.connect();
-    
-    Blynk.begin(auth);
-    // You can also specify server:
-    //Blynk.begin(auth, "blynk-cloud.com", 8442);
-    //Blynk.begin(auth, IPAddress(192,168,1,100), 8442);
-    // For more options, see Boards_Ethernet/Arduino_Ethernet_Manual example
-}
 
-void loop()
-{   
-    //Blynk.run();
-}
 
 int main(void) {
     printf("Hello\r\n");
-    setup();
+    uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0xff, 0xff, 0x25};   
+    eth0.init(mac_addr);
+    eth0.connect();
+    
+    Blynk.begin(auth);
+    
     printf("Blynk init!\r\n");
     while(1){
-        loop();
+        Blynk.run();
     }    
 }
\ No newline at end of file