File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import gspread
3333from oauth2client .service_account import ServiceAccountCredentials
3434
35- # Type of sensor, can be adafruit_dht.DHT11 or adafruit_dht.DHT22
35+ # Type of sensor, can be `adafruit_dht.DHT11` or `adafruit_dht.DHT22`.
36+ # For the AM2302, use the `adafruit_dht.DHT22` class.
3637DHT_TYPE = adafruit_dht .DHT22
3738
3839# Example of sensor connected to Raspberry Pi Pin 23
6263# Then use the File -> Share... command in the spreadsheet to share it with read
6364# and write acess to the email address above. If you don't do this step then the
6465# updates to the sheet will fail!
65- GDOCS_OAUTH_JSON = 'spreadapi .json'
66+ GDOCS_OAUTH_JSON = 'your SpreadsheetData-* .json file name '
6667
6768# Google Docs spreadsheet name.
6869GDOCS_SPREADSHEET_NAME = 'DHT'
@@ -86,8 +87,8 @@ def login_open_sheet(oauth_key_file, spreadsheet):
8687 sys .exit (1 )
8788
8889
89- print ('Logging sensor measurements to \
90- {0} every {1} seconds.' .format (GDOCS_SPREADSHEET_NAME , FREQUENCY_SECONDS ))
90+ print ('Logging sensor measurements to\
91+ {0} every {1} seconds.' .format (GDOCS_SPREADSHEET_NAME , FREQUENCY_SECONDS ))
9192print ('Press Ctrl-C to quit.' )
9293worksheet = None
9394while True :
You can’t perform that action at this time.
0 commit comments