- Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsensorExample.py
More file actions
Latest commit
19 lines (13 loc) · 451 Bytes
/
Copy pathsensorExample.py
File metadata and controls
19 lines (13 loc) · 451 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importcreate2api
importjson# We'll use this to format the output
bot=create2api.Create2()
bot.start()
bot.safe()
print'==============Start Up Data=============='
printjson.dumps(bot.sensor_state, indent=4)
print'========================================='
print''
#Packet 100 contains all sensor data.
bot.get_packet(100)
print'==============Updated Sensors=============='
printjson.dumps(bot.sensor_state, indent=4, sort_keys=False)