File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ while True:
68
68
- ` notify ` , ` tweet `
69
69
- ` log_event `
70
70
- events: ` Vn ` , ` readVn ` , ` connected ` , ` disconnected `
71
- - can run on embedded hardware, like ` ESP8266 ` , ` ESP32 ` , or ` OpenWrt `
71
+ - can run on embedded hardware, like ` ESP8266 ` , ` ESP32 ` , ` W600 ` or ` OpenWrt `
72
72
73
73
## Ubuntu/Linux/Raspberry Pi installation
74
74
Original file line number Diff line number Diff line change
1
+ """
2
+ Blynk is a platform with iOS and Android apps to control
3
+ Arduino, Raspberry Pi and the likes over the Internet.
4
+ You can easily build graphic interfaces for all your
5
+ projects by simply dragging and dropping widgets.
6
+
7
+ Downloads, docs, tutorials: http://www.blynk.cc
8
+ Sketch generator: http://examples.blynk.cc
9
+ Blynk community: http://community.blynk.cc
10
+ Social networks: http://www.fb.com/blynkapp
11
+ http://twitter.com/blynk_app
12
+
13
+ This example shows how to initialize your W600 board
14
+ and connect it to Blynk.
15
+
16
+ Don't forget to change WIFI_SSID, WIFI_PASS and BLYNK_AUTH ;)
17
+ """
18
+
19
+ import BlynkLib
20
+ import machine
21
+ from easyw600 import *
22
+
23
+ WIFI_SSID = 'YourWiFiNetwork'
24
+ WIFI_PASS = 'YourWiFiPassword'
25
+
26
+ BLYNK_AUTH = 'YourAuthToken'
27
+
28
+
29
+ wifi = connect (WIFI_SSID , WIFI_PASS )
30
+
31
+ print ("Connecting to Blynk..." )
32
+ blynk = BlynkLib .Blynk (BLYNK_AUTH , log = print )
33
+
34
+ @blynk .on ("connected" )
35
+ def blynk_connected (ping ):
36
+ print ('Blynk ready. Ping:' , ping , 'ms' )
37
+
38
+ @blynk .VIRTUAL_WRITE (1 )
39
+ def v1 (param ):
40
+ print ('!!!VIRTUAL_WRITE' , param )
41
+
42
+ @blynk .ON ("V2" )
43
+ def v2 (param ):
44
+ print ('!!!ON' )
45
+
46
+ @blynk .on ("V3" )
47
+ def v3 (param ):
48
+ print ('!!!on' )
49
+
50
+ def runLoop ():
51
+ while True :
52
+ blynk .run ()
53
+ machine .idle ()
54
+
55
+ runLoop ()
You can’t perform that action at this time.
0 commit comments