Just a quick question, well, an assumption I am in need of clarification on really.
Am I right in thinking that in Blynk, PIN I/O assignments don’t get designated within the Sketch as they do in an Arduino, but that they get designated in the Blynk project on the iPhone/device, yes?
So when using Blynk to control I/O’s, it’s the project on the app that defines what they are, and the magic happens within the Blynk.run() command in the sketch?
Hardware pins get controlled by the sketch as normal… either by your code (i.e. digital/analog pin read/write commands) or by the Blynk library, installed on the hardware, that runs in the background (yes, Blynk.run() ) via direct pin manipulation from the App.
As also shown in that link, the app can also control virtual pins, variable like links that help make programming with Blynk much more powerful than simple direct pin manipulation.
Further information can also be found here:
The reason I asked this is that in the example Blynk project I just tried, which simply used a button to turn an LED on or off, I didn’t assign any I/O PIN code in the Sketch at all!! The only location where I told the ‘project’ that I had connected an LED to the ESP8266 was in the Blynk project on the iPhone.
Click on the first link I referenced, the simple explanation for that, and many other commands, are there.
Correct. And when you activate your project - server sends
Pin Mode command for your hardware so it knows what exactly and how you gonna use. And than regular
analogWrite are applied.
Very clever stuff you and your colleagues have created here, Dimitri!
Loving this. Now onto the BMP280 and I2C… hmmmmm another thread!