Google Spreadsheet + Particle Photon

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.


Have you checked this out yet?

while I was going to comment that I do not want to resort to using ifttt, I want to send a data entry spreadsheet when a photon is activated for so keep track of those events. :neutral_face:

Any particular reason why you’d rather not use IFTTT? It’s one of the easiest solutions out there, and implemented with about 1 line of code.

If that means every time the Photon starts up, then that’s also possible via IFTTT, since the cloud will emit a ‘online’ SSE on connection, which can be picked up by IFTTT like demonstrated over here.

Assuming you’ve got valid reasons for not using IFTTT, there’s this topic. Although Webhooks is perhaps the better alternative to that now.

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 :wink:

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 :wink:

2 posts were merged into an existing topic: STD Deviation library