Hi I have been stuck on several problems that I cannot seem to find the answers.
What is the difference between the BLYNK_READ(pin) vs. the analogRead(pin)? For Feather, will the BLYNK_READ(V5) always be V5? What does V5 have to be connected to if analogRead(pin) is the actual sensor that is read?
What is the difference between BLNK_READ and BLYNK_READ_DEFAULT()? Does it matter which one is used for Feather?
Is this order for code layout correct? #define libraries
configure
voidsetup
Blynk_Read
void_loop
What is the actual command that is projecting data to the widget, ex. Super Chart?
is it Blynk.virtualWrite?
Thanks for your help. I’ve been stuck on these questions for a while. My code is able to compile but not project data.
BLYNK_READ(vPIN) is a Blynk Function that responds to a widget that is sending info to the server via a preset frequency reading in the Widget.
analogRead(pin) is an Arduino command (NOT Blynk related) for reading the value of an Analog pin on the hardware.
Again, as per the documents… the first one you link to a pre-assigned widget’s vpin
The 2nd one can be used with a widget, or widgets that you had not pre-set with the first function… and it can not only respond to any widgets with unlinked vPins, it can tell you which vPin was “read”.
Hi Thank you very much for spending time to reply. As for BLYNK_READ(pin)-
Does it matter what pin is declared? If yes, does it vary with the device? For example, I am using an BLE for Adafruit Feather 32u4 with IOS. Is the virtual pin the one that is declared in the app or is it the sensor pin?
Yes, for example if you want to press a button in the App and have it run some code on the Device, you must use the BLYNK_WRITE() function and match the vPins between it and the Button Widget.
The BLYNK_READ() is more used with display Widgets, set for a certain read frequency and then they periodically ask the device to update them.
Start off at the beginning with the Sketch Builder examples set for your board type