Skip to content
Volodymyr Shymanskyy edited this page May 13, 2016 · 12 revisions

This page is a collection of notes on different hardware, pitfalls, tutorial links, etc.

Arduino

Duemilanove

You have to select UNO in the Blynk App board type, not the DUE (which refers to the Arduino Due).

Mega/UNO/Nano + ESP8266 WiFi Shield

This connection type is very tricky to start with.

  1. Be aware of your processor speed. The 8266 executes instructions a lot faster than the Uno/Mega, so you may need to throttle back a bit. I have a lot of widgets on my screen, and the flood of initializations was choking Blynk. I just added some 1 second delays after every 4 widget updates or so.
  2. Use push updates for widgets to avoid unnecessary calls to BLYNK_READ. I had 4 value displays that were being updated every second but the values were frequently the same. So I switched the update frequency to "push" and wrote a timer-called function to send the update only when it changed. (The documentation says no more than 10 updates per second, so make sure you respect that.) This eliminated a lot of needless messages.
  3. Use simple, short, modular functions. There is a lot of logic going on in my app, which I suspect was sometimes running too long and locking Blynk out. So I rewrote the code to use more modules and had them do as few things as possible. Then the next important step:
  4. Use a lot of timer routines. I went from 1 timer-called routine (SimpleTimer) to 5 (calling the new modules in item 3 above). Each one has a #define for how frequently it is called and they are of course staggered. This allowed me to easily tune the volume of Blynk messages to balance the message traffic out while still being responsive.
  5. There is now nothing else in loop() besides the calls to Blynk.run() and Timer.run().

Connecting Arduino over USB

[TODO]

ESP8266

Generic ESP8266, NodeMCU, Huzzah, WeMos D1, Seeed Wio Link, etc.

ESP8266-based boards can run Blynk directly on the ESP8266 chip, using this board support package: https://github.com/esp8266/Arduino

Tutorials:

Known possible hardware issues:

  • ESP8266 can't be powered from 3v3 pin on most Arduino, as it requires >400 mA current.
  • ESP8266 flash might get broken. The code executes without problem right after flashing, but stops working after first reboot.
  • This WiFi module can somehow interfere with PIR sensors -> PIR sensor starts producing random values ;)

Particle Electron

NOTE: Blynk can consume quite a lot of data! Use carefully not no overpay for the data plan.

JavaScript (Node.js, Espruino)

https://www.npmjs.com/package/blynk-library

  • Regular PC with Linux / Windows / OS X
  • Single Board Computers (Raspberry Pi, BeagleBone, Intel Edison/Galileo, ...)
  • OpenWRT
  • Espruino

Tutorials:

Python (MicroPython)

  • WiPy
Clone this wiki locally