Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arduino Data Communications
Arduino Data Communications

Arduino Data Communications: Learn how to configure databases, MQTT, REST APIs, and store data over LoRaWAN, HC-12, and GSM

Arrow left icon
Profile Icon Robert Thas John
Arrow right icon
NZ$31.99 NZ$46.99
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (3 Ratings)
eBook Nov 2023 286 pages 1st Edition
eBook
NZ$31.99 NZ$46.99
Paperback
NZ$58.99
Subscription
Free Trial
Arrow left icon
Profile Icon Robert Thas John
Arrow right icon
NZ$31.99 NZ$46.99
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (3 Ratings)
eBook Nov 2023 286 pages 1st Edition
eBook
NZ$31.99 NZ$46.99
Paperback
NZ$58.99
Subscription
Free Trial
eBook
NZ$31.99 NZ$46.99
Paperback
NZ$58.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Arduino Data Communications

Getting Started with Arduino

This chapter will provide a quick introduction to the Arduino ecosystem and enable you to pick boards for your projects. You will learn about the various board families and how they are positioned, and you will pick a board and write your first few lines of code to blink the RGB LED.

Arduinos are popular with students and within the maker community. However, for those who are not part of this community or for students working with Arduinos, it can be challenging to determine the right board to choose.

By the end of this chapter, you will have a solid understanding of the Arduino ecosystem and be equipped to make informed decisions when selecting Arduino boards for your projects. The knowledge you gain in this chapter will help you with picking the right boards for your project.

In this chapter, we’re going to cover the following main topics:

  • Learning about Arduino – the company
  • Learning about Arduino – the hardware
  • Learning about the Arduino IDE – the software
  • Learning about the Arduino programming language
  • Writing the first lines of code – Hello World

Let’s get started!

Technical requirements

Some of the requirements for this chapter, such as the Arduino IDE and the board of choice, will be covered before you get to the point where you need to write and run code.

You will require the following:

  • A computer capable of running the Arduino IDE
  • The Arduino IDE
  • The Arduino MKR WiFi 1010
  • A USB data cable

All the code examples for this chapter can be found on GitHub at https://github.com/PacktPublishing/Arduino-Data-Communications/tree/main/chapter-1/hello_world_mkr_wifi_1010. You can clone the repo or download the code and open the .ino file with the Arduino IDE.

Learning about Arduino – The company

Arduino is an open source hardware and software company that was set up to simplify how embedded systems engineering is taught to students at a tertiary level. It began as a project in 2005, designed and soldered on a printed circuit board (PCB) using an ATmega8 chip from Atmel. This was an 8-bit chip. While the particular chip on an Arduino board isn’t frequently brought up, the significance cannot be overstated.

The company provided both a board and a way to flash firmware onto the board. This simplified the process of getting machine code onto the chip that was put onto the board.

Over the years, Arduino has released additional boards with different chips and other peripherals on them, aimed at different users. It has made enhancements to the IDE, making it possible to support boards from other manufacturers. The Arduino programming language makes it possible to use one language to program different boards without dealing with the underlying differences. Finally, the Arduino Cloud provides an IoT interface for compatible boards.

Learning about Arduino – The hardware

Arduino provides various microcontroller unit (MCU) development boards. When Arduino is mentioned, a lot of users think of the Arduino Uno, which is arguably the most popular board from Arduino, as well as the most popular one manufactured by other companies based on the reference designs available from Arduino. These clones aren’t called Arduino, but something similar, such as the SparkFun RedBoard manufactured by SparkFun Electronics. The following photo shows various Arduino MCUs.

Figure 1.1 – Various Arduino MCUs

Figure 1.1 – Various Arduino MCUs

We will be using official Arduino boards in this book. By using an official Arduino board, you will be helping to support the company and its open source efforts.

You might start a conversation about boards with the question, “What is the best board for…?”. The answer, as to most questions, is, “It depends!

In the world of microcontrollers, the best board is the one that gets the job done while consuming the least amount of resources (power, memory, etc.). Power consumption ties right back to the chip. The greater the capability of a chip, the more complex it is, and the greater the power consumption, normally.

During development, it is normal to pick a board at random, complete the setup, ensure it is working, and then try to downsize the board. What this means is that, at first, you might not know how large your firmware will be, or what code will need to run on it. As a result, you could pick any medium-range board.

After you are done with development, you will know the exact size of your firmware, as well as the number of pins you have utilized and the communication protocols. Then, you can pick a smaller board that supports everything you need and deploy it for production. Or, even better, you could pick the chip and sensors that you need and design a new PCB!

The first place to find Arduino hardware is on the website: https://www.arduino.cc/en/hardware. You can find the complete list of boards, and, as of this writing, attempts to classify them into three categories:

  • Nano Family: Boards with a small footprint, some embedded sensors, and support for machine learning (ML).
  • MKR Family: Boards equipped with a low-power chip, a communication chip, a cryptographic chip, and support for various shields that make it possible to prototype without additional circuit work. These boards feature a 32-bit SAMD21 (ARM Cortex-M0+) chip from Microchip Technologies (https://ww1.microchip.com/downloads/en/DeviceDoc/SAM_D21_DA1_Family_DataSheet_DS40001882F.pdf).
  • Classic Family: The older, more popular boards and their shields.

The second place to find Arduino hardware is on the Pro website: https://www.arduino.cc/pro. This website exists because Arduino wants to be reclassified from just something that is meant for learning to something that can be put to industrial use. Prior to this time, people would learn on an Arduino board but use a board from a competitor for the final product. The Pro website lists hardware in six categories (https://www.arduino.cc/pro/hardware):

  • Portenta Family: Boards with the highest-rated chips for their generation, with carriers and shields that make edge deployments possible. Connectivity is provided via shields. The chip on these is a 32-bit dual-core STM32H747 (ARM Cortex-M7 and ARM Cortex-M4) from STMicroelectronics (https://www.st.com/en/microcontrollers-microprocessors/stm32h747-757.html).
  • Edge Control: Remote monitoring and control carrier boards, optimized for outdoor environments. These boards feature a 32-bit nRF52840 (ARM Cortex-M4) chip from Nordic Semiconductors (https://www.nordicsemi.com/Products/nRF52840). Edge control boards come with two additional slots for MKR boards that let you extend functionality.
  • Nicla Family: Thumb-sized boards with industrial-grade sensors and battery connectors. These are the smallest boards available from Arduino.
  • MKR Family: The same as the MKR family from the main website.
  • Nano Family: The same as the Nano family from the main website.
  • Gateways: Devices for LoRaWAN connectivity. We will discuss these in more detail in Chapter 7, Communicating with LoRaWAN.

Let’s proceed to consider how to pick a board for the projects you will be tackling in this book.

Choosing your board – The Arduino MKR family

The board of choice for this book will be the Arduino MKR family, an example of which is the Arduino MKR WiFi 1010 (https://docs.arduino.cc/hardware/mkr-wifi-1010). The MKR family of boards is targeted at makers or tinkerers, has a popular form factor that is forward compatible with the newer and more powerful Arduino Portenta family of Pro boards, and has a number of shields that minimize the need for solderless breadboards and soldering.

Rather than picking up this board alone, I would recommend purchasing a kit that comes with other components that you can utilize for projects in this book. This kit is the Arduino Oplà IoT Kit, which you can find at this URL: https://store.arduino.cc/products/arduino-opla-iot-kit.

You will get to work with other boards as the need for different communication methods arises. All MKR family boards utilize the same chip: the SAMD21 chip from Microchip Technologies running a 32-bit ARM Cortex-M0+.

The MKR family is made up of various boards with different capabilities, some of which are listed here:

  • Arduino MKR WiFi 1010: This board provides WiFi and Bluetooth connectivity
  • Arduino MKR FOX 1200: This board provides SigFox connectivity
  • Arduino MKR WAN 1310: This board provides LoRaWAN connectivity
  • Arduino MKR GSM 1400: This board provides GSM connectivity

Don’t worry if one or more of the communication options aren’t familiar right now, as we will cover them in a later chapter.

The boards have the following general features:

  • 8 digital I/O pins
  • 13 PWM pins
  • 7 analog input pins
  • 1 analog output pin
  • 1 each of UART, SPI, and I2C
  • 256 KB of CPU internal memory
  • 32 KB of SRAM
  • Onboard WiFi and Bluetooth connectivity
  • Onboard RGB LED

Make sure you refer to the documentation for any board that you are working with, from the manufacturer’s website. This will save you a lot of stress and time.

Every board has a pinout diagram. This document provides information on what capabilities each pin on the board has. You can find the pinout diagram for the MKR WiFi 1010 here: https://content.arduino.cc/assets/Pinout-MKRwifi1010_latest.pdf.

Next, let’s discuss the IDE, which provides assistance when you write your code.

Learning about the Arduino IDE

By definition, an IDE is a software application that provides facilities for software development; it normally consists of a source code editor and may include a debugger and build automation tools.

The Arduino IDE brings together a collection of tools and interfaces that make it easier to develop your firmware. The IDE is available for various operating systems from the following URL: https://www.arduino.cc/en/software.

A visit to the preceding URL will show you that there is a Cloud IDE and a Desktop IDE. Let’s take a closer look at each one.

Arduino Cloud IDE

The Cloud IDE complements the Arduino IoT Cloud that is available from the company. You can access the Cloud IDE from the following URL: https://create.arduino.cc/editor.

The Cloud IDE has a limit to how often you can compile code and deploy firmware, and is most useful in the following scenarios:

  • Your computer or operating system is unable to support an official version of the Arduino Desktop IDE
  • You would like to update the firmware on a device that is connected to the Arduino Cloud

The following screenshot shows a sample of what the IDE looks like. Note the items numbered 1 through 5 in the figure.

Figure 1.2 – The Arduino Cloud IDE

Figure 1.2 – The Arduino Cloud IDE

The large white section on the right is your code editor. The black section underneath provides output information when you perform operations such as code compilation and deployment.

The numbered sections provide certain functionality or information as follows:

  1. Sketchbook: This lets you manage your sketches (Arduino code is called a sketch). You can see a list of sketches in the middle section.
  2. Libraries: This lets you manage various libraries. These are code packages that let you work with some sensors, displays, or actuators, or that let you simplify complex tasks.
  3. Monitor: This lets you view output from your serial port, an interface that lets the board communicate with computers and other devices. It is frequently used for debugging purposes.
  4. SketchBook: This lets you create new sketches, upload sketches from your computer, or manage folders. This is only visible when you choose Sketch from the panel on the left.
  5. Notice pane: This only pops up to warn you that you need the Arduino Create Agent in order for the browser to communicate with your board. The Cloud IDE requires the Chrome browser.

Arduino Desktop IDE

If you haven’t already, you can get a copy of the Arduino Desktop IDE from the following URL: https://www.arduino.cc/en/software. After downloading and installing the appropriate version for your computer, you will be met with an interface similar to the one shown next. Please note the numbered sections.

Figure 1.3 –  The Arduino Desktop IDE

Figure 1.3 – The Arduino Desktop IDE

The white drop-down component at the top of the IDE lets you choose the board you are working with. Don’t worry if you can’t find your board; you can install it from Boards Manager. Let’s take a closer look at the numbered sections:

  1. This button deploys firmware to the selected board.
  2. This button verifies that the code will compile for the selected board. This does a few things, including checking for syntax errors and confirming that all libraries are certified to work for your chosen board/chip.
  3. Sketch Manager: This lets you view other sketches and open them for editing.
  4. Boards Manager: This lets you install definitions for additional supported boards.
  5. Library Manager: This lets you find and install libraries.
  6. Debug: This lets you step through your code and set breakpoints that make it easier to debug.
  7. Serial Plotter: This lets you plot numbers that are being written out to the serial console.
  8. Serial Console: This lets you inspect output being written to the serial console.

Let’s discuss the programming language next.

Learning about the Arduino programming language

The Arduino programming language is a subset of the C/C++ programming language. It’s okay if you haven’t written C/C++ before now, as getting started with Arduino is pretty straightforward.

Getting started with Arduino

The quickest way to get started is to click on the File menu on the Arduino IDE, then choose New. Doing that will give you a new file with a structure similar to the one in the following code block, which does nothing but give you a template to add instructions in:

void setup() {
}
void loop() {
}

The preceding code is made up of two sections:

  • The first section, void setup() {}, holds code that will be run exactly once when the microcontroller boots up. The code that gets executed is contained within the opening and closing curly brackets. Here is the code again:
    void setup() {
    }
  • The next section of code, void loop() {}, holds code that is executed repeatedly as long as the microcontroller is powered up. The code is also contained within the curly brackets. Here is the code again:
    void loop() {
    }

Let’s proceed to discuss GPIO pins.

General purpose input and output

A lot of the interaction that happens on a microcontroller is through the general purpose input and output (GPIO) pins. There are two categories of pins: digital and analog. The following pinout diagram for the MKR WiFi 1010 shows the pins.

Figure 1.4 – Arduino MKR WiFi 1010 pinout diagram (source – https://docs.arduino.cc/static/9d6534bb9783a42e3527a8c03472ad10/ABX00023-full-pinout.pdf)

Figure 1.4 – Arduino MKR WiFi 1010 pinout diagram (source – https://docs.arduino.cc/static/9d6534bb9783a42e3527a8c03472ad10/ABX00023-full-pinout.pdf)

The pin labels are color-coded to make it easier to identify pins by their function. Some pins have only one use, such as the Power and Ground pins. Other pins have multiple uses. Pay attention to the labels that are closer to the board on the left and right. You will see that 22 pins can be used as digital pins, while 7 of those can be used as analog pins in addition. However, no pins are labeled as input or output.

Let’s discuss how to configure pins for input or output depending on whether the pin is digital or analog.

Digital pins

Digital pins represent a state that depends on the amount of electricity flowing through them. There are two states:

  • Low state: This represents an OFF state or a FALSE state. This is set when the amount of electricity is below a certain reference.
  • High state: This represents an ON state or a TRUE state. This is set when the amount of electricity is above a certain reference.

A digital pin is configured as either of the following:

  • An input pin, used for reading the state of a peripheral attached to it. An example of this is a button. You can read the state of an input pin using the digitalRead() function.
  • An output pin, used to control the state of a peripheral attached to it. An example of this is an LED. You can set the state of an output pin using the digitalWrite() function.

You can configure a digital pin using the pinMode() function. The first parameter is the pin number, and the second is one of INPUT, OUTPUT, or INPUT_PULLUP. You will see this used in the Hello World example very soon.

Analog pins

Analog pins can hold a state between 0 and 1023, which is proportional to the voltage passing through the pin. There are two possible directions:

  • Input pins: These are connected to peripherals that send a voltage value over a range. This is how peripherals such as sensors work. You can read the value of the pin using the analogRead() function.
  • Output pins: These are connected to peripherals that can operate over a variable range, such as electric motors and actuators. You can set the value of the pin using the analogWrite() function.

You are now ready to write your first Arduino program.

Writing the first lines of code – Hello World

The first code that is introduced in programming is called Hello World. In microcontrollers, the first code blinks an LED. This is usually an onboard LED if one is present.

You will need your MKR board, a micro-USB cable, and the Arduino IDE to get started.

Installing the board

Use the following steps to set up your board:

  1. Launch the Arduino IDE, if it’s not running.
  2. Connect one end of the micro-USB cable to your computer.
  3. Remove the Arduino MKR board from its packaging and any black foam that it’s sitting on. Failure to do so will result in some unexpected behavior.
  4. Connect the MKR board to the other end of the micro-USB cable.
  5. A green power LED should light up to show that the board is now powered on.
  6. Select Arduino MKR WiFi 1010 from the board selector dropdown at the top of the IDE. If the board isn’t listed, go to Board Manager on the left, search for SAMD, and click Install under Arduino SAMD Boards.

We are now ready to program the MKR board. The IDE should look similar to the following figure.

Figure 1.5 – The IDE in the ready state

Figure 1.5 – The IDE in the ready state

Blinking the onboard LED

The MKR board has an onboard RGB LED. RGB stands for Red, Green, and Blue. The RGB LED is connected to three pins, as follows:

  • Green: pin 25
  • Red: pin 26
  • Blue: pin 27

The three pins let you control the three colors independently, control the intensity, and mix the colors to produce other colors.

Let’s write code to blink one or more of the LEDs. To do this, we will count from 0 to 7 in binary. This will give us three digits ranging from 000 to 111. If the digit is 0, we will turn off the corresponding LED, and if it’s 1, we will turn it on. We can do this using the pins in digital mode, which will not control the intensity of the light.

The code that does this follows. You can find this code in the GitHub repository for this book, or you can type it out:

#include <WiFiNINA.h>
#include <utility/wifi_drv.h>
#define redLED 25
#define greenLED 26
#define blueLED 27
byte counter = 0;
void setup() {
  WiFiDrv::pinMode(redLED, OUTPUT);
  WiFiDrv::pinMode(greenLED, OUTPUT);
  WiFiDrv::pinMode(blueLED, OUTPUT);
}
void loop() {
  WiFiDrv::digitalWrite(blueLED, bitRead(counter, 0));
  WiFiDrv::digitalWrite(greenLED, bitRead(counter, 1));
  WiFiDrv::digitalWrite(redLED, bitRead(counter, 2));
  counter > 6 ? counter = 0 : counter++;
  delay(1000);
}

The explanation for the code is as follows:

  • The first two lines include the libraries that are necessary for us to address the onboard LEDs. The LEDs on the MKR WiFi 1010 must be addressed via the WiFi library.
  • The next three lines define three constants that reflect the pins we would like to address. This isn’t mandatory, but it makes it easier for us to know what pins we are addressing in our code.
  • The next line defines a variable called counter, which defaults to 0.
  • Within the setup() function, we set all three LEDs to output mode.
  • Within the loop() function, we do three things:
    • The first three lines set the state of each of the LEDs by using the digitalWrite() function that is found within the WiFiDrv library. This function takes two parameters: the pin and the state. The pin is specified using one of the constants we declared earlier, and the state is obtained by using the bitRead() function. This function, in turn, takes two parameters: the number we would like to read and the index of the least significant bit we would like to read. For example, bitRead(6, 1) would first convert the decimal number 6 into the binary number 110, then it would read the second rightmost digit (it uses a 0-based index). The result would be 1.
    • The next line increases our counter using a ternary operator. It is basically an if-else statement that sets the counter to 0 if the value is greater than 6 or increases it if it isn’t.
    • The final line introduces a delay of a second (1,000 milliseconds) so that the human eye can see the LED that is lit.

Give the code a try and see how it runs on the board. The lights should range from off to blue and through a range all the way to white. There is a total of seven colors represented in this loop.

You will find the light to be too bright unless it is behind something such as a handkerchief that serves to dull the brightness. You can fix this by using analogWrite() and setting the value to 64 for a quarter of the brightness.

There is a second advantage to using analogWrite(). You can mix different ratios of the three primary colors to arrive at a lot more colors.

Summary

Throughout this chapter, you have gained knowledge about Arduino and its ecosystem, including its components and different board options. You have also selected a board to begin your journey. Furthermore, you have successfully installed the Arduino IDE and written your initial lines of code.

Moving forward to Chapter 2, Leveraging Various Sensors for Data Acquisition, you will delve into the realm of sensors. This chapter will explore the diverse range of sensors available and how they can be utilized to collect data. You will gain experience working with both standalone sensors and shield-mounted sensors by connecting them to the MKR board and writing code to extract data from these sensors.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Set up databases to store and retrieve information collected from various sensors
  • Ingest your data into your database for storage with REST APIs and MQTT
  • Communicate with your application layer using different communication technologies from Arduino MKR and Portenta H7
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

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.

Who is this book for?

This book is for embedded systems engineers and electronics engineers who want to build IoT devices and gain insights into storing data collected from these devices, as well as establish communication between devices. The skills you learn in this book will come in handy even if your final product isn't built on Arduino. While prior experience with computers is assumed, expertise with embedded systems such as Arduino is not a prerequisite. Familiarity with Arduino programming will be beneficial, but not necessary.

What you will learn

  • Explore data storage formats for both local and remote storage solutions
  • Build projects that leverage the variety of communication standards
  • Set up a database to host data transmitted from various projects
  • Use MQTT and RESTful APIs to send data from devices to remote systems
  • Prepare for multiple devices using high availability measures
  • Use LoRa by implementing a gateway and a client
  • Transmit temperature and humidity data over RS-485 and HC-12

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 30, 2023
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781837635979
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 30, 2023
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781837635979
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just NZ$7 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total NZ$ 198.97
Arduino Data Communications
NZ$58.99
Developing IoT Projects with ESP32
NZ$73.99
Arduino IoT Cloud for Developers
NZ$65.99
Total NZ$ 198.97 Stars icon
Banner background image

Table of Contents

19 Chapters
Part 1:Introduction to Arduino and Sensor Data Chevron down icon Chevron up icon
Chapter 1: Getting Started with Arduino Chevron down icon Chevron up icon
Chapter 2: Leveraging Various Sensors for Data Acquisition Chevron down icon Chevron up icon
Chapter 3: Prototyping with Shields Chevron down icon Chevron up icon
Chapter 4: Storing Data Collected from Sensors Chevron down icon Chevron up icon
Chapter 5: Implementing REST and MQTT Protocols for Communication Chevron down icon Chevron up icon
Part 2:Sending Data Chevron down icon Chevron up icon
Chapter 6: Utilizing Various Communication Technologies Chevron down icon Chevron up icon
Chapter 7: Communicating with LoRaWAN Chevron down icon Chevron up icon
Chapter 8: Working with Ethernet Chevron down icon Chevron up icon
Chapter 9: Leveraging Cellular Communication Technology Chevron down icon Chevron up icon
Chapter 10: Communicating via HC-12 Chevron down icon Chevron up icon
Chapter 11: Managing Communication with RS-485 Chevron down icon Chevron up icon
Part 3: Miscellaneous Topics Chevron down icon Chevron up icon
Chapter 12: Enhancing Security for Reducing Risk Chevron down icon Chevron up icon
Chapter 13: Scaling for High Availability Chevron down icon Chevron up icon
Chapter 14: Building and Manufacturing Hardware Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(3 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
William Feb 22, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Just want the Doctor ordered!
Subscriber review Packt
Tiny Jan 02, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
An unusual one for me, I have not personally used Arduino tools in pursuing DevOps, but “Arduino Data Communications” (Packt, 2023) By Robert Thas John makes a good case. This tool could come in handy if you are working on edge deployments or integrating sensors into on-site tools. The book does a great job of going through the various options, constructing the boards, and using different telecommunication settings. Three sections appear: an introduction to Arduino, sending data, and miscellaneous topics. Recommended for those seeking communication solutions to software difficulties. The first section deals with Arduino’s unique approach to building the development environment into the hardware board. This results in needing the physical connections for sensors and other tools. The section discusses using shields and carriers, external devices, and linking those connections to the Arduino tools to integrate data. It also discusses the challenges in storing data externally, the board does not hold the data, and the connections to various APIs and REST formats to enable the external board to succeed. Various data formats are included, from heat and humidity to motion and acoustic inputs. Connecting to sensors follows up in the second section with connections to various communication tools. Included are basic types of short, medium and long-range options before delving into some specific applications. First up in specifics is LoRaWAN, a Low-Power, Wide Area Network (LPWAN) protocol and its connections to The Things Network TTN. The TTN provides some easy and approved solutions and a way to register devices. The other transport devices are cellular comms, the HC-12, and the RS-485. Connections also discuss ethernet linkages; each section includes labs to test your skills. The final section discusses some strategic options for incorporating Arduino into your overall plan. These include security solutions, scaling for high availability, and building hardware. While all the tips were good, there was not a high lot different from any other type of solution. Security fixes included items like encryption and identity management while the scaling discussed power and network outages, hardware failures, and load-balancing across multiple boards. The building chapter does touch on using 3D printers to produce boards but unfortunately, no schematics were provided. If I had one complaint, it would be that I do not have a lot of experience in this area. I’ve done some work with microcontrollers, and wiring boards but not enough to push me into an Arduino type solution. Even when using edge devices, most of the connections are still either a direct visit to the site with a hard drive, or a encrypted Wifi type solution. If I was moving to Arduino, this book certainly offers enough tips for me to get started.Overall, “Arduino Data Communications” By Robert Thas John was a good read. Not quite all the way in my wheelhouse but with enough overlap that I can certainly see benefits. If the solutions you seek are more sensor and edge based, this is probably a good add. Also, if you enjoy working with hardware, and building your own boards, I’d pick this one up.
Amazon Verified review Amazon
Akshet Patel Dec 12, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
"Arduino Data Communications" is a valuable resource for anyone interested in learning how to use Arduino for data communications. The book is well-written and easy to understand, even for beginners, and provides a wealth of information on the subject.I highly recommend it to anyone looking to expand their knowledge of Arduino, IoT and data communications.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.