Learning Embedded Systems with STM32 Nucleo Boards
Embedded programming has become more accessible than ever before. Development boards are inexpensive, software tools are easy to install, and the Arduino IDE provides a familiar environment for creating embedded applications. Combined with the STM32 Nucleo family of development boards, it offers an excellent platform for learning how modern microcontrollers interact with the physical world.
This book introduces embedded programming using the Arduino environment on STM32 Nucleo boards. You will learn how a microcontroller continuously reads inputs, processes information, and controls outputs in a predictable real-time loop. Through practical examples, you will discover how to control LEDs, read switches and sensors, generate PWM signals, drive motors, and exchange data with other devices, all while becoming familiar with the capabilities of STM32 microcontrollers.
Although the STM32 family includes devices with different performance levels, memory sizes, and peripheral sets, they all share the same architectural concepts. Digital and analog I/O, timers, interrupts, PWM, communication interfaces, and low-power operation are fundamental features found throughout the STM32 ecosystem. Understanding these building blocks will enable you to work confidently with a wide range of STM32 devices, from entry-level microcontrollers to more advanced applications.
By focusing on practical programming techniques rather than hardware complexity, this book develops skills that remain useful well beyond the examples presented. Whether you are taking your first steps in embedded systems or expanding your experience with STM32 microcontrollers, you will gain a solid understanding of both the Arduino development environment and the principles that underpin embedded software design.
The Arduino Uno is an open-source microcontroller development system encompassing hardware, an Integrated Development Environment (IDE), and a vast number of libraries. It is supported by an enormous community of programmers, electronic engineers, enthusiasts, and academics. The libraries in particular really smooth Arduino programming and reduce programming time. What’s more, the libraries greatly facilitate testing your programs since most come fully tested and working.
The Raspberry Pi 4 can be used in many applications such as audio and video media devices. It also works in industrial controllers, robotics, games, and in many domestic and commercial applications. The Raspberry Pi 4 also offers Wi-Fi and Bluetooth capability which makes it great for remote and Internet-based control and monitoring applications.
This book is about using both the Raspberry Pi 4 and the Arduino Uno in PID-based automatic control applications. The book starts with basic theory of the control systems and feedback control. Working and tested projects are given for controlling real-life systems using PID controllers. The open-loop step time response, tuning the PID parameters, and the closed-loop time response of the developed systems are discussed together with the block diagrams, circuit diagrams, PID controller algorithms, and the full program listings for both the Raspberry Pi and the Arduino Uno.
The projects given in the book aim to teach the theory and applications of PID controllers and can be modified easily as desired for other applications. The projects given for the Raspberry Pi 4 should work with all other models of Raspberry Pi family.
The book covers the following topics:
Open-loop and closed-loop control systems
Analog and digital sensors
Transfer functions and continuous-time systems
First-order and second-order system time responses
Discrete-time digital systems
Continuous-time PID controllers
Discrete-time PID controllers
ON-OFF temperature control with Raspberry Pi and Arduino Uno
PID-based temperature control with Raspberry Pi and Arduino Uno
PID-based DC motor control with Raspberry Pi and Arduino Uno
PID-based water level control with Raspberry Pi and Arduino Uno
PID-based LED-LDR brightness control with Raspberry Pi and Arduino Uno
Program, build, and master over 50 projects with MicroPython and the RP2040 microprocessor The Raspberry Pi Pico is a high-performance microcontroller module designed especially for physical computing. Microcontrollers differ from single-board computers, like the Raspberry Pi 4, in not having an operating system. The Raspberry Pi Pico can be programmed to run a single task very efficiently within real-time control and monitoring applications requiring speed. The ‘Pico’ as we call it, is based on the fast, efficient, and low-cost dual-core ARM Cortex-M0+ RP2040 microcontroller chip running at up to 133 MHz and sporting 264 KB of SRAM, and 2 MB of Flash memory. Besides its large memory, the Pico has even more attractive features including a vast number of GPIO pins, and popular interface modules like ADC, SPI, I²C, UART, and PWM. To cap it all, the chip offers fast and accurate timing modules, a hardware debug interface, and an internal temperature sensor. The Raspberry Pi Pico is easily programmed using popular high-level languages such as MicroPython and or C/C++. This book is an introduction to using the Raspberry Pi Pico microcontroller in conjunction with the MicroPython programming language. The Thonny development environment (IDE) is used in all the projects described. There are over 50 working and tested projects in the book, covering the following topics: Installing the MicroPython on Raspberry Pi Pico using a Raspberry Pi or a PC Timer interrupts and external interrupts Analogue-to-digital converter (ADC) projects Using the internal temperature sensor and external temperature sensor chips Datalogging projects PWM, UART, I²C, and SPI projects Using Wi-Fi and apps to communicate with smartphones Using Bluetooth and apps to communicate with smartphones Digital-to-analogue converter (DAC) projects All projects given in the book have been fully tested and are working. Only basic programming and electronics experience is required to follow the projects. Brief descriptions, block diagrams, detailed circuit diagrams, and full MicroPython program listings are given for all projects described. Readers can find the program listings on the Elektor web page created to support the book.
Cette offre groupée comprend le kit de démarrage Red Pitaya STEMlab 125-14 PRO Gen 2 et le nouveau livre « Experimenting with Red Pitaya STEMlab Gen 2 ».
Le kit de démarrage Red Pitaya STEMlab 125-14 PRO Gen 2 est une plateforme puissante et flexible destinée aux applications de traitement du signal, d'acquisition de données et de mesure électronique. Conçu pour les ingénieurs, les développeurs, les chercheurs et les enseignants, ce kit fournit tout le nécessaire pour commencer à développer des systèmes avancés de mesure et de contrôle.
Au cœur du kit se trouve la carte STEMlab 125-14 PRO Gen 2, une version améliorée et ultra-légère. Équipée du SoC Xilinx Zynq-7010 avec 512 Mo de RAM, elle combine la programmabilité d’un FPGA avec la puissance de traitement d’un processeur ARM pour permettre la mise en œuvre d’instruments haute performance et de solutions de traitement de signaux personnalisées.
La carte offre une résolution ADC et DAC de 14 bits, un taux d’échantillonnage de 125 MS/s, une plage d’entrée de ±20 V et une bande passante pouvant atteindre 60 MHz. Son frontal analogique à faible bruit amélioré, sa connectivité USB-C et sa conception compacte la rendent adaptée aux applications exigeantes telles que le développement RF, les systèmes radar, la recherche en photonique, la radio logicielle (SDR) et l’automatisation industrielle.
Le kit de démarrage comprend tous les accessoires essentiels pour une utilisation immédiate : une carte microSD avec système d’exploitation préinstallé, une alimentation, un câble Ethernet pour l’accès à distance, deux sondes d’oscilloscope de 100 MHz et des adaptateurs SMA-BNC pour des connexions de signaux flexibles.
Le kit de démarrage Red Pitaya STEMlab 125-14 PRO Gen 2 constitue une excellente plateforme pour le prototypage rapide, le développement FPGA, l'instrumentation de mesure et l'expérimentation électronique avancée.
Caractéristiques
Résolution ADC et DAC 14 bits
Fréquence d'échantillonnage de 125 MS/s
Plage d'entrée de ±20 V
Bande passante jusqu'à 60 MHz
SoC Xilinx Zynq-7010 (FPGA + processeur ARM)
512 Mo de RAM
Frontières analogiques à faible bruit
Applications
Développement et tests RF
Radar et systèmes sans fil
Radio logicielle (Software Defined Radio, SDR)
Photonique et recherche optique
Automatisation industrielle et systèmes de contrôle
Analyse et instrumentation du signal
Rapide prototypage de systèmes de mesure électroniques
Spécifications
Processeur
Dual core ARM Cortex-A9
FPGA
SoC AMD Xilinx Zynq-7010
RAM
512 Mo (4 Go)
Stockage
Carte microSD (jusqu'à 32 Go)
Système d'exploitation
Red Pitaya OS basé sur Linux
Résolution ADC
14 bits
DAC Résolution
14 bits
Bande passante
60 MHz (CC)
Fréquence d'échantillonnage
125 Méch/s
Nombre d'entrées analogiques
2
Nombre de sorties analogiques
2
Plage de tension d'entrée
±1 V (BT) / ±20 V (HT)
Impédance d'entrée
1 MΩ / 10 Ω pF
Plage de tension de sortie
±1 V
Ethernet
1 port Gigabit Ethernet (RJ45)
USB
2 ports USB-C 2.0 (alimentation et console)
E/S numériques
16 E/S à usage général (3,3 V)
Interfaces de communication
I²C, SPI, UART, CAN
Alimentation
5 V/3 A via USB-C
Dimensions
106,8 x 60,0 x 17,9 mm
Inclus
1x Carte Red Pitaya STEMlab 125-14 PRO Gen 2
2x Sondes d'oscilloscope 100 MHz
2x Adaptateurs SMA vers BNC
1x Carte microSD avec système d'exploitation préinstallé
1x Alimentation USB-C
1x Câble Ethernet
Téléchargements
Documentation
Schematics
Livre : Experimenting with Red Pitaya STEMlab Gen 2
Avec ce nouveau livre, Red Pitaya va bien au-delà d’une simple carte polyvalente. Il devient un puissant instrument de laboratoire pour la mesure, l’analyse et le contrôle de précision.
Des bases du développement de projets électroniques, de la surveillance, du contrôle et de la conception jusqu’aux tests, ce livre vous guide pas à pas à travers tout ce que vous devez savoir pour exploiter pleinement le potentiel du matériel et des logiciels Red Pitaya.
L’ouvrage présente des projets en temps réel basés sur FPGA, développés sur PC à l’aide de l’environnement Vivado, puis transférés sur Red Pitaya pour exécution et test.
Vous découvrirez des performances améliorées, des capacités d’E/S étendues, des fonctionnalités FPGA optimisées ainsi que des options de connectivité avancées, ouvrant de nouvelles perspectives pour la mesure, la surveillance et le contrôle de précision dans vos applications embarquées.
Dans ce livre, vous découvrirez :
Une analyse approfondie de l’architecture et du design matériel de Red Pitaya
Des expériences électroniques utilisant Red Pitaya pour la mesure et la surveillance
Des projets pratiques utilisant le langage de programmation Python
Des conseils pratiques pour la programmation FPGA avec Red Pitaya
Des projets FPGA Red Pitaya utilisant le Verilog HDL sous Vivado IDE
La conception pratique de projets électroniques incluant mesure et tests
Des exemples pas à pas reliant la théorie à la mise en œuvre réelle
Que vous conceviez vos propres circuits électroniques, développiez des outils d’analyse de signaux ou créiez des systèmes de contrôle ou de surveillance en temps réel, ce livre vous apporte les connaissances et la confiance nécessaires pour maîtriser et personnaliser pleinement la plateforme Red Pitaya.
Projets avec Arduino, ESPHome, Home Assistant, et Raspberry Pi & Co.
Ce livre électronique contient plusieurs exemples de projets, en commençant par une introduction à l'électronique. Il explique également comment installer Home Assistant sur un Raspberry Pi, comment utiliser des capteurs de climat intérieur pour la température et l'humidité, comment mettre en œuvre le protocole MQTT et d'autres interfaces, et comment utiliser ESPHome pour intégrer des capteurs et des actionneurs dans Home Assistant. De nombreux tutoriels vidéo complètent le livre.
Fundamentals of electrical engineering
The book begins with an introduction to electrical engineering. You will learn the basics of voltage, current, resistors, diodes and transistors.
Arduino and microcontrollers
A complete section is dedicated to the Arduino Uno. You will get to know the structure, write your first programs and work on practical examples.
Home Assistant and automation
You will learn how to set up Home Assistant on a Raspberry Pi and how to use automations, scenes and devices. In addition, Zigbee, MQTT and ESP-NOW – important technologies for home automation – will be discussed.
ESP8266, ESP32 and ESP32-CAM
The popular ESP microcontrollers are covered in detail. A theoretical introduction is followed by practical projects that show you how to get the most out of these devices.
Sensors and actuators
The book explains the functionality and application of numerous sensors such as temperature and humidity sensors, motion detectors and RFID readers. For actuators, stepper motors, e-ink displays, servo motors and much more are covered. There are practical application examples for all devices.
ESPHome
This chapter shows you how to integrate sensors and actuators into Home Assistant without any programming effort. You will be guided step by step through the setup with ESPHome.
LEDs and lighting technology
In this chapter, you will learn about different types of LEDs and how they can be used. The basics of lighting technology are also explained.
Node-RED
A whole chapter is dedicated to Node-RED. You will learn the basics of this powerful tool and be guided step by step through its setup and use.
Integrated Circuits (ICs)
In electronics, there are numerous ICs that make our lives easier. You will get to know the most important ones and apply your knowledge in practical projects.
Professional programming
Advanced topics such as the correct use of buttons, the use of interrupts and the use of an NTP server for time synchronisation are covered in detail in this chapter.
Downloads
GitHub
Vom Messwert zur stabilen Entscheidung
Wie wird aus einem einfachen Mikrocontroller ein intelligentes System, das Sensorwerte erfasst, verarbeitet und sinnvoll darauf reagiert? Dieses Buch zeigt es Ihnen Schritt für Schritt – verständlich, praxisnah und ohne unnötige Vorkenntnisse.
Sie beginnen mit den Grundlagen der digitalen und analogen Ein- und Ausgänge. Anschließend lernen Sie, wie Sensorwerte gelesen, geglättet und zuverlässig bewertet werden. Anschauliche Beispiele erklären, warum einzelne Messwerte oft täuschen können und wie Mittelwertbildung, Hysterese und einfache Entscheidungsregeln für stabile Ergebnisse sorgen. Nach und nach erweitern Sie Ihre Projekte um Displays, I²C-Kommunikation und mehrere vernetzte Mikrocontroller. So entstehen verteilte Systeme, in denen Raspberry Pi Pico und ATtiny-Controller Daten austauschen und gemeinsam Aufgaben übernehmen.
Im fortgeschrittenen Teil erhalten Sie einen leicht verständlichen Einstieg in Merkmalsbildung, Datenvorverarbeitung, hybride Entscheidungsmodelle und TinyML-nahe Anwendungen. Dabei verbinden Sie klassische Regelungstechnik mit modernen datenbasierten Methoden.
Alle Projekte werden von ausführlich kommentierten Programmen in C und MicroPython begleitet. Das Buch richtet sich an Einsteiger, Maker, Studierende und alle, die Embedded-Systeme von Grund auf verstehen möchten.
Am Ende können Sie eigene Systeme entwickeln, die nicht nur messen, sondern Informationen auswerten, zuverlässige Entscheidungen treffen und gezielt reagieren.
Pfiffige Lösungen mit Arduino Pro Mini und ATmega328-Boards
Mit einem einfachen Arduino Pro Mini Board und ein paar weiteren Bauteilen lassen sich heute für wenig Geld Projekte realisieren, die vor 20 oder 30 Jahren noch undenkbar waren oder ein kleines Vermögen gekostet hätten. Von einfachen LED-Effekten bis zur Ladestation – die den Akku auf Herz und Nieren prüft – ist in diesem Buch vieles dabei.
Als Mikrocontroller dient bei allen beschriebenen Projekten der ATmega328, der mit seinen 20 Ein- und Ausgangsleitungen unzählige Möglichkeiten zum Messen, Schalten und Steuern bietet. Mit einem 7-Segment-Display und ein paar Widerständen lässt sich daraus z. B. ein Voltmeter bauen oder mittels NTC ein Thermometer. Die Arduino-Plattform bietet dabei die perfekte Entwicklungsumgebung zum Programmieren der Boards.
Neben den ganz konkreten Projekten soll das Buch aber auch das nötige Wissen vermitteln, um eigene Ideen zu realisieren. Wie misst man was? Welches ist der geeignete Transistor, um verschiedene Verbraucher zu schalten? Wann ist man mit einem IC besser bedient, oder wie schaltet man Netzspannung? Auch batteriebetriebene Projekte mit LilyPad sind ausführlich thematisiert. Ebenso vielerlei Motoren, vom einfachen Gleichstrommotor bis zum Schrittmotor.
Sensoren sind ein weiteres spannendes Thema. Nur zwei Beispiele: Mit einem winzigen Bauteil lässt sich tatsächlich messen, dass der Luftdruck am Fußboden höher ist als auf Tischhöhe. Mit einem simplen Infrarot-Empfänger kann man ausgedienten Fernbedienungen ein zweites Leben schenken und die Wohnung damit steuern.
Cette offre groupée contient le populaire horloge de sable Elektor pour Raspberry Pi Pico et la nouvelle upgrade tête laser Elektor, offrant encore plus d'options d'affichage de l'heure. Non seulement vous pouvez « graver » l'heure actuelle dans le sable, mais vous pouvez désormais également l'écrire sur une feuille phosphorescente ou créer des dessins verts.
Contenu de l'offre groupée
Horloge de sable Elektor pour Raspberry Pi Pico (prix normal : 50 €)
Upgrade tête laser Elektor pour horloge de sable (prix normal : 35 €)
Horloge de sable Elektor pour Raspberry Pi Pico (Accroche-regard basé sur le Raspberry Pi)
Une horloge à sable standard ne fait qu'indiquer le temps qui passe. En revanche, cette horloge à sable contrôlée par le Raspberry Pi Pico indique l'heure exacte en 'gravant' les quatre chiffres de l'heure et des minutes dans la couche de sable. Après un temps réglable, le sable est aplati par deux moteurs vibrants et tout recommence.
Au cœur de l'horloge de sable se trouvent deux servomoteurs qui entraînent un stylo dans un mécanisme de pantographe. Un troisième servomoteur soulève le stylo de haut en bas. Le bac à sable est équipé de deux moteurs vibrants qui aplatissent le sable. La partie électronique de l'horloge des sables se compose d'un Raspberry Pi Pico et d'une carte RTC/driver avec une horloge en temps réel, ainsi que des circuits de commande pour les servomoteurs.
Un manuel de construction détaillé peut être téléchargé.
Caractéristiques
Dimensions: 135 x 110 x 80 mm
Temps de construction : environ. 1,5 à 2 heures
Inclus
3x Feuilles acryliques prédécoupées avec toutes les pièces mécaniques
3x Mini servomoteurs
2x moteurs de vibration
1x Raspberry Pi Pico
1x Carte RTC/pilote avec les pièces assemblées
Ecrous, boulons, entretoises et fils pour l'assemblage
Sable blanc à grains fins
Upgrade tête laser Elektor pour horloge de sablee
La nouvelle tête laser Elektor transforme l'horloge de sable dans une horloge qui écrit l'heure sur un film qui brille dans le noir au lieu de sable. En plus d’afficher l’heure, il peut également être utilisé pour créer des dessins éphémères. Le pointeur laser de 5 mW, avec une longueur d'onde de 405 nm, produit des dessins vert vif sur le film qui brille dans le noir. Pour de meilleurs résultats, utilisez le kit dans une pièce faiblement éclairée. Attention : ne regardez jamais directement dans le faisceau laser !
Le kit comprend tous les composants nécessaires, mais la soudure de trois fils est nécessaire.
Remarque : Ce kit est également compatible avec l'horloge de sable d'origine basée sur Arduino de 2017. Pour plus de détails, voir Elektor 1-2/2017 et Elektor 1-2/2018.
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.
Design IoT Projects with Raspberry Pi, Arduino and ESP32 The Internet of Things (IoT) is becoming a major application area for embedded systems. As a result, more and more people are becoming interested in learning about embedded design and programming. Technical colleges and universities are moving away from legacy 8 and 16-bit microcontrollers and are introducing 32-bit embedded microcontrollers to their curriculums. Many IoT applications demand precision, high processing power, and low power consumption. Produced by IBM, Node-RED is an open-source visual editor for wiring the Internet of Things. Node-RED comes with a large number of nodes to handle a multitude of tasks. The required nodes are selected and joined together to perform a particular task. Node-RED is based on flow type programming where nodes are configured and joined together to form an application program. There are nodes for performing complex tasks, including web access, Twitter, E-mail, HTTP, Bluetooth, MQTT, controlling GPIO ports, etc. One particularly nice aspect of Node-RED is that the programmer does not need to learn how to write complex programs. For example, an email can be sent by simply joining nodes together and writing only a few lines of code. The aim of this book is to teach how Node-RED can be used in projects. The main hardware platform used with most of the projects in this book is Raspberry Pi 4. Chapters are included to show how Node-RED can be also be used with Arduino Uno, ESP32 DevKitC, and the ESP8266 NodeMCU microcontroller development boards.
Le FNIRSI 2D15P est un outil de test compact 3-en-1 qui combine un oscilloscope numérique à 2 canaux, un multimètre True RMS et un générateur de formes d'onde dans un seul appareil. Doté d'un écran tactile capacitif de 4,3 pouces, d'une bande passante de 100 MHz, d'une fréquence d'échantillonnage de 500 Méch/s et d'une vitesse d'acquisition jusqu'à 1200 images/s, il est idéal pour le dépannage rapide, l'analyse de signaux et les tests électroniques.
Caractéristiques
Entrée double canal (100 MHz en monocanal, 50 MHz en bicanal)
Profondeurs de mémoire sélectionnables
Bande passante limitée à 20 MHz
Visualisation en niveaux de gris et température de couleur
Opérations mathématiques (addition, soustraction, multiplication, division, etc.)
Mode XY et persistance infinie
Fonction curseur et 13 mesures automatiques
Modes de déclenchement : Auto / Normal / Single
Multimètre True RMS (19999 points)
Générateur de signal DDS 10 MHz
Spécifications
Généralités
Écran
Écran tactile capacitif IPS 4,3 pouces
Fonctionnement
Tactile + Molette + Boutons physiques
Chargement
USB-C (charge rapide 12 V/1 A)
Batterie
Batterie au lithium 5000 mAh
Dimensions
19,6 x 12,9 x 5,7 cm
Poids
1,1 kg
Oscilloscope
Canaux
2
Bande passante analogique
100 MHz
Fréquence d'échantillonnage
500 Méch/s
Profondeur de mémoire
10K, 100K, 1M
Impédance d'entrée
1 MΩ
Plage de la base de temps
5 ns - 50 s
Sensibilité verticale
10 mV - 10 V/div
Tension d'entrée max.
800 V (sonde x10)
Mode de déclenchement
Auto, Normal, Single
Type de déclenchement
Montant, Descendant, Fronts montants et descendants
Couplage
CA/CC
Persistance
min / 2s / 5s / 10s / 20s / 50s / ∞
Calcul Opérations
Oui
Capture de forme d'onde
Oui
Exportation de forme d'onde
Oui
Mesure du curseur
Oui
Multimètre
Tension CC
1.9999V / 19.999V / 199.99V / 1000V
Tension CA
1.9999V / 19.999V / 199.99V / 750.0V
Courant CC
19.999mA / 199.99mA / 1.9999A / 9.999A
Courant CA
19.999mA / 199.99mA / 1.9999A / 9.999A
Résistance
19.999MΩ / 1.9999MΩ / 199.99KΩ / 19.999KΩ / 1.9999KΩ / 199.99Ω
Capacité
999.9uF / 99.99uF / 9.999uF / 999.9nF / 99.99nF / 9.999nF / 9.999mF / 99.99mF
Diode
Oui
Continuité
Oui
Générateur de signaux
Canaux
1
Fréquence
0–10 MHz
Amplitude
0,1–3,0 Vpp
Rapport cyclique
0–100%
Inclus
1x FNIRSI 2D15P oscilloscope
2x Sondes d'oscilloscope P6100
1x Sonde multimètre
1x Sonde à pince crocodile
1x Câble de données USB
1x Manuel
Téléchargements
Manual
Firmware V2.7.0.7
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.