-
Notifications
You must be signed in to change notification settings - Fork 5
/
test1.py
23 lines (17 loc) · 843 Bytes
/
test1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from pyparticleio import ParticleCloud
c = ParticleCloud.ParticleCloud(username_or_access_token='')
#print(c.devices)
for i in range(0,8):
print("Analog Offset {0} = {1}".format(i, c.internet_button2.getAnalogOff("{0}".format(i))))
for i in range(0,8):
offset = i*100
result = c.internet_button2.setAnalogOff("{0},{1}".format(i,offset))
print("Set Analog Offset 100*{0}, result: {1}".format(i, result))
for i in range(0,8):
print("Analog Offset {0} = {1}".format(i, c.internet_button2.getAnalogOff("{0}".format(i))))
for i in range(0,8):
offset = 0
result = c.internet_button2.setAnalogOff("{0},{1}".format(i,offset))
print("Set Analog Offset to 0, result: {1}".format(i, result))
for i in range(0,8):
print("Previous Analog Value {0} = {1}".format(i, c.internet_button2.getPrevAna("{0}".format(i))))