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

Commit 58defe3

Browse files
committed
Update example
1 parent 2991789 commit 58defe3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/tweet_notify.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@
2121
"""
2222

2323
import BlynkLib
24-
import time
2524

2625
BLYNK_AUTH = 'YourAuthToken'
2726

2827
# initialize Blynk
2928
blynk = BlynkLib.Blynk(BLYNK_AUTH)
3029

31-
# to register virtual pins first define a handler
3230
@blynk.VIRTUAL_WRITE(4)
3331
def v4_write_handler(value):
34-
if value: # is the the button is pressed?
32+
if value[0]: # is the the button is pressed?
3533
blynk.notify('You pressed the button and I know it ;)')
3634
blynk.tweet('My IoT project is tweeting using @blynk_app and it’s awesome! #IoT #blynk')
3735

0 commit comments

Comments
 (0)