Skip to content

Commit 5c35fd0

Browse files
committed
Fixes location.pysample for wrong/outdate API
1 parent ea646a5 commit 5c35fd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/basics/location.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
print('\tLon: ', lon)
5050
print('\tEle: ', ele)
5151
# Send location data to Adafruit IO
52-
aio.send_location_data(location.key, lat, lon, ele, value)
52+
metadata = { 'lat':lat, 'lon':lon, 'ele':ele, 'created_at':time.asctime(time.gmtime()) }
53+
aio.send_data(location.key,value,metadata)
5354
# shift all values (for test/demo purposes)
5455
value += 1
5556
lat -= 0.01

0 commit comments

Comments
 (0)