Book Image

Arduino Data Communications

By : Robert Thas John
5 (1)
Book Image

Arduino Data Communications

5 (1)
By: Robert Thas John

Overview of this book

In our modern, internet-connected world, where billions of devices constantly collect and send data to systems to be stored and processed, it’s surprising how the intricacies of data transmission and storage are often overlooked in the IoT domain. With Arduino Data Communications, you'll bridge the knowledge gap and become an expert in collecting data from IoT sensors, transmitting data, and configuring your own databases. This book is an exploration of IoT’s inner workings, guiding you through the process of setting up an end-to-end system that you can employ to prototype your own IoT solutions, using easy-to-follow examples. It begins with a general overview of the Arduino ecosystem, acquainting you with various sensors and shields and unveiling the art of data collection. You’ll then explore data formats and methods to store data, both locally and on database servers. As you progress through the chapters, you’ll learn how to set up REST and MQTT infrastructure to communicate with databases and get hands-on with LoRaWAN, Ethernet, cellular, HC-12, and RS-485. The final chapters are your training ground for real-world projects, imparting the essential knowledge you need to tackle complex challenges with confidence. By the end of this Arduino book, you'll have seamlessly configured an end-to-end system, all while immersing yourself in practical scenarios that bring the world of IoT to life.
Table of Contents (20 chapters)
1
Part 1:Introduction to Arduino and Sensor Data
7
Part 2:Sending Data
14
Part 3: Miscellaneous Topics

Setting up the hardware

The HC-12 module comes with five holes on one side. You can either mount it castellated or solver headers on it. Two of the connectors are meant for power (VCC) and ground (GND), while the other two are meant for serial communications (TXD and RXD). The final connector is labeled SET and is meant for reconfiguring the module. The opposite side of the module has an antenna connector (ANT) that is meant for RF input/output:

Figure 10.1 – The rear of the HC-12 module

Figure 10.1 – The rear of the HC-12 module

You should ensure that your modules are physically apart by a distance of at least 2 meters. This prevents unusual behavior. This distance requirement exists because of how the modules transmit and receive data using radio waves.

The module works with voltages between 3.2 V and 5.5 V. The required current must exceed 200 mA. Similar to setups that utilize cellular radios, you can’t power the setup via a USB cable. Instead, you will need to power it externally...