tutorials – Internet of Things https://blogs.mathworks.com/iot Hans Scharler is an Internet of Things pioneer. He writes about IoT and ThingSpeak IoT platform features. Mon, 12 Feb 2018 15:24:47 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 Don’t Get Stuck in the Mud, Understand Tide Levels with MATLAB https://blogs.mathworks.com/iot/2017/09/14/dont-get-stuck-in-the-mud-understand-tide-levels-with-matlab/?s_tid=feedtopost https://blogs.mathworks.com/iot/2017/09/14/dont-get-stuck-in-the-mud-understand-tide-levels-with-matlab/#respond Thu, 14 Sep 2017 14:25:28 +0000 https://blogs.mathworks.com/iot/?p=2189

Tides go up and down. But, the question is when and how will the tide levels change in the future. If you are planning a boating trip or trying to understand how the wind affects tide levels during... read more >>

]]>
Tides go up and down. But, the question is when and how will the tide levels change in the future. If you are planning a boating trip or trying to understand how the wind affects tide levels during storms, you want to predict the tide levels using data that you have collected locally. In a tutorial published on Hackster.io, you will be able to learn how to use ThingSpeak to collect sensor data that represents the tide height at a given time, use MATLAB to preprocess the data, use MATLAB to predict future tide levels, and use ThingSpeak to send alerts. Here’s what the system looks like installed at a dock in Cape Cod.

The tide height is calculated using an ultrasonic level sensor. This measurement is taken periodically and then sent to ThingSpeak, an IoT analytics cloud platform by MathWorks, using a cellular modem. The system can easily be adapted to collect data about any environmental system such as greenhouses or oyster farms.

Once you have the data in a ThingSpeak channel, you use MATLAB to preprocess and clean up the data. The raw data some times has extraneous values caused by environmental factors such as lighting, cabling, and electrical interference. Sometimes, you have missing data caused by connectivity issues. It is important to clean up the data before you use the data in your analysis.

To predict future tide levels and send alerts when the tide is rising or falling, we use the MATLAB Analysis app on ThingSpeak. With MATLAB, we can use historical data to make a prediction about the future tide levels. This predicted tide level can be used to help schedule a boating trip or plan for a water surge after a storm.

 

Tide Alerts

Remembering to check the tide level when fishing or lazing on the beach is not particularly convenient. A much more useful approach is to have the system send a message when the time has come to pack up and start heading back to the dock. The timing of the alert depends on how much water depth is needed by a particular boat. Larger boats need higher water levels in order to move without getting stuck in the mud. One way to send alerts is to use ThingSpeak and MATLAB to detect changes in tidal height and send alerts.

Conclusion

Developing a tide monitoring system provided accurate tide level measurement and tide level prediction, with the added ability to send alerts. Robert has been able to avoid being stuck in the bay by providing enough time to get back to his dock using this system. This project also serves as a useful approach to solving many data-driven puzzles by having a reliable way to collect, analyze, and act on data. Using MATLAB, the accuracy of the tide levels improved by understanding the proper tide levels at a specific location and when the tide levels will change. If you used the general tide forecast, you would have to account for several inches of tide height difference.

Resources

]]>
https://blogs.mathworks.com/iot/2017/09/14/dont-get-stuck-in-the-mud-understand-tide-levels-with-matlab/feed/ 0
Building a Dynamic and Self-organizing Network of Devices https://blogs.mathworks.com/iot/2017/03/25/building-a-dynamic-and-self-organizing-network-of-devices/?s_tid=feedtopost https://blogs.mathworks.com/iot/2017/03/25/building-a-dynamic-and-self-organizing-network-of-devices/#respond Sat, 25 Mar 2017 19:24:56 +0000 https://blogs.mathworks.com/iot/?p=2039

Anders Sollander, a principal technical consultant at MathWorks, and his team put together a project to determine what demo was the most popular at one of our demo showcases. Anders made an... read more >>

]]>
Anders Sollander, a principal technical consultant at MathWorks, and his team put together a project to determine what demo was the most popular at one of our demo showcases. Anders made an assumption that if your demo was popular, you would have a lot of visitors. If you have a lot of visitors, your demo would be the loudest.

Anders was determined to measure sound from over 20 demo stations at the same time and figure out who the the winner is. This turns out to be a complicated challenge and he used our tools such as MATLAB, Simulink, and ThingSpeak, to produce some interesting results. Here’s what the raw data looks like from just five sound sensor nodes at the demo stations.

The sensor nodes uses the Arduino Nano devices because they’re small, low-cost, and Simulink has an Arduino support package. Arduino Nano’s both low cost and energy efficient which is great, but it doesn’t have Wi-Fi. They connect the sensor nodes to an Internet-connected Raspberry Pi using an RF mesh network with the nRF24l01+ radio. The RF24 solution is both very cheap and energy efficient, which is valuable if you’re running them with battery power. Simulink Coder has a Raspberry Pi Support Package which simplified the workflow.

When you follow the tutorial, you are going to learn many things and experience their analytic workflow as they decide how to develop an algorithm to normalize sound levels, determine which data to send to ThingSpeak, and build visualizations to see the results of the project.

Anders also shared a library on File Exchange that allows users to communicate with RF24 chips on Raspberry Pi and Arduino boards. The library relies on the RF24Mesh library, and has S-functions that interact with the classes there. The File Exchange submission includes an example for the Arduino to read sensor data from a temperature sensor and sends it to the gateway Raspberry Pi and then sends the data to ThingSpeak. In order to download the File Exchange, you need to sign in with your MathWorks account. This would be the same account that you use on ThingSpeak.com.

Visit ThingSpeak Tutorials, to see the complete tutorial for Building a Dynamic and Self-organizing Network of Devices.

]]>
https://blogs.mathworks.com/iot/2017/03/25/building-a-dynamic-and-self-organizing-network-of-devices/feed/ 0
Forgetting Something on Your To Do List? Use MATLAB to Analyze Your Tasks. https://blogs.mathworks.com/iot/2016/09/09/use-matlab-to-analyze-your-tasks/?s_tid=feedtopost https://blogs.mathworks.com/iot/2016/09/09/use-matlab-to-analyze-your-tasks/#respond Fri, 09 Sep 2016 18:34:59 +0000 https://blogs.mathworks.com/iot/?p=1917

Allie Fauer, a designer from New York, has released another awesome Instructable tutorial on how to build a “To Do List Reminder Light”. This project is very creative and easy to build on... read more >>

]]>
Allie Fauer, a designer from New York, has released another awesome Instructable tutorial on how to build a “To Do List Reminder Light”. This project is very creative and easy to build on your own. Allie tracks her tasks on an app called Todoist. With a little help of the MATLAB Analysis app on ThingSpeak, Allie is able to analyze her tasks and alert herself of anything overdue. She gently reminds herself with a glowing “Remembrall” globe.

To Do List Reminder Light

Allie uses the MATLAB Analysis app on ThingSpeak to check her to do list and see if anything is overdue. If a task is overdue, the MATLAB code writes the task overdue into a ThingSpeak channel. The MATLAB code is very straightforward and does a bit of analysis on her task list to see what is overdue. To get the MATLAB Analysis code to keep checking her task last, she schedules the MATLAB code using the TimeControl app on ThingSpeak.

Allie also has other ideas on how to make use of her status light:

  • Alert you when you’ve forgotten to water your plants
  • Tell you when you’re out or range of important objects like your keys or wallet
  • Combine with IFTTT to alert you when you’ve forgotten to respond to emails or phone notifications

To build your own Remembrall light, follow the step-by-step tutorial on Instructables.

]]>
https://blogs.mathworks.com/iot/2016/09/09/use-matlab-to-analyze-your-tasks/feed/ 0
IoT Quick Start With the Arduino MKR1000 and ThingSpeak https://blogs.mathworks.com/iot/2016/05/27/iot-quick-start-with-the-arduino-mkr1000-and-thingspeak/?s_tid=feedtopost https://blogs.mathworks.com/iot/2016/05/27/iot-quick-start-with-the-arduino-mkr1000-and-thingspeak/#comments Fri, 27 May 2016 17:38:29 +0000 https://blogs.mathworks.com/iot/?p=1833

If you are looking to start with the Internet of Things, then try out the Arduino MKR1000 and connect it to the ThingSpeak IoT Platform. We have put together a complete tutorial that uses the MKR1000... read more >>

]]>
If you are looking to start with the Internet of Things, then try out the Arduino MKR1000 and connect it to the ThingSpeak IoT Platform. We have put together a complete tutorial that uses the MKR1000 to collect data about your Wi-Fi signal and send it to ThingSpeak for storage, analysis, and visualization.

Arduino MKR1000

The Arduino MKR1000 is a great starting point when learning about the “things” in IoT. The MKR1000 has a microcontroller, Wi-Fi module, encryption module, and a battery-charging circuit. It’s easy to get started and once you get it connected to ThingSpeak, you have a lot of “cloud power”. ThingSpeak has a suite of apps to allow the Arduino to post messages to Twitter, do data analysis, show charts and visualizations, and be controlled by schedules and external events. With these building blocks you can prototype any IoT system.

ThingSpeak Channel Data

Once you have your data on ThingSpeak, you can analyze and visualize the data with built-in MATLAB apps.

[via ThingSpeak Tutorials]

]]>
https://blogs.mathworks.com/iot/2016/05/27/iot-quick-start-with-the-arduino-mkr1000-and-thingspeak/feed/ 6
ThingSpeak is a New Hackster Platform for Sharing Projects https://blogs.mathworks.com/iot/2016/03/31/thingspeak-is-a-new-hackster-platform-for-sharing-projects/?s_tid=feedtopost https://blogs.mathworks.com/iot/2016/03/31/thingspeak-is-a-new-hackster-platform-for-sharing-projects/#respond Thu, 31 Mar 2016 15:48:10 +0000 https://blogs.mathworks.com/iot/?p=1760

Hackster.io announced that ThingSpeak is now a platform on their project sharing website! The ThingSpeak platform joins the likes of Amazon Echo, ESP8266 Wi-Fi, and Particle.io platform. ThingSpeak... read more >>

]]>
Hackster.io announced that ThingSpeak is now a platform on their project sharing website!

Hackster Platforms

The ThingSpeak platform joins the likes of Amazon Echo, ESP8266 Wi-Fi, and Particle.io platform. ThingSpeak users can easily document, share, and reproduce hardware and Internet of Things projects using Hackster.io. We are already off to a great start with 13 documented projects and tutorials and 31 community members. Check out our platform on Hackster.io to discover great projects and build your own IoT projects.

]]>
https://blogs.mathworks.com/iot/2016/03/31/thingspeak-is-a-new-hackster-platform-for-sharing-projects/feed/ 0
Getting Started with IoT using the Particle Electron and ThingSpeak https://blogs.mathworks.com/iot/2016/03/08/getting-started-with-iot-using-the-particle-electron-and-thingspeak/?s_tid=feedtopost https://blogs.mathworks.com/iot/2016/03/08/getting-started-with-iot-using-the-particle-electron-and-thingspeak/#comments Tue, 08 Mar 2016 19:59:17 +0000 https://blogs.mathworks.com/iot/?p=1737

Julien Vanier over at Hackster.io created a new tutorial showing you how to get started with the Internet of Things using the new Particle Electron and ThingSpeak. The Electron is a new 3G connected... read more >>

]]>
Julien Vanier over at Hackster.io created a new tutorial showing you how to get started with the Internet of Things using the new Particle Electron and ThingSpeak.

Particle Electron Kit using ThingSpeak IoT

The Electron is a new 3G connected IoT device using cellular data and works anywhere you can get 3G in the United States. It is really awesome to plug-in a device and get it connected without the issues of Wi-Fi. This development kit also makes it possible to build battery-powered, mobile sensors. Good thing that ThingSpeak supports GPS data and offers sensor data analytics.

Check out Julien’s tutorial to go “From 0 to IoT in 15 Minutes” and other ThingSpeak projects on Hackster.io.

]]>
https://blogs.mathworks.com/iot/2016/03/08/getting-started-with-iot-using-the-particle-electron-and-thingspeak/feed/ 2
Send Messages From Devices to Slack Using ThingSpeak [tutorial] https://blogs.mathworks.com/iot/2015/12/08/send-messages-from-devices-to-slack-using-thingspeak/?s_tid=feedtopost https://blogs.mathworks.com/iot/2015/12/08/send-messages-from-devices-to-slack-using-thingspeak/#respond Tue, 08 Dec 2015 22:43:38 +0000 https://blogs.mathworks.com/iot/?p=1585

Slack is a team collaboration tool to make your work life simpler. It is an extremely popular way to receive messages from team members all in one place and integrate with external web services. One... read more >>

]]>
Slack is a team collaboration tool to make your work life simpler. It is an extremely popular way to receive messages from team members all in one place and integrate with external web services. One possible integration is with ThingSpeak. ThingSpeak is an open data platform for the Internet of Things. Devices all around the world are using ThingSpeak to collect data from sensors and send data to apps and other devices. In the not too distant future, things will be a part of your team. Relevant equipment statues, sensor readings, and updates will inform decisions and will be shared among team members and other Slack services.

Arduino Slack ThingSpeak

By following our tutorial, you will be able to use ThingSpeak to send messages to your team’s Slack channel. This will also allow devices like an Arduino to use Slack since ThingSpeak will take care of authentication and HTTPS.

]]>
https://blogs.mathworks.com/iot/2015/12/08/send-messages-from-devices-to-slack-using-thingspeak/feed/ 0
Sending Tweets Automatically Every Morning With TimeControl https://blogs.mathworks.com/iot/2014/10/09/official-tutorial-sending-tweets-automatically-every-morning-with-timecontrol/?s_tid=feedtopost https://blogs.mathworks.com/iot/2014/10/09/official-tutorial-sending-tweets-automatically-every-morning-with-timecontrol/#respond Thu, 09 Oct 2014 17:57:40 +0000 https://blogs.mathworks.com/iot/?p=1307 TimeControl can be used to send Tweets automatically at predetermined times.  In this tutorial, we’ll be sending a Tweet every weekday with the current time and the current CheerLights... read more >>

]]>
TimeControl can be used to send Tweets automatically at predetermined times.  In this tutorial, we’ll be sending a Tweet every weekday with the current time and the current CheerLights color.

The first step is to link a Twitter account to ThingSpeak.

Next, we’ll create a new TimeControl with the following values:

  • Name: “CheerLights to Twitter”
  • Frequency: “Recurring”
  • Days: “Mon”, “Tue”, “Wed”, “Thu”, “Fri”
  • Time: “9:40 am”
  • Fuzzy Time: “+/- 10 minutes”
  • Action: “ThingTweet”
  • Tweet: “It is currently %%datetime%% and CheerLights is %%channel_1417_field_1%%.”
  • Twitter Account: (select your linked Twitter account)

Save this TimeControl and you’re finished.  Every weekday within 10 minutes of 9:40 am in your timezone, TimeControl will send a Tweet with the current datetime and the current CheerLights color.

The CheerLights Channel ID is 1417, and colors are saved in field 1, so %%channel_1417_field_1%% will be replaced with the current CheerLights color.  You can change these values to access the most recent data from your own Channels.

Here’s an example Tweet from this tutorial.

]]>
https://blogs.mathworks.com/iot/2014/10/09/official-tutorial-sending-tweets-automatically-every-morning-with-timecontrol/feed/ 0
[Official Tutorial] Connecting Electric Imp to ThingSpeak IoT Data Services https://blogs.mathworks.com/iot/2014/05/06/connecting-electric-imp-to-thingspeak-iot-data-services/?s_tid=feedtopost https://blogs.mathworks.com/iot/2014/05/06/connecting-electric-imp-to-thingspeak-iot-data-services/#respond Tue, 06 May 2014 21:18:29 +0000 https://blogs.mathworks.com/iot/?p=1219

Build Open Data Applications with Electric Imp and ThingSpeak! Electric Imp is a connectivity platform for connecting Wi-Fi devices to cloud services, much like RealTime.io and Iota Wi-Fi modules... read more >>

]]>
Build Open Data Applications with Electric Imp and ThingSpeak!

Electric Imp is a connectivity platform for connecting Wi-Fi devices to cloud services, much like RealTime.io and Iota Wi-Fi modules and Spark.io. Some Electric Imp module’s come in an SD card form factor and adds Wi-Fi connectivity to what’s connected to the Electric Imp module. Access to the Electric Module happens via the Electric Imp cloud. While connectivity is simplified with the Electric Imp system, you will need a data service like ThingSpeak to complete the Internet of Things experience. Once data from Electric Imp devices are in ThingSpeak, you can easily build applications and interactivity with other devices and platforms.

Electric Imp to ThingSpeak Internet of Things

We put together a quick start tutorial for the Electric Imp and ThingSpeak, so you can quickly and easily get the Electric Imp talking to ThingSpeak. The tutorial uses parts from SparkFun – the Electric Imp Wi-Fi SD module, breakout board, and USB cable / power supply.

Get started now…  Check out the official Electric Imp and ThingSpeak Tutorial and source code on GitHub.

]]>
https://blogs.mathworks.com/iot/2014/05/06/connecting-electric-imp-to-thingspeak-iot-data-services/feed/ 0
Réaliser une courbe, un graphique avec ThingSpeak tutorial [French] https://blogs.mathworks.com/iot/2013/03/17/realiser-une-courbe-un-graphique-avec-thingspeak-tutorial-french/?s_tid=feedtopost https://blogs.mathworks.com/iot/2013/03/17/realiser-une-courbe-un-graphique-avec-thingspeak-tutorial-french/#respond Sun, 17 Mar 2013 05:21:50 +0000 https://blogs.mathworks.com/iot/?p=1029 [fredblabla] created a video tutorial on how to make a chart with ThingSpeak. This tutorial is in French and clearly explains how to setup a channel, post data to a channel, customize the charts, and... read more >>

]]>
[fredblabla] created a video tutorial on how to make a chart with ThingSpeak. This tutorial is in French and clearly explains how to setup a channel, post data to a channel, customize the charts, and add plugins to your ThingSpeak Channel page.

Merci beaucoup.

[via YouTube]

]]>
https://blogs.mathworks.com/iot/2013/03/17/realiser-une-courbe-un-graphique-avec-thingspeak-tutorial-french/feed/ 0
Send Tweets using Arduino Ethernet [Updated Tutorial] https://blogs.mathworks.com/iot/2012/12/07/send-tweets-using-arduino-ethernet-updated-tutorial/?s_tid=feedtopost https://blogs.mathworks.com/iot/2012/12/07/send-tweets-using-arduino-ethernet-updated-tutorial/#comments Fri, 07 Dec 2012 05:36:46 +0000 https://blogs.mathworks.com/iot/?p=1022 We have updated our ThingTweet Tutorial to cover the Arduino Ethernet and the new Arduino IDE (v1 and above). ThingTweet is a ThingSpeak App that allows you to send Twitter status updates via your... read more >>

]]>
We have updated our ThingTweet Tutorial to cover the Arduino Ethernet and the new Arduino IDE (v1 and above). ThingTweet is a ThingSpeak App that allows you to send Twitter status updates via your Arduino microcontroller with an Ethernet shield or with Ethernet integrated onto one board. Our Arduino examples for ThingSpeak and ThingSpeak Apps have been moved to GitHub, so that you can easily download, modify, and contribute updates.

]]>
https://blogs.mathworks.com/iot/2012/12/07/send-tweets-using-arduino-ethernet-updated-tutorial/feed/ 4
Getting Started with ThingSpeak – Video Tutorials https://blogs.mathworks.com/iot/2012/03/26/getting-started-with-thingspeak-video-tutorials/?s_tid=feedtopost https://blogs.mathworks.com/iot/2012/03/26/getting-started-with-thingspeak-video-tutorials/#comments Mon, 26 Mar 2012 10:55:15 +0000 https://blogs.mathworks.com/iot/?p=936 “You might have recently heard about ‘Internet of Things’. You may even be wondering what things are…” We are starting a video tutorial series, so you can see how to get... read more >>

]]>
“You might have recently heard about ‘Internet of Things’. You may even be wondering what things are…”

We are starting a video tutorial series, so you can see how to get started with ThingSpeak right away. The first two videos are available now along with our 20 other tutorials for ThingSpeak. Check out the Tutorials section of the ThingSpeak Community website.

Introduction to the “Internet of Things” and ThingSpeak

ThingSpeak Channels

]]>
https://blogs.mathworks.com/iot/2012/03/26/getting-started-with-thingspeak-video-tutorials/feed/ 1
Using Arduino and Python to Update a ThingSpeak Channel https://blogs.mathworks.com/iot/2011/01/22/using-arduino-and-python-to-update-a-thingspeak-channel/?s_tid=feedtopost https://blogs.mathworks.com/iot/2011/01/22/using-arduino-and-python-to-update-a-thingspeak-channel/#respond Sun, 23 Jan 2011 00:28:20 +0000 https://blogs.mathworks.com/iot/?p=77 “mattyw” shows us how to read a thermistor temperature sensor with an Arduino and use a python script to update a ThingSpeak Channel. window.onload = document.write(" "); ... read more >>

]]>
“mattyw” shows us how to read a thermistor temperature sensor with an Arduino and use a python script to update a ThingSpeak Channel.

]]>
https://blogs.mathworks.com/iot/2011/01/22/using-arduino-and-python-to-update-a-thingspeak-channel/feed/ 0