Replies: 1 comment 1 reply
-
There is no direct approach to do. The response payload is JSON and you have to know the JSON structure for the location of node that contains the value you want. For FirebaseJson usage, see this example. You also can use any JSON library to deserialize. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sah wah dee khrap
@mobizt
Here is a short description of my project followed with my question at the end.
I want to read a bunch of RFID tags on a herd of cattle as they pass a certain point for theft reasons and better management. I want to put the logged times with their corresponding 2 byte RFID tag number (in HEX) on Google Sheets using API and the ESP Google sheet client library.
I want to enter the RFID tags manually on Google sheets from cell A1 to A[x]. Then the ESP will request the values assigned to cell A1 to A[x] (x unknown variable that will be provided from the sheet with a simple count fx of all the entered ID's). The ESP will store the read ID's in an array (arrayRead) for comparison.
Then when a cow passes the RFID scanner/reader the ID will be picked up by the ESP over serial and stored in an array (arrayScan). I have created a loop of for and if fx's for comparing the scanned RFID tag array (arrayScan) with the existing read array (arrayRead). Through this comparison a new array (arraySendData) will be generated. The array (arraySendData) is made up of 0's and 1's that represent whether an existing ID was scanned or not (blanks and timestamps are later assigned in the place of these 0's and 1's respectively). This generated array is sent to the google sheet. The final result on google sheets has the ID with its last known scan timestamp next to it.
I have managed to get all of these steps right except for reading the values from the google sheet and storing them in an array on the ESP device. I have found no example of this anywhere except for your create_edit_parse example under firebaseJson. I have tried to incorporate this example into my program for 3 days now with no success.
My question is how do I get these ID's; E6D0, BB3B, 97F6 that are on my google sheet cell A1 - A3 to my esp as an array integer using json deserialization and iteration?
Google sheets
A
to
ESP32
//in the following format
arrayRead[]={0xE6D0, 0xBB3B, 0x97F6};
A simple example would be much appreciated. Thank you for your time and effort in creating these libraries and for making these resources freely available.
Beta Was this translation helpful? Give feedback.
All reactions