Connect to the Blynk service to enable control and data collection via the mobile app.
from IoTcloud import blynk
# Disconnect
blynk1.disconnect()
# Send email
blynk1.email('', '', '')
# Send tweet
blynk1.tweet('')
# Send notification
blynk1.notify('')
# Configure component property parameters
blynk1.set_property(0, '', '')
# Synchronize virtual pin status
blynk1.virtual_sync(0)
# Initialize connection
blynk1 = blynk.Blynk(token='xxxxxxxxxxxxxxxxxxxxxxxxxx')
# Callback response
def blynk_read_v3(v_pin,value):
print(value)
# Respond data to specified VPIN
blynk1.virtual_write(v_pin, "Hello!")
# Bind virtual pin response callback
blynk1.handle_event('read v3', blynk_read_v3)
while True:
blynk1.run()