File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Here's a short example of how to send a new value to a feed (creating the feed i
6
6
7
7
# Import library and create instance of REST client.
8
8
from Adafruit_IO import Client
9
- aio = Client(' YOUR ADAFRUIT IO KEY' )
9
+ aio = Client(' YOUR ADAFRUIT USER ' , ' YOUR ADAFRUIT IO KEY' )
10
10
11
11
# Send the value 100 to a feed called 'Foo'.
12
12
aio.send(' Foo' , 100 )
@@ -41,17 +41,20 @@ Then a REST API client can be created with code like:
41
41
42
42
.. code-block :: python
43
43
44
- aio = Client(' xxxxxxxxxxxx' )
44
+ aio = Client(' user ' , ' xxxxxxxxxxxx' )
45
45
46
46
Where ``'xxxxxxxxxxxx' `` is your Adafruit IO API key.
47
+ Where ``'user' `` is your Adafruit username.
48
+
47
49
48
50
Alternatively an MQTT client can be created with code like:
49
51
50
52
.. code-block :: python
51
53
52
- mqtt = MQTTClient(' xxxxxxxxxxxx' )
54
+ mqtt = MQTTClient(' user ' , ' xxxxxxxxxxxx' )
53
55
54
56
Again where ``'xxxxxxxxxxxx' `` is your Adafruit IO API key.
57
+ Again where ``'user' `` is your Adafruit username.
55
58
56
59
Your program can use either or both the REST API client and MQTT client, depending on your needs.
57
60
You can’t perform that action at this time.
0 commit comments