Book Image

Programming Arduino with LabVIEW

Book Image

Programming Arduino with LabVIEW

Overview of this book

Table of Contents (14 chapters)

Chapter 5. Making an XBee Smart Power Switch

In this chapter, we will build a remotely controlled smart power switch. This switch will be a do-it-yourself version of the power switches that you can find in many stores. We will be able to switch a device on and off and also measure the current consumption of the connected device. As the LabVIEW LINX interface for Arduino only supports serial-based communication at the time of writing this book, we will use XBee to communicate wirelessly with the project.

We will first connect the required components to our Arduino board: a relay module, a current sensor, and an XBee shield. Then, we will write a LabVIEW program to control the relay module and measure the current consumption of the connected device. Finally, we will see how to enable XBee communication between your computer and the project.