Want to get the attention of students by integrating the Internet of Things (IoT) into your embedded microcontroller (MCU) course? Using the MSP430F5529 USB LaunchPad Evaluation Kit coupled with the SimpleLink™ Wi-Fi® CC3100 BoosterPack, students can quickly experience how a sensor network operates, importing tweets (data) to monitor positive or negative sentiments.
To create your own sensor network using Twitter, you'll need: |
This novel application “listens” to Twitter via IBM's Node-RED, an open-source, visual programming tool, which provides the cloud component of the system. Developers can actually make a choice on whether they want intelligence and logic on the hardware versus offloading it into the cloud, which is considered the best place to do sentiment analysis due to the need for data-intensive algorithms.
By using such popular services as Twitter or Facebook together with M2M protocols like MQTT, and TI’s new SimpleLink Wi-Fi bundle, not only will you have an engaging way to spice things up, the example is easy to add to existing course work. You’ll also be adding something highly relevant, given that Wi-Fi is essentially ubiquitous and cloud-based IoT applications are rapidly expanding – with the number of devices connected to the Internet estimated at 50 billion by 2020.
(Please visit the site to view this video)
How it works
As seen in the video, the LaunchPad is hooked up to the SimpleLink Wi-Fi Network Processor to listen to all public tweets with the Twitter hashtag, “#football.” Anytime, anywhere in the world, when someone tweets a message with #football, the application sees it. Node-RED filters for #football, passing the tweets to a sentiment block to be scored and aggregated. Tweets and scores are then translated to MQTT messages sent over the Internet and through Wi-Fi to the Launchpad. This enables the LaunchPad and BoosterPack to interact with other connected devices or web services.
As positive tweets are captured in a row, they are visualized on an 8x8 LED matrix that is daisy chained together and connected to an RGB strip, which glows green as positive sentiments increase, getting progressively brighter. Should sentiments shift to negative, the green dims, eventually turning red. With this flow it is possible to capture each tweet, save the entire Twitter message, analyze its sentiment and get an aggregate score, demonstrating the flexibility of IoT applications.
Energia, an easy-to-use, open-source software development environment, is used to program the LaunchPad. Students who have used other tools for writing code on the MCU will be happy to see a familiar environment with many of the same functions they are used to interacting with. (Learn more about working with Energia and Code Composer Studio™ integrated development environment (IDE) here.)
Node-RED is an open-source, visual programming tool that runs on IBM’s Blue Mix platform. A scalable solution, it allows users to drop and drag data feeds and pull through other functions for more manipulation.
Along with Twitter, the SimpleLink Wi-Fi CC3100 BoosterPack plus the MSP430F5529 USB LaunchPad Evaluation Kit combination can be used to develop any manner of interactive objects, taking inputs from a variety of switches or sensors to control lights, motors and other physical outputs. Students can build sensor networks with everything necessary to talk to the cloud. The application functions as both a client (publisher) and web server (subscriber), with the Twitter example illustrating a “publisher” application. It could just as easily be the publisher of data for such things as monitoring temperature, etc. The entire system is developed from off the shelf products and runs on a lithium battery so it can be designed for mobile applications.
Easily integrate IoT in your lab
Integrating IoT into your lab curriculum has never been easier with the CC3100 BoosterPack, especially since no exhaustive effort is required to create custom teaching modules from scratch. Coupled with easy-to-use, free software, TI has simplified the process, integrating all of the essential components into an inexpensive, complete development tool bundle. Combined with the MSP430F5529 USB LaunchPad rapid prototyping kit, the system features Wi-Fi connectivity in a convenient BoosterPack as part of the popular LaunchPad ecosystem. The SimpleLink Wi-Fi CC3100 BoosterPack comes with the CC3100 software development kit (SDK), which is easily programmable using either Energia or Code Composer Studio IDE.
From a teaching perspective, the CC3100 BoosterPack is an ideal, low-cost tool to teach wireless connectivity in a relevant way by attaching it to existing MCU course objectives. It helps students understand concepts for using hybrids and protocols, to quickly solving problems. Once applications such as the Twitter example are mastered, it is just a short leap for students to create applications on their own with this highly versatile kit.
Get more information on the SimpleLink Wi-FiCC3100 BoosterPack and MSP430F5529LaunchPad bundle here.