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

REST API for InfluxDB

InfluxDB has an API baked in that makes it possible to make CRUD calls without having to implement a separate application.

Let’s begin by getting some sample data into our instance of InfluxDB.

Getting sample data into InfluxDB

Follow these steps to create a bucket and populate it with some sample data:

  1. Browse to the URL of the server that hosts your InfluxDB instance. The format of the URL is http://192.168.68.127:8086/. Ensure that you replace the IP address in the URL with the one for your server.
  2. Sign in with your username and password.
  3. Use the menu on the left to navigate to the Buckets screen, as shown in the following screenshot:
Figure 5.21 – Navigating to the Buckets screen

Figure 5.21 – Navigating to the Buckets screen

  1. Click on the + CREATE BUCKET button on the right of the screen, then fill in noaa in the Name field. Since this is a private server, I will set Delete Data to NEVER. If you would like to have InfluxDB manage...