Skip to content

Commit 7c0ebf2

Browse files
author
brentru
committed
add info about the AM2302, fix unnecessary space, add default oauth json text
1 parent 73a46c4 commit 7c0ebf2

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

DHT_Google_Spreadsheet/dht_google_spreadsheet.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
import gspread
3333
from 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.
3637
DHT_TYPE = adafruit_dht.DHT22
3738

3839
# Example of sensor connected to Raspberry Pi Pin 23
@@ -62,7 +63,7 @@
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.
6869
GDOCS_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))
9192
print('Press Ctrl-C to quit.')
9293
worksheet = None
9394
while True:

0 commit comments

Comments
 (0)