Book Image

Arduino Android Blueprints

Book Image

Arduino Android Blueprints

Overview of this book

Table of Contents (17 chapters)
Arduino Android Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. Wi-Fi Smart Power Plug

In this chapter, we will build an open source version of a very commonly connected object—a Wi-Fi power plug. Indeed, these kind of plugs can be bought from many stores, and usually come with their own iOS or Android app.

In this chapter, we will build such a power plug from scratch, based on Arduino. We will connect a relay module, a current sensor, and a Wi-Fi module to an Arduino board to make our own Wi-Fi power plug. The power plug will be able to switch any device on and off, and will continuously measure the power consumption of the device.

We will build an Android app to switch on and off the power plug remotely via Wi-Fi. We will also be able to get the power output on request and display it on a screen.

The following topics will be the major takeaways from this chapter:

  • Connecting a relay module, a current sensor, and a Wi-Fi module to Arduino

  • Controlling the project by sending commands via Wi-Fi

  • Building an Android application to control the project...