Book Image

Arduino Development Cookbook

By : Cornel M Amariei
Book Image

Arduino Development Cookbook

By: Cornel M Amariei

Overview of this book

Table of Contents (16 chapters)
Arduino Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Wireless serial


Sometimes we just want to cut the wires and send data over air. Believe it or not, it's not that difficult. We can quickly transform a serial or software serial port into a wireless one if we have a wireless transmitter and receiver pair. These wireless components are quite cheap and easy to find. They are available in a few different frequencies, and they are very easy to set up.

We will use the code from the previous recipe, Software serial and UART between Arduinos; except that we will implement the serial over air. There is a catch; we can only send data in one direction.

Getting ready

To execute this recipe, we need the following ingredients:

  • 2 Arduinos

  • Jumper cables

  • One RF link transmitter and RF link receiver pair

How to do it…

The following are the steps to connect two Arduino UNOs using Software Serial over wireless:

  1. Assuming we use pins 8 and 9 for RX and TX on both Arduinos, connect pin 9 on the master Arduino to the DATA pin on the transmitter.

  2. Connect pin 8 on the slave...