For myself, it can be summarized into slowly realising that there is a difference, then learning how to understand then merge that difference, between Blynk’s programming structure compared to Arduino’s programming structure.
NOTE: this turned out longer that I anticipated… so much so, that I debated just erasing it and keeping my view to myself… but oh well, here I go
This is a comparison at the introductory level, not that of seasoned coders. As well as mostly being limited to standard Arduino hardware, as that is what I am most familiar with. Also much of this is based on either my own learning curve and/or my observations in the questions formulated by new, and some more experienced, Blynk users.
Overall Code Function and Syntax:
Arduino - you can take any number of code snippets out there and relatively easily, tweak them together it to do what you want.
Blynk - there is a comparatively strict, but somewhat hidden, order that MUST be followed when “porting” and merging Arduino code and Blynk “aka Blynkifing” or nothing works at all.
Control:
Arduino - almost universally understood that the way to interact with external things is via digitalRead() digitalWrite()
analogRead()
analogWrite()
, etc.
Blynk - while all of those commands are still used, they almost take a secondary role to the understanding and utilisation of virtual pins when interacting with things… and understanding virtual pins was confusing at first due to limited detail examples and explanations.
Program Structure:
Arduino - the void Loop()
is a primary place where control loops goes.
Blynk - keep the void loop() clear at all costs! and use timers & BLYNK_WRITE()
functions instead.
Timing:
Arduino - delay()
delayMicroseconds()
for loops
, etc. are very common to make things work in the timing and order you want.
Blynk - almost NO delay or blocking function is “permitted”, rather learning all about SimpleTimer is a MUST - but not really expanded upon in the documentation.
Infrastructure:
Arduino - Once programmed, it works (within the limitations of attached sensors and actuators) anywhere, as long as it has power.
Blynk - Aside from the same requirements as above, it may or may not work in a semi-autonomous mode without a link to the App… but almost always requires a solid link to a server in order to properly function… this confuses many at first, i.e, “I can haz without internet how?”.
Board Compatibility: And I admit that I personally find this one the most frustrating, as it was my biggest initial hope with Blynk - the ability to utilise the differing types of MCUs I have, with one interface style and minimal need to learn multiple programming languages (at least in the beginning ).
Arduino - Arduino code only works on Arduino (or compatibles like ESP)… Generally when using other’s code examples, if it doesn’t work, change the pin numbering to match the hardware.
Blynk - Easily works on many different types of boards, Arduino, ESP, RPi, etc. or so the claim goes, however once you get down to the brass tacks, the only real easy thing in common is the app and the server… the library installation, ease of server connection and even the ease of direct hardware manipulation (with or without coding) varies greatly, even among similar categories of boards (i.e. Arduino & ESP). But the overall instructions, examples and expectations are seemingly and increasingly focused on one main board type, the ESP.
At this point, I think I have clarified both my beginning expectations as well as my more experienced observations.
However, I would like to also point out that in my view of things, I see Blynk can perhaps progress in one of at least two directions…
Either focus on ESP based IoT as that appears to be the most popular direction… and straight up say so to focus on your target market.
Or embrace, and find a way to support, that you have actually created an excellent and beautiful Multi-Purpose, multi-MCU, GUI between the end user, their hardware of choice and whatever their target goal is - Not just the common home based IoT, but also:
- Robotics interface, even real-time control.
- As a powerful interface with development boards (Firmata on steroids), even if only used on the benchtop for hardware, that once deployed, may never require user interaction.
- Even as a powerful learning tool for those, like myself, whom excel when visually seeing indicators & physically poking at buttons, levers, etc.
OK, If you have actually read to this point, and haven’t started sharpening your pitchforks ;)… then thank you for listening.