Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

Setup Adafruit IO account for IoT

( \newcommand{\kernel}{\mathrm{null}\,}\)

 

clipboard_e4e57eb24fb037f738179052d346fc2a9.png

Adafruit IO is a webpage for displaying your IoT data. 

It is free for 5 Dashboards and 10 feeds.

https://io.adafruit.com/

To start your account go to the page and click on “Get Started for Free”.

 

 

 

Continue with account signup as shown below.

clipboard_e47178c8c2446690b3483fdab728a28fb.pngclipboard_e02a9c7a8e07c0158d7c946b9d2a62421.png

 

After confirming your password go to the IO page using the link shown circled here;

clipboard_e1e51478888e7fcb470256a1fbf20e5b3.png

Next you will setup your first data feed.

clipboard_ee4690e9b11cb61e0aa4deb2064ee126e.png

 

 

 

 

 

 

 

 

 

 

 

To make a new feed click on the “+ New Feed” shown in the red block above.

 

clipboard_e219bf4ebcce5bf3989754692e17fe13a.png

 

 

 

 

 

 

Install applications to send feed data Adafruit IO

(Command line or script)

sudo apt-get -y install python-pip
sudo pip3 install adafruit-io

https://adafruit-io-python-client.readthedocs.io/en/latest/quickstart.html

The following python code is from the “Quickstart” found in the link above.

Copy and paste the following python code into the Thonny IDE and save it with the name adaFruitIO.py.

# Import library and create instance of REST client.
from Adafruit_IO import Client
aio = Client('YOUR ADAFRUIT USER', 'YOUR ADAFRUIT IO KEY')

# Send the value 100 to a feed called 'Foo'.
aio.send('Foo', 100)

# Retrieve the most recent value from the feed 'Foo'.
# Access the value by reading the `value` property on the returned Data object.
# Note that all values retrieved from IO are strings so you might need to convert
# them to an int or numeric type if you expect a number.
data = aio.receive('Foo')
print('Received value: {0}'.format(data.value))

 

In your copy of the python script change the variable for the feed name from “foo” to the one you are using “tryFeed”.

Also change “YOUR ADAFRUIT USER” to your username, and change “YOUR ADAFRUIT IO KEY” to the key found by the following method.

In your Adafruit IO account click on the link in the red oval shown here;

 

 

clipboard_eed4d5f63ae0ddc37e371e27733364732.png

 

clipboard_e76ddda8e0d35e8f9f7da8a7baffdbd54.pngIn the example above, shown in the red block, the feed name is ‘tryFeed’ the feed key is ‘tryfeed’.  Notice that the feed name has an uppercase ‘F’ the feed key that you will use is all lowercase letters.  

 

 

 

 

 

After you modify and run your script check the feed on your Adafruit IO page.

 

 

 

 

 

 

 

 

 

Your username and key should be quoted as in the example here;

aio = Client('phwilliams192', 'aio_cLXS673ztiPR5lQf7HKItAiEhKUYx')

Also quote the feed name that you want to send data to.

aio.send('tryFeed', 82)

 

clipboard_e95e7d85a5adc0bb312a5b777c821dde2.png

Next create a dashboard to display your feed data.

clipboard_e2d98be778815bd435e68ad8643ba75d7.png

 

clipboard_e1e85c1ffe40eae32f47689d1ebdfa2b6.png

clipboard_eb4cee6740ee78235f8c2f9bec9b6f9dc.png

 

 

clipboard_ec7c47a14da60b2f662e59ea5a39a83f4.png

From the icon list above select the gauge.

clipboard_ea10de48675a2e21c3be9d4304377241a.png

Choose the feed you want to display in the gauge (tryFeed).

clipboard_e39463c82d145294fa6d6386e7e6a41fe.png

clipboard_e33c7e5183d06885c5837ee561df98a4e.png

(Second page)

clipboard_e33e6bf17a3f234ec4a42693a7d97b0e3.png

clipboard_ecb4f1c5e883d70ce2c5429e198ecdbdd.png

After testing the gauge on the dashboard add a chart. From the icon list select the chart.

clipboard_e1c3c91e7dd72985b2b23af04953e3e48.png

clipboard_e4b8be4149f4ce20304bacd97b42c3404.png

Test with several different values for the tryFeed variable.

clipboard_ed1ece56767b404ceae54737c36ea4ffd.png

 

Making feeds and Dashboards public viewable:

For the following two feed examples the lock icon shows that the feeds are not public viewable.

 

clipboard_e52b10c505b9ca0a1991f31e54ad0ef8c.png

 

Make your feeds public viewable so that your team can see the data and the instructor can grade your homework.

 

clipboard_e656267496291e721e4d8b20378b73574.png

Click on the feed name to change privacy setting.

On the right side of the page you will find the privacy setting for your feed.

 

clipboard_ebb2a4a3400efef9bdea3b6db95de14a0.png

 

 

clipboard_e870d1b6efc144e78348b61b824b4106e.png

Set Visibility to Public. Make all your feeds public.

Next change privacy setting for your dashboard.

clipboard_efaf6e3735c70d86d3719397393ba153c.png

Click on the lock icon to change settings.

clipboard_e48fb17d7ac34157189664981deb3b57e.png

Confirm changing settings to public.

clipboard_ee3ce6178be7b4da2377a5efd74dfd8af.png

clipboard_e01d3f011ab2f0f8e1ce05160e6723fcd.png

 

clipboard_e50138536434f1cd0350c04652c070f32.png

 


Setup Adafruit IO account for IoT is shared under a GNU General Public License 3.0 license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?