Chapter 7. Internet of Things with BeagleBone

In the last chapter, we controlled analog components. We have done lots of physical computing exercises up to now. We used BeagleBone much like any microcontroller board doing electronics projects. But BeagleBone has many more capabilities. It has a full-fledged Linux operating system running inside it. It has an Ethernet port built-in. We have not used many of its capabilities yet. We can run it as a webserver and extend our physical computing programs to be executed from the Internet. In this chapter we will first learn about the Internet of Things. Then we will create a Node.js webserver running on BeagleBone and control a connected LED and servo motor remotely (even via smartphone). This will be our first step towards the Internet of Things. To cover a real-life example, we will program BeagleBone to e-mail when it detects overheating.

This chapter will cover the following topics:

  • Why the Internet of Things?
  • What is the Internet of Things?
  • A program to create a new Node.js HTTP server
  • A program to control an LED through the web browser
  • A program to control a servo motor the through web browser
  • Sending an alert e-mail on over-temperature
  • What's next?

Why the Internet of Things?

The Internet of Things or IoT is a buzzword these days. Popular business analyst company Gartner has ranked IoT highest in the hype cycle of emerging technologies for 2014 and 2015. Analysts predict lots of growth in this technology. Many startups are working on this. Crowdfunding websites like Kickstarter (https://www.kickstarter.com/) and Indiegogo (https://www.indiegogo.com/) have successfully funded numerous IoT solutions. Established companies are investing a lot in IoT. Soon, we will see many of these things in our home and in our cities. Some of them are already available in the market, for example, smart bulbs that change their intensity depending on the outside light to save energy. They can also be controlled via smartphone app. The Amazon product dash can scan product barcodes or listen to any product name you say and that product is added to your Amazon online cart through your Wi-Fi connection. This saves time and effort when you want to buy multiple items. A wireless pacemaker helps control your heartbeat as well as store and provide heartbeat data logs wirelessly to decide medication. This was not possible previously without cutting into your skin. Our world will change a lot when we have connected smart watches, health bands, electrical plugs, room heaters, ovens, toys, door locks, helmets, street lights, parking lots, trash cans, coffee machines, and many more. So, it is important to know what we can do to implement IoT using BeagleBone.

We can see that technological growth has happened in different ages. A major milestone was achieved when the personal computer was invented. Soon many homes, institutes, and enterprises got access to computers. They were introduced to the digital world. People started using them for financial accounting, data backup, entertainment, publishing, and so on. The next age came along with the Internet. Homes with an Internet connection got connected. This communication solved lots of problems. People started exchanging information, creating social networks, hosting websites, using online banking, playing multiplayer games, using cloud backup, and so on. Still, connectivity was limited to the PC. It was often shared. There was no Internet connectivity option available for individuals all the time. The next era came along with smartphones. Anyone can remain online all the time using a personal smartphone. The average time individuals remain online has increased drastically. Social networks became even bigger after this. People started relying on information updates from institutes, employers, friends, and websites. People started making decisions based on the latest updates. Information is at everybody's fingertips.

When everybody is connected to the Internet, the next obvious era will be connecting every thing to the Internet, that is, the era of the Internet of Things. Communication in between these things to other things/humans will bring many possibilities. It will solve many problems. Smart things will exchange data to provide high availability of service, better interoperability, take safety measures, automation, gather data and analyze them, self-monitoring, notifying, and allowing the remote user to make decisions, and so on. IoT has diverse use cases in several industries like automobile, healthcare, agriculture, transportation, manufacturing and home automation, and so on. Humans have limitations. We cannot work 24 hours every day. We cannot remember all the data that we encounter. We do not like to do repetitive tasks. Here things come to rescue us. They can work 24/7 and can store and retrieve data on cloud storage accurately and reliably (considering a reliable network). Sensors and actuators give things the capability to know some information about the environment and respond. This information can be analyzed and visualized to draw important conclusions. IoT gives power to administer things remotely, which reduces distant visits including hazardous environment conditions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.135.36