Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit a1226b1

Browse files
committed
Update examples
1 parent d892655 commit a1226b1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

examples/other_functions.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
http://twitter.com/blynk_app
1212
1313
This example shows how to use advanced functions of Blynk library:
14+
- insecure connection
1415
- debug logging
1516
- custom server
1617
- changing heartbeat
@@ -25,8 +26,9 @@
2526

2627
# Initialize Blynk
2728
blynk = BlynkLib.Blynk(BLYNK_AUTH,
28-
server='blynk-cloud.com', # set server address
29-
port=8442, # set server port
29+
insecure=True, # disable SSL/TLS
30+
server='blynk.cloud', # set server address
31+
port=80, # set server port
3032
heartbeat=30, # set heartbeat to 30 secs
3133
log=print # use print function for debug logging
3234
)
@@ -43,10 +45,5 @@ def blynk_disconnected():
4345
def blynk_handle_vpins(pin, value):
4446
print("V{} value: {}".format(pin, value))
4547

46-
@blynk.on("readV*")
47-
def blynk_handle_vpins_read(pin):
48-
print("Server asks a value for V{}".format(pin))
49-
blynk.virtual_write(pin, 0)
50-
5148
while True:
5249
blynk.run()

0 commit comments

Comments
 (0)