Open-Source-Code mit Arduino IDE und PlatformIO
Autonomes Fahren: GPS, Accelerometer, Gyroskop
PS3-Controller
Mikrocontroller wie der Arduino und Einplatinenrechner wie der Raspberry Pi haben sich zu beliebten Komponenten entwickelt. Dritter im Bunde ist der ESP32 der Firma Espressif. Mikrocontroller dieser Baureihe zeichnen sich durch eine Vielzahl implementierter Funktionen aus, die bei einem Arduino konventioneller Prägung mit einem Atmel-AVR-Mikrocontroller erst mit weiterer Hardware möglich sind. Prominentes Beispiel sind hier die WiFi- und Bluetooth-Funktionalitäten. Gegenüber einem Raspberry Pi zeichnen sie sich durch einen deutlich geringeren Preis aus.
Allgemeine Informationen für die Realisierung eines Roboterauto-Projekts mit dem ESP32 sind leicht zu finden. Dabei handelt es sich aber oft nur um Ausführungen zu einem Teilaspekt, ohne inhaltliche oder funktionale Abstimmung. So ist nicht nur die Beschaffung der benötigten Informationen mühselig und zeitaufwändig, sie kann auch außerordentlich fehlerträchtig sein.
Ansatzpunkt dieses Buches ist, diese Lücke zu schließen. Es geht auf verschiedene Möglichkeiten eines Chassis ein, vermittelt nötige Kenntnisse und führt schrittweise von einer einfachen Motorsteuerung zu einem komplexen sensor- und sprachgesteuerten Roboterauto. Hacks rund um GPS und eine PlayStation 3 runden die Sache ab.
Inhalt
Bei der Reihenfolge der Kapitel wurde versucht – beginnend bei der Darstellung von grundlegenden Informationen – über die Lösung einfacher Aufgaben zu etwas anspruchsvolleren Techniken zu führen.
Der Mikrocontroller ESP32
Die Software erstellen
Die Stromversorgung
Rund um die Hardware
Das Chassis
Der Gleichstrommotor
Kabellose Steuerung über WiFi
Mit Sensoren Hindernisse erkennen
Eine eigene Roboterauto-App
Servo und Lichtsensor
GPS
Accelerometer / Gyroskop
PS3-Controller
Roboterauto-App
Hinweis zur Software
Die Dateien haben das Suffix (.cpp). Grund ist die Entwicklung mit PlatformIO. Mit Copy & Paste sollten sie auch in der Arduino-IDE verwendet werden können.
The ESP8266 from Espressif is a Wi-Fi microchip with full TCP/IP stack and microcontroller capability. It has made waves in the maker community with its low price.
But many developers were unhappy with ESP8266's high power consumption. The ESP32, equipped with a ULP (Ultra Low Power) coprocessor, offers a remedy for this.
This e-book features a number of projects featuring ESP32 & ESP8266 as well as an interview with the CEO of Espressif Teo Swee Ann.
Articles
ESP32 for Use in Industry 4.0 Equipment
Scrolling Message Display, 512 LEDs controlled over Wi-Fi via an ESP-12F
The Connected Greenhouse IoT demonstration project using MQTT and Node-RED
VFD-tube Clock with ESP32 with an accurate Internet-derived time
ESP32 Low Power
DCF77 Emulator with ESP8266
ESP8266 on the Elektor Android I/O Board
The Reason Behind the Hugely Popular ESP8266?
Wi-Fi Desktop Thermostat
Timers for the Wi-Fi Desktop Thermostat
PlatformIO, the Universal Programming Tool
Weather Display, Visualize current weather data on an LC display
GoNotify, a Flexible IoT Sensor Interface
ESP32 for Power Users
USB Programming Adaptor for ESP8266
Getting started with ESP32 and the Arduino IDE
MicroPython, Python for small systems
RGBDigit Clock
WLAN for Microcontrollers
Return of the Wi-Fi Controller Board
Compact and Self-contained WLAN
Practical Multitasking Fundamentals
Programming embedded systems is difficult because of resource constraints and limited debugging facilities. Why develop your own Real-Time Operating System (RTOS) as well as your application when the proven FreeRTOS software is freely available? Why not start with a validated foundation?
Every software developer knows that you must divide a difficult problem into smaller ones to conquer it. Using separate preemptive tasks and FreeRTOS communication mechanisms, a clean separation of functions is achieved within the entire application. This results in safe and maintainable designs.
Practicing engineers and students alike can use this book and the ESP32 Arduino environment to wade into FreeRTOS concepts at a comfortable pace. The well-organized text enables you to master each concept before starting the next chapter. Practical breadboard experiments and schematics are included to bring the lessons home. Experience is the best teacher.
Each chapter includes exercises to test your knowledge. The coverage of the FreeRTOS Application Programming Interface (API) is complete for the ESP32 Arduino environment. You can apply what you learn to other FreeRTOS environments, including Espressif’s ESP-IDF. The source code is available from GitHub. All of these resources put you in the driver’s seat when it is time to develop your next uber-cool ESP32 project.
What you will learn:
How preemptive scheduling works within FreeRTOS
The Arduino startup “loopTask”
Message queues
FreeRTOS timers and the IDLE task
The semaphore, mutex, and their differences
The mailbox and its application
Real-time task priorities and its effect
Interrupt interaction and use with FreeRTOS
Queue sets
Notifying tasks with events
Event groups
Critical sections
Task local storage
The gatekeeper task
Easy and Affordable Digital Signal ProcessingThe aim of this book is to teach the basic principles of Digital Signal Processing (DSP) and to introduce it from a practical point of view using the bare minimum of mathematics. Only the basic level of discrete-time systems theory is given, sufficient to implement DSP applications in real time. The practical implementations are described in real time using the highly popular ESP32 DevKitC microcontroller development board. With the low cost and extremely popular ESP32 microcontroller, you should be able to design elementary DSP projects with sampling frequencies within the audio range. All programming is done using the popular Arduino IDE in conjunction with the C language compiler.After laying a solid foundation of DSP theory and pertinent discussions on the main DSP software tools on the market, the book presents the following audio-based sound and DSP projects:
Using an I²S-based digital microphone to capture audio sound
Using an I²S-based class-D audio amplifier and speaker
Playing MP3 music stored on an SD card through an I²S-based amplifier and speaker
Playing MP3 music files stored in ESP32 flash memory through an I²S-based amplifier and speaker
Mono and stereo Internet radio with I²S-based amplifiers and speakers
Text-to-speech output with an I²S-based amplifier and speaker
Using the volume control in I²S-based amplifier and speaker systems
A speaking event counter with an I²S-based amplifier and speaker
An adjustable sinewave generator with I²S-based amplifier and speaker
Using the Pmod I²S2 24-bit fast ADC/DAC module
Digital low-pass and band-pass real-time FIR filter design with external and internal A/D and D/A conversion
Digital low-pass and band-pass real-time IIR filter design with external and internal A/D and D/A conversion
Fast Fourier Transforms (FFT)
Der ESP8266 von Espressif ist ein Wi-Fi-Mikrochip mit vollem TCP/IP-Stack und Mikrocontroller-Fähigkeit. Es hat mit seinem niedrigen Preis Wellen in der Herstellergemeinschaft geschlagen.
Aber viele Entwickler waren unzufrieden mit dem hohen Stromverbrauch von ESP8266. Der ESP32, ausgestattet mit einem ULP (Ultra Low Power) Coprozessor, bietet eine Lösung.
Dieses E-Book enthält eine Reihe von Projekten mit ESP32 & ESP8266 sowie ein Interview mit dem CEO von Espressif Teo Swee Ann.
Artikel
ESP32 für den Einsatz in Geräten der Industrie 4.0
Scrollende Nachrichtenanzeige, 512 LEDs per WLAN mit ESP-12F ansteuern
Das vernetzte Treibhaus, IoT-Modellprojekt mit MQTT und Node-RED
VFD-Röhren-Uhr mit ESP32, Internet-Zeit auf Vintage-Displays
ESP32 stromsparend, die Programmierung des ULP-Coprozessors
DCF77-Emulator mit ESP8266, DCF durch Internet-Zeit ersetzen
Was steckt hinter dem berühmtem ESP8266?
WLAN-Thermostat, flexible und programmierbare Temperatursteuerung
Timer für den WLAN-Thermostat, sieben Kanäle mit atomarer Genauigkeit
Schweizer Taschenmesser für Mikrocontroller, PlatformIO als universelles Programmier-Tool
ESP32 für Power-User, native Programmierung
Weather-Display, aktuelle Wetterdaten auf einem LC-Display darstellen
GoNotify, ein flexibles IoT-Sensorinterface. Einfach in die Cloud.
Der große Bruder des ESP8266, erste Schritte mit dem ESP32 und der Arduino-IDE
MicroPython, Python für kleine Systeme
RGBDigit Clock, farbenfrohe 7-Segment-Displays zeigen Zeit und Klima
USB-Programmieradapter für die ESP-Module von Espressif
Heizkesselmonitor mit ESP8266, Haustechnik für die Energiewende
WLAN für Mikrocontroller, steuern mit dem ESP8266
Die Rückkehr des WLAN-Controller-Boards, Smartphone steuert IoT-Objekte
WLAN kompakt und autonom, oder: Wie man den ESP8266 auch ohne MCU einsetzen kann
L'ESP8266 d'Espressif est une puce Wi-Fi dotée d'une pile TCP/IP complète et d'une capacité de microcontrôleur. Il a fait des vagues dans la communauté des fabricants grâce à son prix bas.
Mais de nombreux développeurs étaient mécontents de la consommation électrique élevée de l'ESP8266. L'ESP32, équipé d'un coprocesseur ULP (Ultra Low Power), propose un remède à cela.
Cet e-book présente un certain nombre de projets mettant en vedette ESP32 et ESP8266 et démontre leurs performances dans différentes applications.
Des articles
Journal lumineux défiant512 pilotes LED pour Wi-Fi dotés d'un ESP-12F
Regarder avec VFD et ESP32À la précision d'Internet
L'ESP32 est idéal pour la consommationProgrammation du coprocesseur ULP
Adaptateur de programmation USB pour ESP8266Dans la famille Espressif, je voudrais l'ESP-01 et l'ESP-012
Émulateur DCF77 à ESP8266Des ondes radio à l'internet
Thermostat sur le bureau WiFiSurveillance de la température flexible et programmable
Minutes pour le thermostat du bureau WiFiSept canaux de temporisation d'une précision atomique
Coûteau suisse pour microcontrôleursPlatformIO, un outil de programmation universel
Station Météo NucleoInformations mises à jour sur l'affichage sur l'écran LCD
AllerNotifierUne interface flexible pour les captureurs d'IdO
Regarder RGBChiffreAffiche avec 7 segments et couleur
ESP32 pour les utilitaires exigeantsProgrammation avec les outils d'origine
Mutation de l'ESP8266Découvrons l'ESP32 avec l'EDI d'Arduino
MicroPythonLe Python des petits systèmes
MicroPython et PyBoardLa LED qui clignote…Au serveur web qui fait clignoter une LED
Machine de surveillance pour ESP8266Domotique pour la transition énergétique
WLAN compact et autonomeOu comment utiliser la puce ESP8266 sans µC
ESP8266 sur la carte d'entrées/sorties AndroidLancez-vous dans la mise à jour du micrologiciel
WLAN pour microcontrôleursAvec la puce ESP8266
Carte de commande Wi-Fi : le retourRelies des objets à votre ordiphone
Volledige ESP32-microcontrollercursus met een speciaal ontwikkelde MCU-uitbreidingsprint, praktische projecten en een uitgebreide online gids – ideaal om hardware, programmering en connectiviteit stap voor stap te leren.
Een praktische introductie tot embedded systemen met de ESP32
Deze cursus is bedoeld voor u als lezer die nieuw is in embedded systemen en op zoek bent naar een gestructureerde, voorbeeldgerichte manier om aan de slag te gaan. Als u al algemene elektronica- of Arduino-materialen hebt verkend, maar deze te breed vond of te weinig praktische begeleiding boden, dan biedt deze cursus een meer gerichte aanpak.
Met behulp van de "ESP32 by Example Kit" (EEK) – een compacte en betaalbare set met led’s, sensoren, een OLED-scherm en een bewegingsprocessor – werkt u gedurende de hele cursus met een consistente hardware-opstelling. Eenmaal gemonteerd blijft de EEK grotendeels ongewijzigd, zodat u zich volledig kunt richten op leren en experimenteren zonder telkens opnieuw te hoeven configureren.
Onderwerpen zijn onder andere:
De ESP32-microcontroller begrijpen en programmeren
Code schrijven en implementeren met de Arduino IDE
Cyberfysische systemen verkennen, met als hoogtepunt basis dronebesturing
Er is geen eerdere ervaring met Arduino of embedded development vereist. Elk onderdeel bevat praktische voorbeelden en miniprojecten die zijn ontworpen om belangrijke concepten te versterken en tot een diepere verkenning te inspireren. Aan het einde van de cursus bent u niet alleen in staat de voorbeelden uit het boek te reproduceren, maar er ook op voort te bouwen met uw eigen ideeën en toepassingen.
Of u nu geïnteresseerd bent in embedded programmeren, interactieve systemen of inleidende dronebesturing, deze cursus biedt een duidelijke en praktische manier om aan de slag te gaan.
Wat leert u?
Embedded programmeren met de ESP32 met behulp van de Arduino IDE
Realtime sensorinvoer en -bediening via knoppen, LED's en displays
Gebarengebaseerde interactie met de MPU6050-bewegingssensor
Bluetooth-gamepadintegratie en dronebesturingssimulatie
Wifi- en UDP-netwerken, lokale webservers en NTP
MQTT-communicatie met cloudplatforms zoals AWS en Arduino IoT
Hoe u complete IoT-systemen bouwt en implementeert
Perfect voor
Studenten en autodidacten die embedded systemen verkennen
Makers en IoT-enthousiastelingen die hun hardwarevaardigheden willen verbeteren
Docenten en trainers die op zoek zijn naar lesmateriaal dat direct toepasbaar is
Ontwikkelaars die verder kijken dan de basisprincipes van Raspberry Pi of Arduino
Ondersteuning wanneer u die nodig hebt
Toegang tot instructeurs via Elektor Academy
Nuttige communityforums en essentiële documentatie
Wat zit er in de doos (cursus)?
Nieuw boek van 384 pagina's: "ESP32 by Example" (t.w.v. € 45)
Elektor ESP32 by Example Kit (EEK): Microcontroller-uitbreidingskaart met 6 LED's en 6 knoppen + OLED-display, MPU6050 3-assige accelerometer en gyroscoopmodule (t.w.v. € 40)
Adafruit HUZZAH32 – ESP32 Feather MCU Board (t.w.v. € 30)
ESP32 Cheap Yellow Display Board (t.w.v. € 25)
DHT11 Vochtigheid & Temperatuursensor
Breadboard
Jumperdraden
USB-C-kabel
Toegang tot de volledige cursus op het Elektor Academy Pro Learning Platform
Instructievideo's
Downloadbare Arduino-projectbestanden voor elke module
Leermateriaal (van deze box/cursus)
▶ Klik hier om te openen
Module 1 – Getting Started with the ESP32 & EEK
Module 2 – Digital Output – LEDs and GPIO
Module 3 – Switches and Input Handling
Module 4 – EEK and PWM
Module 5 – OLED and Display Output
Module 6 – Motion Sensing with the MPU6050
Module 7 – Capstone Project (EEK in Action)
Module 8 – WiFi and Web Control with ESP32
Module 9 – Cloud Concepts using EEK
Module 10 – Hands-on: Arduino IoT Cloud and EEK
Module 11 – BlueTooth and EEK GamePad Integration
Module 12 – Why Drones?
Module 13 – Drone Simulator Concepts
Module 14 – Simple Drone Flight Control
Module 15 – Real-Time Drone Flight Control
Module 16 – Drone Control Mini-Projects
Module 17 – Middleware and Python Scripting
Module 18 – Python Applications for Drone Control
Module 19 – Capstone EEK Control Project and Presentation
Over de auteur
Dr. Jim Solderitsch is docent, softwarearchitect, systeemontwikkelaar en cybersecurityonderzoeker met een focus op cyberfysische systemen. Hij is momenteel universitair hoofddocent computerwetenschappen aan de Villanova University in Pennsylvania.
Wat is Elektor Academy Pro?
Elektor Academy Pro biedt gespecialiseerde leeroplossingen voor professionals, engineeringteams en technische experts in de elektronica- en embedded systemenindustrie. Het stelt zowel individuen als organisaties in staat hun praktijkkennis te verdiepen, vaardigheden te versterken en voorop te blijven lopen met hoogwaardige content en praktische trainingstools.
Van praktijkgerichte projecten en cursussen onder leiding van experts tot diepgaande technische inzichten – Elektor ondersteunt ingenieurs bij het aanpakken van de actuele uitdagingen binnen elektronica en embedded systemen. Ons educatieve aanbod bestaat uit Academy-boeken, Pro Boxes, webinars, conferenties en branchespecifieke B2B-magazines – allemaal ontwikkeld met het oog op professionele groei.
Of u nu ingenieur, R&D-specialist of technisch beslisser bent: Elektor Academy Pro slaat de brug tussen theorie en praktijk, helpt u nieuwe technologieën te beheersen en stimuleert innovatie binnen uw organisatie.
With Examples for Raspberry Pi Pico and ESP32
Creating and programming small electronic systems is now easier than ever before. With inexpensive development boards and modern software tools, anyone curious about embedded design can quickly move from an idea to a working piece of hardware. At the heart of this change is MicroPython—a clear, interactive, and beginner-friendly way to program microcontrollers while still remaining closely connected to the underlying electronics.
This book introduces embedded programming through MicroPython on popular platforms such as the Raspberry Pi Pico and the ESP32. You will discover how to use microcontrollers for reading inputs, processing data, and controlling outputs in a predictable, real-time loop. With just a few lines of code, you can blink LEDs, read sensors, drive motors, and communicate with the outside world. The interactive REPL programming interface encourages experimentation and fast learning, making concepts tangible from the very first chapter.
While different boards offer different capabilities, they all share the same core principles. Timers, GPIO, analog I/O, PWM, interrupts, and communication interfaces form the foundation of every embedded system.
By focusing on these universal building blocks, this book helps you build skills that transfer across platforms and scale naturally toward more advanced development. Whether you are a beginner or an experienced programmer entering embedded systems, you will find that working with MicroPython is both practical and genuinely enjoyable.
Practical Applications and Project with Arduino, ESP32, and RP2040
Immerse yourself in the fascinating world of control engineering with Arduino and ESP32! This book offers you a practical introduction to classic and modern control methods, including PID controllers, fuzzy logic, and sliding-mode controllers.
In the first part, you will learn the basics of the popular Arduino controllers, such as the Arduino Uno and the ESP32, as well as the integration of sensors for temperature and pH measurement (NTC, PT100, PT1000, and pH sensor).
You will learn how to use these sensors in various projects and how to visualize data on a Nextion TFT display. The course continues with an introduction to actuators such as MOSFET switches, H-bridges, and solid-state relays, which are used to control motors and actuators. You will learn to analyze and model controlled systems, including PT1 and PT2 control.
The book focuses on the implementation of fuzzy and PID controllers for controlling temperature and DC motors. Both the Arduino Uno and the ESP32 are used. The sliding-mode controller is also introduced.
In the second-to-last chapter, you will explore the basics of neural networks and learn how machine learning can be used on an Arduino. In the last chapter, there is a practical example of a fuzzy controller for feeding electricity into the household grid.
This book is the perfect choice for engineers, students, and electronics engineers who want to expand their projects with innovative control techniques.
Praktische Anwendungen und Projekte mit Arduino, ESP32 und RP2040
Tauchen Sie ein in die faszinierende Welt der Regelungstechnik mit Arduino und ESP32! Dieses Buch bietet Ihnen einen praxisnahen Einstieg in die klassischen und modernen Methoden der Regelung, darunter PID-Regler, Fuzzy-Logik und Sliding-Mode-Regler.
Im ersten Teil lernen Sie die Grundlagen der beliebten Arduino-Controller, wie den Arduino Uno und den ESP32, sowie die Integration von Sensoren für Temperatur- und pH-Messung (NTC, PT100, PT1000, pH-Sensor). Sie erfahren, wie diese Sensoren in verschiedenen Projekten eingesetzt werden und wie Sie Daten auf einem Nextion TFT-Display visualisieren.
Weiter geht es mit der Einführung in Stellglieder wie MOSFET-Schalter, H-Brücken und Solid-State-Relais, die zur Steuerung von Motoren und Aktoren verwendet werden. Sie lernen, Regelstrecken zu analysieren und zu modellieren, einschließlich PT1- und PT2-Regelungen.
Der Schwerpunkt des Buches liegt auf der Implementierung von Fuzzy- und PID-Reglern zur Regelung von Temperatur und DC-Motoren. Dabei werden sowohl der Arduino Uno als auch der ESP32 eingesetzt. Zudem wird der Sliding-Mode-Regler vorgestellt.
Im vorletzten Kapitel erkunden Sie die Grundlagen neuronaler Netze und lernen, wie maschinelles Lernen auf einem Arduino eingesetzt werden kann. Im letzten Kapitel gibt es noch ein praktisches Beispiel für einen Fuzzy-Regler zur Stromeinspeisung ins Hausnetz.
Dieses Buch ist die perfekte Wahl für Ingenieure, Studierende und Elektroniker, die ihre Projekte mit innovativen Regelungstechniken erweitern möchten.
For Raspberry Pi, ESP32 and nRF52 with Python, Arduino and Zephyr
Bluetooth Low Energy (BLE) radio chips are ubiquitous from Raspberry Pi to light bulbs. BLE is an elaborate technology with a comprehensive specification, but the basics are quite accessible.
A progressive and systematic approach will lead you far in mastering this wireless communication technique, which is essential for working in low power scenarios.
In this book, you’ll learn how to:
Discover BLE devices in the neighborhood by listening to their advertisements.
Create your own BLE devices advertising data.
Connect to BLE devices such as heart rate monitors and proximity reporters.
Create secure connections to BLE devices with encryption and authentication.
Understand BLE service and profile specifications and implement them.
Reverse engineer a BLE device with a proprietary implementation and control it with your own software.
Make your BLE devices use as little power as possible.
This book shows you the ropes of BLE programming with Python and the Bleak library on a Raspberry Pi or PC, with C++ and NimBLE-Arduino on Espressif’s ESP32 development boards, and with C on one of the development boards supported by the Zephyr real-time operating system, such as Nordic Semiconductor's nRF52 boards.
Starting with a very little amount of theory, you’ll develop code right from the beginning. After you’ve completed this book, you’ll know enough to create your own BLE applications.
With Examples for Arduino UNO, Raspberry Pi Pico and ESP32
Programming small electronic systems has never been more accessible. Tasks that once demanded expensive tools, specialized hardware, and deep electrical engineering expertise can now be tackled with low-cost development boards and approachable software. At the centre of this shift is the Arduino environment, which provides a unified and familiar way to program a wide range of microcontroller platforms—from classic AVR boards like the Arduino UNO to modern ARM-based boards such as the Raspberry Pi Pico, and powerful Wi-Fi-enabled devices like the ESP32.
This book introduces embedded programming through the core idea that defines all microcontrollers: reading inputs, processing information, and controlling outputs in a predictable loop. The Arduino environment abstracts much of the hardware complexity, allowing you to focus on behaviour rather than implementation details. With just a few lines of code, you can blink LEDs, read sensors, control motors, and communicate with other devices.
While the Arduino UNO, Raspberry Pi Pico, and ESP32 boards differ greatly in performance and features, they share the same fundamental building blocks: digital and analog I/O, timers, serial communication, PWM, interrupts, and power management. Learning these concepts within the Arduino framework builds skills that transfer easily across platforms and scale toward more advanced applications.
By exploring multiple boards while maintaining a consistent programming approach, this book helps you progress from simple experiments to confidently produce well-structured designs—showing that embedded development can be both practical and enjoyable.