Return to IoT Kits

9. MATLAB Scripts

The ThingSpeak Internet of Things platform provides access to the powerful MATLAB programming environment. MATLAB scripts let you visualize, analyze, and manipulate data from your ThingSpeak channel.

Some scripts used on my ThingSpeak channel are listed below. You can add these visualizations to your ThingSpeak channel by entering your channel ID and API Read Key into the script.

This link provides instructions for using MATLAB with ThingSpeak:

Follow this link to see live data from the IoT Kits D1M-WX1 Weather Station in Centreville, Virginia, USA.

Current Weather – Imperial

This MATLAB visualization shows current values from your weather station in conventional US units. The values are taken from your ThingSpeak channel at the time your webpage is opened. You must manually update the chart by refreshing your browser.

Current Weather and Zambretti Forecast

This MATLAB visualization shows current values from your weather station in metric and conventional US units. The barometric pressure and trend are used to make a Zambretti weather prediction good for about 12-hours. The values are taken from your ThingSpeak channel at the time your webpage is opened. You must manually update the chart by …

Temperature and Dewpoint

This MATLAB visualization calculates the dewpoint from temperature and humidity. The formula is given at https://en.wikipedia.org/wiki/Dew_point. The values are taken from your ThingSpeak channel at the time your webpage is opened. You must manually update the chart by refreshing your browser.

Light Intensity and Cell Voltage

This MATLAB visualization overlays light intensity on cell voltage. The values are taken from your ThingSpeak channel at the time your webpage is opened. You must manually update the chart by refreshing your browser.

Barometric Trend

This MATLAB visualization displays the latest three hours of barometric pressure and determines the trend based on the pressure difference over the three hours. The values are taken from your ThingSpeak channel at the time your webpage is opened. You must manually update the chart by refreshing your browser.

Signal Strength Histogram

This MATLAB visualization displays the incidence of WiFi signal strength received by your weather station over the most recent 24 hours.

Time Awake Histogram

This MATLAB visualization displays the D1 Mini time awake for each reporting cycle over the most recent 24 hours. It calculates the total awake time and the average awake time per cycle.