If you do not already have an Adafruit IO account set up, head over to io.adafruit.com to link your Adafruit.com account to Adafruit IO.
The first step is to create a new Adafruit IO feed to hold the data from the PyPortal's temperature sensor. Navigate to the feeds page on Adafruit IO. Then click Actions -> Create New Feed, and name this feed weight.
- If you do not already know how to create a feed, head over to Adafruit IO Basics: Feeds.
Next, you'll create a dashboard to display the values from the feed you created.
- If you do not know how to create or use Dashboards in Adafruit IO, head over to the Adafruit IO Basics: Dashboards guide.
Adding a Gauge Block
To display the values from your Scale, you'll add a gauge block to your dashboard. This blocks displays values within a fixed range and can serve as a visual indication for if the values are too low or high.
The code will be sending data from the scale in grams.
Set the Block Title to Scale
Set the Gauge Min Value to 0
Set the Gauge Max Value to 500
and Set the Gauge Label to grams
Adding a Line Chart
While displaying the current value of the weight is useful, Adafruit IO stores data so you can monitor how it changes a long period of time. Alternatively, you can visualize it in real-time To do this, we'll use the Line Chart block.
Give the line chart a name, and set it to display live history (you can change to display a longer time period this by editing this block)
Your final dashboard should look like the following:
If you want to customize your dashboard - add more blocks to the dashboard, or resize the existing blocks.
You are also going to need your Adafruit IO username and secret API key.
Navigate to your profile and click the View AIO Key button to retrieve them. Write them down in a safe place, you'll need them for the next step.