Micropython Google sheets

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Beginner2all
Posts: 1
Joined: Tue Apr 20, 2021 5:47 pm

Micropython Google sheets

Post by Beginner2all » Tue Apr 20, 2021 5:54 pm

Hi. I'm a beginner to Python and Micropython. I'm trying to make a Micropython code to light a led when a certain number is on my Google sheet. I managed to make it work in Python, but I can't get it to work on Micropython. The problem I'm having is the Gspread module that works with Python but apparently not with Micropython. Is there any way to connect Micropython to Google sheets cell or a way to get Gspread work on Micropython? I'm using a ESP8266 board (NodeMCU). Thank you very much for all the help!

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: Micropython Google sheets

Post by scruss » Tue Apr 20, 2021 8:16 pm

I don't see an easy way to do this. There doesn't seem to be the right kind of Auth library for MicroPython, and the smallest response I could get back from the Sheets API was many times larger than available RAM on a NodeMCU.

nekomatic
Posts: 37
Joined: Thu May 08, 2014 9:31 pm

Re: Micropython Google sheets

Post by nekomatic » Tue Apr 27, 2021 7:36 pm

It looks as if you should be able to detect the condition on your Google sheet with IFTTT, then you might be able to notify your MicroPython code via some other service?

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: Micropython Google sheets

Post by stijn » Wed Apr 28, 2021 7:50 am

the smallest response I could get back from the Sheets API was many times larger than available RAM on a NodeMCU
[/quot]

Only if the response is read into one object probably? It's not ideal, and you'd have to manually parse the response, but you could read from the socket x bytes at a time and extract only the information you need.

Post Reply