Wireless Communications with Arduino and the ESP32 1st Edition Gary Hallberg download
Wireless Communications with Arduino and the ESP32 1st Edition Gary Hallberg download
https://ebookmeta.com/product/wireless-communications-with-
arduino-and-the-esp32-1st-edition-gary-hallberg/
https://ebookmeta.com/product/wireless-communication-
advancements-and-challenges-wireless-communications-and-
networking-technologies-1st-edition-prashant-ranjan/
https://ebookmeta.com/product/esp32-formats-and-communication-
application-of-communication-protocols-with-
esp32-microcontroller-1st-edition-neil-cameron/
https://ebookmeta.com/product/the-ex-girlfriend-of-my-ex-
girlfriend-is-my-girlfriend-advice-on-queer-dating-love-and-
friendship-1st-edition-maddy-court/
How to Create a Web3 Startup: A Guide for Tomorrow’s
Breakout Companies 1st Edition Tom Taulli
https://ebookmeta.com/product/how-to-create-a-web3-startup-a-
guide-for-tomorrows-breakout-companies-1st-edition-tom-taulli/
https://ebookmeta.com/product/administrative-law-i-p-
massey-9-ninth-edition-i-p-massey/
https://ebookmeta.com/product/exception-taken-how-france-has-
defied-hollywood-s-new-world-order-jonathan-buchsbaum/
https://ebookmeta.com/product/flavin-and-flavoproteins-maria-
barile/
https://ebookmeta.com/product/small-animal-surgery-5th-edition-
theresa-welch-fossum/
Tunguska A Siberian Mystery and Its Environmental
Legacy Andy Bruno
https://ebookmeta.com/product/tunguska-a-siberian-mystery-and-
its-environmental-legacy-andy-bruno/
Wireless Communications with Arduino and
the ESP32
Book 7 of the Arduino Short Reads Series
Gary Hallberg
The idea underpinning the Arduino short reads series is to provide a comprehensive, easy to follow
tutorial set and reference guide for anybody wanting to learn about Arduino and basic electronics.
Having a short reads series means that students and hobbyists can select key topics of interest in the
field with minimal outlay. The series aims to provide an easy introduction to all topics of interest and
expand on these topics to provide a broader and deeper understanding of that focus area. The books
are currently only available in Kindle format to provide a very inexpensive package backed up by video
content and interactive social media.
The series is aimed at youngsters and adults interested in getting into electronics and it takes a modern
approach, combining the use of the inexpensive software driven Arduino controller board, with a
multitude of sensors and discreet electronic components. The experiments in this series of books are
easy to follow, inexpensive to implement and compelling for all interested in STEM education. I hope
to inspire anybody looking for a future career in technology or to simply to have fun.
The first book of this series looks at the Arduino microcontroller and explains its operation and purpose.
Experiments look to show you how to set up the programming environment and drive LEDs as well as
read input from switches, thermistors and photocells. Book 1 will give you a solid foundation of how
some basic electronic components work and how to use them to make simple designs.
Book 8 in this Arduino Short Reads Series is still being written but the series focuses on the following:
• Book 1 – First Steps with Arduino (published)
• Book 2 – Working with Displays (published)
• Book 3 – Controlling Motors (published)
• Book 4 – Range Finding, Object Detection and Object Avoidance (published)
• Book 5 – Building a Simple Rover (published)
• Book 6 – Arduino Special Functions (published)
• Book 8 – The Arduino Leonardo
If you find this series of books useful then please leave your review and rating on
Amazon.
Follow North Border Tech Training on Facebook and Twitter for the latest news and
insights as to how this series will develop.
Foreword
When we look at current trends in technology, we often come across the term “Internet of Things” or
IoT for short. IoT is a broad term that can be applied to the myriad of smart devices in home, education,
and industry. Arduino is an excellent IoT learning platform. However, we have not yet covered a
fundamental aspect of IoT and that is the ability for smart device to communicate with each other over
wireless networks and the Internet. It is this part of our journey with Arduino that we will explore in
this book. We will take time to understand some basic aspects of Electromagnetic Radiation and how
radio works. We will look at basic Radio Frequency communications and dig deeper into Bluetooth.
Finally, we will learn about WiFi and the Internet and how we can use Arduino and related devices to
create web enabled projects.
We will deviate away from the native Arduino platform to look at the ESP32. The ESP32 is an extremely
capable microcontroller with integrated Bluetooth and WiFi that is both low cost and compatible with
the Arduino IDE. We will be clear about the benefits of using this platform compared to the native
Arduino devices.
Some of the concepts presented here are complex, so I will generalize when needed. I will also keep the
Arduino control aspects of the Experiments simple so as not to detract from the communications
elements of the experiments. That said, I have no doubt the skills learnt here will allow you to develop
more engaging and useful projects. Without further delay let us get into the content.
Prerequisites for this Book
This book assumes you have read Book 1 of the series (‘First Steps with Arduino’) or you already have
some experience of the Arduino platform, how to set up the IDE and undertake some basic Arduino
programming tasks. Basic functions such as ‘digitalRead’ and ‘digitalWrite’ are not covered here
but are explained in Book 1.
Download the Code
You can download the Arduino Code for the experiments in this book from GitHub using the link below.
https://github.com/ghallberg-nbtt/congenial-robot
I recommend that you do this as I have removed some of the comments from the code in the book
listings to aid readability in print form. I strongly recommend that you comment your code heavily to
facilitate understanding and to become familiar with best engineering practice.
Chapter 1: Radio Frequency Communications
with Arduino
In this chapter we will look at some basic radio communications within the Arduino Uno. You will be
familiar with key fobs that control car doors, doorbells, or devices remotely on a button press. These
are all radio devices that we can integrate into our Arduino projects. We start by learning a little about
what radio is.
What is Radio?
Radio waves are part of the Electromagnetic Spectrum, and we can control these waves to transmit
voice and data. Electromagnetic waves are all around us. They form visible light, radiation, microwaves.
All these phenomena are the same thing but radiate at different frequencies and wavelengths. Figure 1-
1 is an image produced by NASA that illustrates the Electromagnetic Spectrum very well.
Figure 1-1: The Electromagnetic Spectrum
Image source: Courtesy of NASA
We can represent the type of Electromagnetic Radiation in terms of frequency and wavelength. You can
see from Figure 1-1 that light oscillates like a wave and takes a sinusoidal form. The wave become more
compacted at the high end where Gamma Waves exist compared to the low end where AM radio exists.
The frequency is represented by the number of oscillation repetitions in 1 second. The unit of
measurement being ‘Hertz’ or Cycles Per Second. Hertz is presented by the letters ‘Hz’.
The wavelength is a measure of the length of a single oscillation and is calculated using the speed of
light in free space. The speed of light is a constant and is about 300,000Km/s in the vacuum of space,
but is slower for other media such as glass. The formula for wavelength calculation is represented below.
𝐶
𝜆=
𝑓
‘λ’ represents wavelength, ‘C’ is the speed of light and ‘f’ represents frequency.
We often use wavelengths in electronics. When we want a specific color of LED the datasheet will specify
the wavelength of that component. A red LED typically has a wavelength of 630nm. Infrared LEDs used
in remotes or for transmitting data over a fiber optic cable may have wavelengths of 850nm or 1310nm.
Infrared is just outside the range that the human eye can detect. Human visible light has wavelengths
between 380nm and 750nm.
It is important to understand wavelength and frequency in the context of radio transmissions. You need
to be aware of what frequencies you are using and the devices around you are using. Radio spectrum is
largely controlled by in-country authorities. There are some frequencies allocated to bodies such as
police and emergency services, TV, and radio. There are parts of the spectrum that are set aside for
other uses such as WiFi and cellular communications. Although you can generally use these frequencies
for your own projects, there are still rules that need to be adhered to such a maximum transmit power.
In the United States, the Federal Communications Commission (FCC) are the licensing authority. The
authority in the EU is the Comité International Spécial des Perturbations Radioélectriques (CISPR) and
Industry Canada (IC) for Canada. Generally, spectrum allocation across these authorities is consistent,
but there are some local differences, and you should check that any equipment you plan to use is
compliant with your local authority’s regulations.
The radio-controlled button unit used in this chapter operates at 433Mhz. This frequency is free to use
for this sort of application in Europe and the United States. But that same device may operate at
315MHz in the United States. It is not permitted to use 315Mhz in Europe. Therefore, you must ensure
you have the local variant that is legal to use in your area.
Evans, T. H.
Evans, W. K.
Evans, J. S.
Ellingham, V. E.
Eaton, R. M.
Eakin, H. S. C.
Ennis, W. E.
Elkin, P. H.
Evans, F. J.
Everson, W. J.
Evans, E. A.
Ellis, W. M.
Everitt, W. G.
Everitt, W. W.
East, A. A.
Edwards, J. H. L.
Evans, D. F.
Eagle, W. E.
Emerson, H. D.
Evans, D. W.
Evans, W. G.
Ellsley, C. W.
Edgill, H. D.
Ewings, H.
Empson, C. W.
East, B. M.
Edney, H. E.
Edzley, E. E.
Edwards, L. M.
Elwell, C. M.
Elliott, G. H.
Evans, A. B.
Evans, E. J.
Evison, H.
Elkington, R. H. H.
Endacott, A. D.
Evans, R. B.
Edwards, H.
Emery, G. R.
Esden, H. A.
Everett, G. J.
Emler, H. J.
Eastop, F. A.
Edwards, L.
Ellor, H. E.
Elledge, W.
Ellor, J. F.
Eels, P.
Evershed, G. D.
Eagle, N.
Etheridge, E. A.
Ellingham, C.
Edwards, J.
Ellis, E.
Eve, R. M.
Evans, J. L.
Etheridge, J. E. E.
Eaton, C. T.
Earl, G. A.
Essery, E. C.
Evison, E. R.
Evans, E. G.
Eagles, L. G.
Ellicott, B. W.
Edge, H.
Ellerington, H.
Evans, W.
Eccles, L. D.
Eccleston, J.
Evans, T. E.
Elliston, A. J.
Eades, C. E.
Elliott, P. J.
Ellis, G. W.
East, A.
Ennis, J.
Everett, L. A.
Evans, P. G.
Ellis, J. G.
Earl, P. A.
Ellwood, W. E.
Edmonds, H. P.
Elliott, G.
Ellis, F.
Edge, H. W.
Evans, M. J.
Ellwood, H.
Edmonds, M. W.
Eads, J. R.
Ellum, S.
Edwards, J. H.
Ellingham, E. G.
Enright, A. W.
Edwards, B. C. L.
Eisele, G. S.
Edser, S. C.
English, C.
Every, W.
Edwards, L. P.
Ewell, H. L.
Edwards, T. E.
England, W. H.
Elkin, J. T.
Eggers, C. W.
Ellis, A.
Ellis, S. E. R.
Edey, E. G.
Evison, C. H.
Everad, D.
Everatt, W.
Easter, R.
Ellis, F. E.
Ediss, A. C.
Earl, C.
Empson, H. C.
Evans, J. L.
Edmonds, J.
Eickhoff, J. A.
Evans, E.
Ellis, E. D.
Evans, F.
Ensor, W. A.
Ede, E. E.
Elkington, C. J.
Embery, S. W.
Eaton, C. F.
Ellis, J. C.
Edwards, R. F. C.
Evans, A. D.
Emery, R. W. J.
Ennor, E. M.
Elvis, A. H.
Elliott, E. A.
Edwards, H. J.
Everitt, B.
Ecroyd, W. C.
Emary, W.
Edwards, T. B.
Emery, A. T.
Edwards, W. H.
Edwards, W. N.
Ellwood, C.
Edmonds, A. E.
Emery, R.
Ellis, A. E.
Ellis, G. B.
Ellery, J. W.
Evans, F. T.
Ebden, W.
Eyears, W. J.
Edgington, A.
Eagle, C. W.
Ellingham, F. H.
Ellis, A.
Ellis, A. J.
Evans, D.
Evans, I. J.
Edmondson, H. C.
Evans, D.
Evans, F. S.
Ellis, L. F.
Emmett, H. J. L.
English, P. W.
Ewins, T.
Ellery, J. J.
Edwards, W.
Ellis, H. E.
Evans, I. J.
Eames, W. H.
Edwards, A. C.
Eades, F. E. A.
Emery, E. G.
Eley, J. R. S.
Evan, S. E.
Ellis, B. L.
Emery, C. H.
Evans, B.
Emm, L. H.
Elliott, S. C.
Eaton, J. W.
Edwards, E.
Ednie, D.
Edgerton, A. W.
Entwistle, F.
Ember, E. W.
Evans, W. P.
Enock, E. J.
Elliston, G. E.
Ellis, J.
Ewbank, R. M. G.
Edwards, L.
Evans, F. S.
Evans, C. H.
Ellingham, G. H.
Evans, A. W.
Eager, H. H. P.
Evans, R. J.
Edwards, J. E.
Edwards, F. J.
Eversfield, A. D.
Edwards, H. C.
Evans, W. H.
Evans, E. J.
English, W. K.
Elliott, E. F.
Elliott, L. P.
Elsdon, H. C.
Edwards, J. H.
Eddicott, G.
Edwards, H. A.
Eckitt, R. C.
Elvy, A.
Evans, H. E.
Eason, W. H.
Edwards, G. F.
Edmonds, J. H.
Ewing, G. P.
Elliott, A. S.
Ede, F. J.
Ely, W.
Eyre, J.
Efford, F. S.
Evans, S.
Edwards, W. D.
Eels, J.
Eldridge, C.
Ellicott, W. J.
English, W. F.
Ellison, H.
Emery, C.
Ensoll, H.
Eyles, W. R.
Elgar, S. C.
Eeles, H.
Edwards, G.
Eeles, F. C.
Emmerson, G. F.
Evans, J.
Etheridge, E. J.
Eden, T. C.
Edwards, W. H.
Eaton, W. E.
England, E.
Exell, A. S.
Elliott, S. T. G.
Eland, G.
Evans, G.
Eager, G. L.
Flanagan, F. J.
Fletcher, O. C.
Fryer, C. W.
Fowler, J. G.
Fitzgerald, J. H.
Foster, H. J. B.
Foucard, N. A.
French, E. J.
French, R. H.
Fell, D.
Farrar, G. R.
Fussell, B.
Figgins, A. P.
Forster, F. D.
Feeley, J.
Franklin, R. H.
Foster, H.
Foster, R. S.
Falkingham, J. H.
Fudge, S.
Facon, W. S.
Fearon, C. J.
Farmer, E.
Fabb, A. G.
Fenton, G. W.
Fields, E. C.
Fergusson, W. G.
Fowler, G. E.
Fryer, C. W.
Fall, P. J.
Fereday, E. B.
Ficken, G. J.
Fitzgerald, J. H.
Fuller, W. E.
Fenton, W. H.
Flynn, B. C.
Fabian, C. B.
Faulkner, L.
Fearne, H. J.
Fletcher, E.
Fennell, L. J.
Fenton, C. L.
Fereday, L. H.
Firkins, H. P.
Ford, C.
Foster, H. K.
Frost, E. C.
Fraser, J. A.
Foreman, E. K.
Fright, S.
Fearnley, C.
Fowler, G. E.
Foot, G. B.
Freshwater, H. W.
Forward, H. A.
Funston, H. E.
Field, L. F.
Foster, E. J.
Foster, A. D.
Fowler, W. S.
Fairbairn, G.
Fewings, J. H.
Flynn, F. B.
Forrest, W. W.
Flook, T. E.
Fabb, B.
Fraser, W. S.
Flanagan, L.
Ffoulkes, W. H.
Flood, W. W. G.
Frampton, C.
Fear, W.
Fenson, E. H.
Franks, S. T.
Freeman, H.
Field, J. W.
Farindon, R.
Fisenden, C. H.
Featherstone, F. W.
Ferrier, W. J.
Findlow, A.
Ferry, F. N.
Farebrother, S. N.
Fogg, S. H.
Freeman, G.
Fuller, A. F.
Fisher, W. C. J.
French, E. J.
French, H. T.
Finlayson, W. J.
Folds, C. E.
Foster, H. L.
Field, H. H. W.
Finch, F. N.
French, W. H.
Farman, S. L.
Faulkner, A. L.
Fox, D.
Florant, A. C.
Figgins, H. F.
Funston, L. W.
Farley, W. E.
Fowler, S. D.
French, H. J.
Franklin, G. F.
Forth, H.
Finnis, S.
Faulkner, H. H.
Fifield, H.
Finigan, A. L.
Ferris, A. C.
Fear, W.
Facey, W. H.
Fowler, P. G. E.
Freemont, L. T.
Fisher, A.
Fitzsimmons, G. W.
Flatman, F. C.
Foster, S. W.
Freeston, G. B.
Fareweather, A. C.
Fuller, H. S.
Flewry, G. J.
Fea, C. A.
Fish, A. R.
Field, R.
Field, T.
Fisher, H. C.
Fothergill, W. H.
Fisher, A. S.
Fry, J. F. B.
Funnell, E. J.
Fisk, F. A.
Fish, F. H.
Farden, F. D.
Flight, E. H.
Franklin, F. H.
Fautley, C. C. T.
Franklin, C. L.
Freer, W. B.
Fenning, A. E.
Faulkner, F.
Findley, G. E. W.
Forster, H. W.
Fletcher, H. J.
Farrow, H. J.
Foster, B.
Fletcher, S.
Fossey, H. E.
Fox, F. W.
Fitchett, S.
Felton, C. A.
Freeman, L. G.
Fowlie, W.
Freemantle, G. S.
Fincham, D. I.