BLE Adafruit Feather Super Data Display

Hi I have been stuck on several problems that I cannot seem to find the answers.

  1. 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?

  2. What is the difference between BLNK_READ and BLYNK_READ_DEFAULT()? Does it matter which one is used for Feather?

  3. Is this order for code layout correct?
    #define libraries
    configure
    voidsetup
    Blynk_Read
    void_loop

  4. 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.

Two totaly different concepts…

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”.

I admit uncertainty of the benefits of it :wink:

Yes

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?

Thanks a lot for clearing things up.

I have been stuck on some code for several weeks just trying to get data through BLE but keep hitting a wall.

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

But adjust for these BLE pinouts

e.g… I think :thinking:

// define pins (varies per shield/board)
#define BLE_REQ   7
#define BLE_RDY   8
#define BLE_RST   4
1 Like