Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
850bd8c
commit 7a5c5aa
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Blynk is a platform with iOS and Android apps to control | ||
Arduino, Raspberry Pi and the likes over the Internet. | ||
You can easily build graphic interfaces for all your | ||
projects by simply dragging and dropping widgets. | ||
Downloads, docs, tutorials: http://www.blynk.cc | ||
Sketch generator: http://examples.blynk.cc | ||
Blynk community: http://community.blynk.cc | ||
Social networks: http://www.fb.com/blynkapp | ||
http://twitter.com/blynk_app | ||
""" | ||
|
||
import BlynkLib | ||
import time | ||
|
||
BLYNK_AUTH = 'YourAuthToken' | ||
|
||
# initialize Blynk | ||
blynk = BlynkLib.Blynk(BLYNK_AUTH) | ||
|
||
tmr_start_time = time.time() | ||
while True: | ||
blynk.run() | ||
|
||
t = time.time() | ||
if t - tmr_start_time > 1: | ||
print("1 sec elapsed, sending data to the server...") | ||
blynk.virtual_write(0, "time:" + str(t)) | ||
tmr_start_time += 1 |