The last two weeks and looked everywhere for an example of how one could send data to a spreadsheet google as a digital input photon is activated.
And I do not want to resort to using ifttt, I want to send a data entry spreadsheet when a photon is activated to also keep a record of those events.
Apologies if I do not understand, is that English is not my native language.
But I would like to know more about WebHooks not if I want to explain a bit since I’m new to this environment, and I want to do is not to put a figure to the blade when the photon goes off, I want to send a fact to the sheet when a digital input of the photon is activated in this case D0 or D1 or D2.
Don’t worry, English isn’t my native language either
The webhooks are discussed in the docs over here, and contain some example code to send information to Librato. You’ll have to change the webhook code to match the Google Sheets API, which can be found over here. This might also contain some useful information regarding the headers that are necessary.
So, basically, you can continuously poll those pins to see if they’re high, and then send a SSE, which in turn sends a webhook to the page you’ve specified. You can also attach interrupts to those pins and have them send that SSE, which is a bit nicer. The challenge lies in getting the webhook right, the code on the Photon is very simple.
Mind you that the Photon code for this would be almost identical to the one that would be used if you were to use IFTTT. Just trying to provide an easy as possible alternative, if you don’t like it, then don’t use it