Skip to content

Commit 7a44604

Browse files
author
brentru
committed
less verbose output, prettier
1 parent adee6be commit 7a44604

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/aio_basics/adafruitio_04_location.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from Adafruit_IO import Client, Feed, RequestError
1313

1414
# Set to your Adafruit IO key.
15-
ADAFRUIT_IO_USERNAME = 'YOUR-USERNAME'
16-
ADAFRUIT_IO_KEY = 'YOUR-KEY'
15+
ADAFRUIT_IO_USERNAME = 'YOUR_USERNAME'
16+
ADAFRUIT_IO_KEY = 'YOUR_AIO_KEY'
1717

1818
# Create an instance of the REST client.
1919
aio = Client(ADAFRUIT_IO_USERNAME, ADAFRUIT_IO_KEY)
@@ -50,9 +50,8 @@
5050
ele += 1
5151

5252
# Read the location data back from IO
53+
print('\nData Received by Adafruit IO Feed:\n')
5354
data = aio.receive(location.key)
54-
print(data)
55-
print('\nData from Adafruit IO Feed:\n')
5655
print('\tValue: {0}\n\tLat: {1}\n\tLon: {2}\n\tEle: {3}'.format(data.value, data.lat, data.lon, data.ele))
57-
# wait loop_delay seconds to avoid throttle
56+
# wait loop_delay seconds to avoid api throttle
5857
time.sleep(loop_delay)

0 commit comments

Comments
 (0)