No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4cbf641 Nov 5, 2018
Permalink
Failed to load latest commit information.
examples Move certificate May 21, 2018
.gitignore Initial commit Mar 22, 2017
BlynkLib.py Cleanup Nov 4, 2018
LICENSE Update license Nov 4, 2018
README.md Update README.md Sep 25, 2018
setup.cfg Update readme Jun 20, 2017
setup.py boost ver Jun 11, 2018

README.md

blynk-library-python

Warning: Work in progress. Code reviews and contributions are more than welcome!

GitHub version GitHub download GitHub stars GitHub issues License

If you like Blynk - give it a star, or fork it and contribute! GitHub stars GitHub forks


What is Blynk?

Blynk provides iOS and Android apps to control any hardware over the Internet or directly using Bluetooth. You can easily build graphic interfaces for all your projects by simply dragging and dropping widgets, right on your smartphone. Blynk is the most popular IoT platform used by design studios, makers, educators, and equipment vendors all over the world.

Blynk Banner

Download

Blynk App: Google Play | App Store

Blynk Server

Documentation

Social: Webpage / Facebook / Twitter / Kickstarter
Help Center: http://help.blynk.cc
Documentation: http://docs.blynk.cc/#blynk-firmware
Community Forum: http://community.blynk.cc
Examples Browser: http://examples.blynk.cc
Blynk for Business: http://www.blynk.io

Usage example

import BlynkLib
import time

BLYNK_AUTH = 'YourAuthToken'

# Initialize Blynk
blynk = BlynkLib.Blynk(BLYNK_AUTH)

# Register Virtual Pins
@blynk.VIRTUAL_WRITE(1)
def my_write_handler(value):
    print('Current V1 value: {}'.format(value))

@blynk.VIRTUAL_READ(2)
def my_read_handler():
    # this widget will show some time in seconds..
    blynk.virtual_write(2, time.ticks_ms() // 1000)

# Start Blynk (this call should never return)
blynk.run()

Installation

pip install blynk-library-python

Features

  • Python 2 and Python 3
  • Windows, Linux, OSX
  • Micropython (PyCom WiPy, LoPy)
  • Virtual pins (see examples)

Notes

For some devices (like PyCom WiPy) you need to setup internet connection first:

from network import WLAN

WIFI_SSID = 'YourWiFiNetwork'
WIFI_AUTH = (WLAN.WPA2, 'YourWiFiPassword')

wlan = WLAN(mode=WLAN.STA)
wlan.connect(WIFI_SSID, auth=WIFI_AUTH, timeout=5000)
print(wlan.ifconfig())

Implementations for other platforms

License

This project is released under The MIT License (MIT)