IoT projects can be incredibly rewarding, and they can be used in most scenarios, including data gathering, monitoring, control, and automation. In this how-to article, we will learn how to get started with the Adafruit dashboard, which allows you to work on IoT-related projects easily.
What Is the Adafruit Dashboard?
Adafruit IO is a simple-to-use internet service that easily enables IoT devices to get and post data. For example, a devboard could take temperature readings and store its data onto the Adafruit servers, requiring very little overhead. But the system is not limited to just storing and returning data to IoT devices; it can also make GUI interfaces for viewing data and controlling devices, and it can enable triggers that will warn you when a sensor reading goes beyond a specified tolerance (such as the room becoming too warm).
The first task is to sign up for the service. You have two options: a limited version (which we will be using) and a $10 subscription service, which enables higher traffic. Visit Adafruit’s website and then select the free signup option at the bottom of the page.
Once the signup page loads, fill in your details and then create your account
With your account created, it's time to visit io.adafruit.com. If you’re logged in, you should be taken to your dashboard.
Username and Key
While we will not be getting devices to talk to Adafruit in this article (as that is a whole article in its own right); we will instead look at the different features included in the Adafruit IO and what they do. So, the first two things that you will need to find out are your username and your private key. The username is used to identify the device that is wanting to upload data to your account, and the key is the password. To find out what your username and key are, simply click the “View AOI Key” option on the navigation found on the left.
A window should pop up that contains both your username and key, as shown below. Since taking this screenshot, I have changed my key, so no others know of my private key. The QR code shown stores your key, which can be useful when sharing the key with others without it being spelled out word for word (writing down someone’s key is easier than trying to draw that QR code from scratch!).
Feeds on Adafruit IO are used to store data from IoT devices, but IoT devices can also read data from feeds. This means that we need to set up a feed; otherwise, our devices will have nothing to save to. So, to do this, start by clicking the feed option in the navigation window on the left.
On the feed page that loads, click Actions > Create a New Feed.
In the window that pops up, we will give our feed a name and description. I plan to use this as a temperature logger for later use. So for now, I will call the feed name “Temperature” and give it a simple description.
If all goes well, we should see our feed appear in the feeds page.
Dashboards are used to control devices and create user-friendly interfaces that can work with feeds. Interfaces that can be made include sliders, buttons, toggle switches, control buttons, gauges, and logs. So, to start making a dashboard, we need to visit the dashboard page, which is done by clicking “Dashboard” in the navigation menu on the left.
In the dashboard page, click Actions > Create New Dashboard.
In the window that pops up, we will need to give our dashboard a name and description, just like we did with the feed. In this case, I will call the dashboard “Temperature Station”, as it will be linked to our temperature feed, and the description is somewhat self-explanatory.
If all goes to plan, your dashboard should now appear in the dashboard list. To open and edit this dashboard, click its name in the list.
With the dashboard open, we should have an empty blank space (see below)
While the dashboard allows for many different types of IO interfaces, we will only be adding the gauge today. To do this, click the blue cross in the top right, which allows us to add a new block, and, from the option menu that appears, click the gauge.
With the gauge selected, the system will first ask you which feed you want to link the gauge to. We only have one feed, so we will select that by ticking the box next to it. But, if you have many feeds, you can use the search bar to find the specific feed. Once you have selected the feed, click next.
The next window asks about the title text, max and min values, gauge type, and label. For now, we will leave everything as default except the label text, which we will change to degrees C. Once done, click “Create Block” in the bottom right window.
With the block created, we now have a gauge that will display the current temperature in the feed. At this point, if we had a sensor sending readings to the feed, the gauge would display the most recent value.
The last feature we will look at on Adafruit IO is the trigger, which can be an invaluable tool in situations where devices being monitored must not fall outside of a certain range. For example, we could link our temperature to a trigger which can warn us if the room is too hot or cold. So, to set up a trigger, we need to first click “Triggers” in the navigation window on the left.
Now that we are at the triggers page, we need to create a new trigger. To do this, click Actions > Create a New Trigger.
The window that pops up gives us the opportunity to create either a reactive trigger or a scheduled trigger. The reactive trigger is one that fires when a value does something in particular, while the scheduled trigger is one that fires constantly with a given time interval. Scheduled triggers are not of concern for now, so we will select “Reactive Trigger”.
The next window asks about how the trigger should behave, and in this case, I have made the trigger send me an email saying “ITS TOO HOT” when the temperature feed is greater than 30. A trigger can also send an email, send a webhook message, or publish a message to another feed.
With the trigger created, we can now see it in our trigger page.
Adafruit has clearly worked very hard to create an IoT dashboard that not only provides a simple method for sending and receiving data, but for also displaying that data. It, therefore, comes as no surprise that I will be using this for many projects to come!