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

eBook
AU$30.99 AU$44.99
Paperback
AU$55.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

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 : 9781837632619
Category :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.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
AU$249.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 AU$5 each
Feature tick icon Exclusive print discounts
AU$349.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 AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 186.97
Arduino Data Communications
AU$55.99
Developing IoT Projects with ESP32
AU$68.99
Arduino IoT Cloud for Developers
AU$61.99
Total AU$ 186.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela