Bültmann & Gerriets
ESP32 Formats and Communication
Application of Communication Protocols with ESP32 Microcontroller
von Neil Cameron
Verlag: Apress
Reihe: Maker Innovations Series
E-Book / PDF
Kopierschutz: PDF mit Wasserzeichen

Hinweis: Nach dem Checkout (Kasse) wird direkt ein Link zum Download bereitgestellt. Der Link kann dann auf PC, Smartphone oder E-Book-Reader ausgeführt werden.
E-Books können per PayPal bezahlt werden. Wenn Sie E-Books per Rechnung bezahlen möchten, kontaktieren Sie uns bitte.

ISBN: 978-1-4842-9376-8
Auflage: 1st ed
Erschienen am 30.06.2023
Sprache: Englisch
Umfang: 646 Seiten

Preis: 62,99 €

62,99 €
merken
zum Hardcover 64,19 €
Klappentext
Biografische Anmerkung
Inhaltsverzeichnis

This book focuses on communication protocols for the ESP32 microcontroller with illustrative projects ranging from a Bluetooth Low Energy beacon communicating with your smart wristwatch to LoRa (Long Range) communication between microsatellites circling 550km above the Earth and an ESP32 microcontroller in your home. The advantages of each communication protocol correspond to different project types. For example, the I2S (Inter-Integrated circuit Sound) protocol manages digital audio for internet radio, while the WebSocket protocol enables two-way real-time communication between an ESP32 microcontroller and a webpage for control of remote devices.

Just as there are different communication protocols, there are different ESP32 microcontroller formats. The ESP32 microcontroller provides the platform for the ESP32 LoRa module for long-range communication, the ESP32-CAM camera module for image streaming to a webpage on an Android tablet or mobile phone and an ESP32-based programmable watch incorporating a GPS unit for route tracking, a Bluetooth module, an infrared transmitter and Wi-Fi communication to source information over the internet. One ESP32 module incorporates an LCD screen, a microphone and a speaker, which is ideal for an internet radio, as well as an accelerometer and gyroscope to trigger the display of specific information or an action.

Each chapter focuses on a communication protocol and is stand-alone, so they can be read without having to start from the beginning of the book. The chapters are loosely grouped into short- and long-range communication, image management for transmission to a webpage or a remote LCD screen and the required apps and IoT techniques for remote control of an ESP32-CAM robot vehicle.

Although Wi-Fi communication is incorporated in many internet-based applications, knowledge of alternative communication protocols is vital for optimal project development with a microcontroller, such as the ESP32. Information on the features of several ESP32 microcontroller formats enables the optimal combination of communication protocol and ESP32 format to achieve the requirements of a project. Several of the communication protocols and likewise, several of the ESP32 formats have only been available in the last few months or years, making the book very relevant.

What you'll learn

  • The ESP32-based internet radio, MP3 player and Bluetooth speaker projects that all use the I2S (Inter-Integrated circuit Sound) communication protocol for transmission of encoded audio data.
  • The MESH communication protocol and the ESP-NOW protocol with communication between ESP32 microcontrollers without a Wi-Fi connection.
  • Bluetooth Low Energy (BLE) communication with the ESP32 acting as a BLE beacon to transmit information to mobile phones, Android tablets and other devices close to the beacon.
  • Email communication projects with an ESP32 and generation of QR (Quick Response) codes to instruct an ESP32 to control a connected device.
  • Transmission and storage of image data and the fast display of images in apps.
  • The ESP32-CAM module built around a 2M-pixel camera for streaming images with the WebSocket protocol to a remote ESP32 connected to an LCD screen or with Wi-Fi communication to a webpage.
  • Control of an ESP32-CAM robot car through remote communication over the internet with image streaming to an Android tablet or mobile phone.

Who This Book Is For

A reader interested in understanding and recognizing the features of available communication protocols to then choose the appropriate protocol for a particular project. A level of C++ programming expertise with the Arduino IDE is assumed, although all sketches are comprehensively described and commented.



¿Neil Cameron is an experienced analyst and programmer with a deep interest in understanding the application of electronics. Neil wrote the books Arduino Applied: Comprehensive Projects for Everyday Electronics and Electronics Projects with the ESP8266 and ESP32: Building Web Pages, Applications, and WiFi Enabled Devices, which are published by Apress. He has previously taught at University of Edinburgh and Cornell University.



PREFACE


CHAPTER 1: ESP32 MICROCONTROLLER


USB to UART driver installation


Arduino IDE Boards Manager esp32 version 2.0.N


ESP32 DEVKIT DOIT


TTGO T-Display V1.1


Pulse width modulation


Analog to digital conversion


TTGO LoRa32 V2.1 1.6


TTGO T-Watch V2


TTGO T-Watch installation


M5Stack Core2


M5Stack Core2 installation


M5Stack Core2 and sound


M5Stack Core2 M5G0 battery base


ESP32-CAM


ESP32-CAM-MB module


ESP32-CAM-CH340 module


Image resolution


Memory


Over The Air (OTA)


Software versions



CHAPTER: 2 I2S AUDIO


Analog to digital


Direct Memory Access


PDM microphone


Fast Fourier Transform


Digital to analog


PCM5102 decoder module


MAX98357 decoder module


Internet radio


Internet radio with ESP32 module


Internet radio with M5Stack Core2


Audio data and Bluetooth


ESP32 to Bluetooth speaker


MP3 player


Play MP3 files from micro-SD card


Play MP3 files with M5Stack Core2



CHAPTER 3 : MESH COMMUNICATION


ESP-MESH


ESP-MESH and one Bluetooth device


ESP-MESH and several Bluetooth devices



CHAPTER 4: TTGO T-WATCH V2


TTGO T-watch functionality


Configuration file


Main sketch


Default display screen


Application menu


Screen brightness


GPS information


GPS satellite map


Bluetooth communication


Infrared signalling


Synchronisation with Network Time Protocol


Source OpenWeatherMap API data


Step counter and distance measure


Timer


Battery voltage and microcontroller temperature


Data storage on micro-SD card


Temperature, current and screen brightness


GPS tracking data



CHAPTER 5: BLE BEACONS


Eddystone beacons


Eddystone URL beacon


Eddystone TLM beacon


Eddystone UID beacon


iBeacon


Beacon raw data


BLE communication


GATT profile


Two-way communication


Notifications


nRF24L01 module as BLE transceiver



CHAPTER 6: LORA AND MICROSATELLITES


ESP32 as LoRa transmitter or receiver


ESP32 and LoRa satellites


Installation and configuration


Test station configuration and test message


Microsatellite tracking



CHAPTER 7: EMAIL AND QR CODES


email


QR codes


XML HTTP request


QR codes and XML HTTP request


QR codes and WebSocket



CHAPTER 8: WEBSOCKET, WEBSERIAL AND WEBDASHBOARD


WebSocket


WebSerial


Web Dashboard



CHAPTER 9: MQTT


Smart meter


MQTT and smart meter


Wi-Fi connection to router


ESP-NOW, MQTT and smart meter


Updating time


Wi-Fi or Wi-Fi and ESP-NOW


CO2 and TVOC


CO2 and TVOC with MQTT



CHAPTER 10: MANAGING IMAGES


Image bitmap


Display black and white image


Display colour image


Bitmap and X bitmap


Send image in email


Store image file in SPIFFS


Image URL in sketch


Display image as Sprite


LCD screen


M5Stack Core2 and accelerometer


Memory requirements


Display time with Sprites


Extension to M5Stack Core2


Compress HTML code



CHAPTER 11: ESP32-CAM CAMERA


Stream images direct to LCD screen


Stream images to remote LCD screen


Stream images over Wi-Fi


Webpage with control functions


WebSocket


esp_http_server


Webpage with image streaming and control functions


ESP32-CAM image resolution



CHAPTER 12: CONTROL APPS


app to display a webpage


app to display streamed images


app to transmit and receive data


app with image streaming and control functions


app sliders


Circular slider


Vertical slider


Horizontal slider touchdown and touchup


app to control WS2812 RGB LED


Bluetooth communication


Wi-Fi communication



CHAPTER 13: REMOTE CONTROL MOTORS


Servo motor


ledc function


ESP32Servo library


app to control servo motor


DC motors


TB6612FNG motor driver board


L298N motor driver board


Motor driver control


app to control DC motors with heading angle



CHAPTER 14: REMOTE CONTROL ESP32-CAM ROBOT CAR


app with direction buttons


app with heading angle control


CHAPTER 15 LIBRARIES


TFT-eSPI library


Libraries used


Create a library


Source file


Header file


Keyword file


Information file


andere Formate
weitere Titel der Reihe