Now that your board is connected to Renesas IoT Sandbox, you can view data being sent from the board to the cloud. Log in to Renesas IoT Sandbox. Once logged in, make sure you are in the correct project on the upper right hand corner.
If you are not in the correct project, click on the drop-down list next to the symbol and select the project name that you just activated in Step 2.
Click on the Dashboard and you should see a preset Dashboard with five widgets. They each have a red-bordered box with ‘Select User’ as pictured:
Click on the drop-down and select your user on all five of the widgets. Your user is generated by each board’s chip unique ID fused onto the silicone. For any given board, the username is always the same. If you do not see any user listed, there was a problem with auto-enrollment. To debug this, view Appendix C.
Now scroll to the top of the Dashboard and click the save icon:
This is so you can save your Dashboard ‘View’ and not have to re-select your board’s user each time.
There are two types of events sent from the board to Renesas IoT Sandbox:
These events are always sent every 15 minutes by default. A summary event contains the average values from each of the sensor readings within the past 15 minutes. The sensors included are temperature, pressure, humidity, noise level, and vibration stats. To change the frequency of these summary events, view Appendix A.
These events are sent whenever a sensor reading passes a certain threshold. To change these thresholds, view the Appendix A
At the top of the Dashboard, you will see a Last Value Table widget. This widget only records the last entered value of that tag, along with the observed at time-stamp (in UTC). You can use this widget to see the last time the board status was ‘on’ and the last values for city, country, firmware version, WAN IP, LAN IP, and MAC address. For this tutorial, first, make sure that your board is connected by seeing the rows filled with the value and time-stamps. If there is nothing in the ‘value’ and ‘last observed at’ columns, your board has had problems connecting to the cloud. You may need to click the refresh icon toupdate the widget with the latest data.
After your board has been connected for at least 15 minutes, it’s first summary event should be sent in. When this happens, the Real Time Gauge widget on your Dashboard should be updated with values like below. These values are the averages of the sensor for the past 15 minutes. It will continue to be updated every time a summary event is received.
Next, you will see a Table widget. This widget presents all the data from the Humidity, Noise, Pressure, and Temperature sensors sorted by most recent. Using this widget, you can see the sensor value changes over time as well as the last time the board sent an ‘online event.’ Click the refresh button to update the table if any new data is received.
Under the table widget is located the Cross Filter Chart widget. This widget displays board vibration data for the past day. Furthermore, you can add filters based on time range and vibration levels. To see refresh the widget and see updated data, click the refresh button.To customize this widget, view the diagram below and the captions that correspond to the numbers.
The last pre-set widget on the Dashboard is the User Input widget. This widget does not display data but instead allows you to send data. For this tutorial, you will use this widget to control the LEDs in the next step. You will also use this widget to send a sample report later on.
To learn more about widgets, check out the Widgets Documentation.
On the Dashboard, scroll down until you see the User Input widget. Your board’s username on the drop-down should already be selected.
Now we will send events from the cloud to the board to toggle and blink the LED lights.
On the User Input widget, go to the box that says ‘Blink.’ Type in the number of times you wish to make the LED blink; for demo purposes, pick a number under 10, then click ‘Send Event.’
The red LED on the board will blink the number of times you specified. You should also see this event appear in the Real Time Events Stream widget.
On the User Input widget, go to the box that says ‘Toggle.’ To turn on the yellow LED, type in ‘1’. Click ‘Send Event.’ You should see this event appear in the Real Time Events Stream widget. The yellow LED on the board will also turn on. To turn it off, type in ‘0’ and click ‘Send Event.’ If any number other than 0 or 1 is used, it will change states from off to on or vice versa.
To learn more about how toggle and blink works, view the ‘LED Toggle and Blink’ Workflow in Workflow Studio or view Appendix B .
In this step, you will create a workflow from scratch to be able to detect noise.
First, you’ll need to activate a tag that you will be using in the workflow. Navigate to Config > Data Streams on the left sidebar.
Hovering over the ‘raw’ stream, click on ‘Edit’. This will open up a page that shows all the tags transmitted from the board to the cloud.
Scroll down the list and look for the tag “raw.mic_fft_max.”
Check the checkbox. Then, scroll to the bottom and click ‘Save Data Stream.’
You will now have access to use that tag throughout Renesas IoT Sandbox. Now you can build your workflow that will be triggered by this tag.
Navigate to “Workflow Studio” on the left sidebar.
Click on ‘Create.’
This will open a new blank workflow canvas.
In the name text area, type “Voice Detection” and click anywhere else on the canvas to save the name.
Click on the “Tags & Triggers” icon on the right sidebar. This is where you will specify when the workflow will run.
Click on “raw” and then look for “mic_fft_max”. Click and drag “mic_fft_max” onto the white canvas.
Next, click on “Modules.” Under “Foundation”, click and drag “Base Python” into the canvas.
Connect the nodes between the two boxes.
Next, click on Outputs on the right sidebar.
Click on the “Output” drop-down and click and drag “Processed Stream – Single” onto the canvas. Connect the node to the “Base Python” module.
Double click on the “Base Python” blue box. A popup should appear.
Continue to Part 3