Multitasking and multiprocessing have become a very important topic in microcontroller-based systems, namely in complex commercial, domestic, and industrial automation applications. As the complexity of projects grows, more functionalities are demanded from the projects. Such projects require the use of multiple inter-related tasks running on the same system and sharing the available resources, such as the CPU, memory, and input-output ports. As a result of this, the importance of multitasking operations in microcontroller-based applications has grown steadily over the last few years. Many complex automation projects now make use of some form of a multitasking kernel.
This book is project-based and its main aim is to teach the basic features of multitasking using the Python 3 programming language on Raspberry Pi. Many fully tested projects are provided in the book using the multitasking modules of Python. Each project is described fully and in detail. Complete program listings are given for each project. Readers should be able to use the projects as they are, or modify them to suit their own needs.
The following Python multitasking modules have been described and used in the projects:
Fork
Thread
Threading
Subprocess
Multiprocessing
The book includes simple multitasking projects such as independently controlling multiple LEDs, to more complex multitasking projects such as on/off temperature control, traffic lights control, 2-digit, and 4-digit 7-segment LED event counter, reaction timer, stepper motor control, keypad based projects, car park controller, and many more. The fundamental multitasking concepts such as process synchronization, process communication, and memory sharing techniques have been described in projects concerning event flags, queues, semaphores, values, and so on.
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.
From basics to flows for sensors, automation, motors, MQTT, and cloud services
This book is a learning guide and a reference. Use it to learn Node-RED, Raspberry Pi Pico W, and MicroPython, and add these state-of-the-art tools to your technology toolkit. It will introduce you to virtual machines, Docker, and MySQL in support of IoT projects based on Node-RED and the Raspberry Pi Pico W.
This book combines several elements into a platform that powers the development of modern Internet of Things applications. These elements are a flow-based server, a WiFi-enabled microcontroller, a high-level programming language, and a deployment technology. Combining these elements gives you the tools you need to create automation systems at any scale. From home automation to industrial automation, this book will help you get started.
Node-RED is an open-source flow-based development tool that makes it easy to wire together devices, APIs, and online services. Drag and drop nodes to create a flowchart that turns on your lights at sunset or sends you an email when a sensor detects movement. Raspberry Pi Pico W is a version of the Raspberry Pi Pico with added 802.11n Wi-Fi capability. It is an ideal device for physical computing tasks and an excellent match to the Node-RED.
Quick book facts
Project-based learning approach.
Assumes no prior knowledge of flow-based programming tools.
Learn to use essential infrastructure tools in your projects, such as virtual machines, Docker, MySQL and useful web APIs such as Google Sheets and OpenWeatherMap.
Dozens of mini-projects supported by photographs, wiring schematics, and source code. Get these from the book GitHub repository.
Step-by-step instructions on everything.
All experiments are based on the Raspberry Pi Pico W. A Wi-Fi network is required for all projects.
Hardware (including the Raspberry Pi Pico W) is available as a kit.
Downloads
GitHub
Elektor GREEN en GOLD leden kunnen deze uitgave hier downloaden.
Nog geen lid? Klik hier om een lidmaatschap af te sluiten.
PIO programmeren op de Raspberry Pi PicoNegen instructies, veel mogelijkheden
AI buiten de browser brengenAI-CLI's gebruiken voor het coderen, compileren en valideren van embedded projecten
De Scrutiny DebuggerDebuggen, visualiseren en testen van code in Embedded C/C++
Sigfox breakout board (1)Een zelfgebouwde radio BoB
Low-Noise voeding (2)Constructie, montage en praktische implementatie
Eenvoudige signaalgenerator met de RP2040Analoge en digitale signalen voor ongeveer €10
De toekomst van slimme huizen verkennen met Matter en Edge AIBieden de nieuwste updates van Matter en de opkomst van Edge AI technici eindelijk de tools om de intelligente, slimme huizen te bouwen die gebruikers zijn beloofd?
Differentiële druksensorenVoorspellend onderhoud in HVAC-systemen
Security by designTechnische basisprincipes beperken storingen
Embedded security is niet langer optioneel
CRA en PQC herzien prioriteiten voor embedded securityWaarom zelfs kleine IoT- en industriële bedrijven een upgradeplan nodig hebben
embedded world 2026Een interview met Benedikt Weyerer, Executive Director embedded world
Praktijkervaring met I3CGebruik van hardware van ST en Microchip
Het BLEnky-projectSnelle prototyping voor Bluetooth Low Energy toepassingen
Pulsbreedtemodulatievan een eenvoudige aan/uit-thermostaat naar een rimpelloos DC-signaal
AudiotronicaOorstrelende elektronica voor zelfbouw
Uit het leven gegrepenRead the f...ing manual!
ESP32 audio transceiver board (Deel 4)Afstemmen van de kloksignalen en een bekabelde versie
2026: An AI OdysseyDe kater van Vibe-Coding in 2025
Symmetrische DC-belastingStatische of dynamische en symmetrische gelijkstroombelasting
Gezichten tellen met MaixCAMEen eenvoudige methode om de omvang van het publiek vast te leggen
USB-Logikanalysatoren am PC mit Arduino, Raspberry Pi und Co
Schritt-für-Schritt-Anleitungen führen Sie in die Analyse moderner Protokolle von I²C, SPI, UART, RS-232, NeoPixel, WS28xx, HD44780 und 1-Wire ein. Anhand von zahlreichen Experimentierschaltungen mit dem Raspberry Pi Pico, Arduino Uno und dem Bus Pirate üben Sie die praxisnahe Anwendung gängiger USB-Logikanalysatoren ein.
Alle in diesem Buch vorgestellten Experimentierschaltungen wurden vollständig getestet und sind funktionsfähig. Die notwendigen Programmlistings sind enthalten, es sind keine besonderen Programmier- oder Elektronikkenntnisse für diese Schaltungen notwendig. Es werden die Programmiersprachen MicroPython und C mit den Entwicklungsumgebungen Thonny und Arduino IDE eingesetzt.
Dieses Buch verwendet mehrere Modelle flexibler und weit verbreiteter USB-Logikanalysatoren und zeigt die Stärken und Schwächen jeder Preisklasse. Sie werden kennenlernen, welche Kriterien für Ihre Arbeit wichtig sind und in der Lage sein, das für Sie passende Gerät zu finden.
Egal ob Arduino, Raspberry Pi oder Raspberry Pi Pico: Die abgebildeten Beispielschaltungen ermöglichen einen schnellen Start in die Protokollanalyse und können auch als Grundlage für eigene weitere Experimente dienen.
Sie werden alle wichtigen Begriffe und Zusammenhänge kennenlernen, eigene Experimente durchführen, selbstständig Protokolle analysieren und nach der Lektüre dieses Buches – im Bereich der digitalen Signale und Protokolle – ein umfassendes Wissen aufgebaut haben.
Elektor GREEN en GOLD leden kunnen deze uitgave hier downloaden.
Nog geen lid? Klik hier om een lidmaatschap af te sluiten.
Kleine warmtebeeldcameraeen op Arduino UNO gebaseerde DHZ-oplossing
Project-update #3: ESP32-gebaseerde energiemeterintegratie en test met Home Assistant
2024: een AI-odysseeobjectdetectie verbeteren met verfijnde technieken
De Raspberry Pi gaat AInieuwe kit bevat M.2 HAT+ met AI-versneller
Sensoren voor weerstationswat is de beste keuze?
Lees uw analoge watermeter uit met AI (1)koppel uw oude watermeter met het IoT!
GSM-alarmdraadloze garagebeveiliging
Low-power Thread-devices geoptimaliseerd en onder de loep genomenweinig vermogen... weinig inspanning?
Uit het leven gegrepende genderkloof
Zelfbouw-nevelkamermaak onzichtbare straling zichtbaar
SparkFun Thing Plus Mattereen veelzijdig Matter-gebaseerd IoT development board
IoT-retrofittenRS232-apparaten klaarstomen voor Industry 4.0
Stimuleer het IoT met 8-bit MCU’s
Technologie stimuleert duurzaamheidvooruitgang leidt in veel toepassingen tot efficiënter energiegebruik
AWS voor Arduino en co. (1)AWS IoT ExpressLink in de praktijk
Luchtstroomdetector met alleen een Arduinozonder externe sensoren!
Lekdetectorverbonden met de Arduino-cloud
Kristallenvreemde onderdelen
Universele logger voor de tuinAI-tuinieren komt een stapje dichterbij
Analoge 1kHz-generatorsinussen met geringe vervorming
Miletus: webapps offline gebruikeninclusief toegang tot het systeem en het apparaat!
Van 4G naar 5Gis het echt zo eenvoudig?
Alle begin......gaat symmetrisch
This book is about DC electric motors and their use in Arduino and Raspberry Pi Zero W based projects. The book includes many tested and working projects where each project has the following sub-headings:
Title of the project
Description of the project
Block diagram
Circuit diagram
Project assembly
Complete program listing of the project
Full description of the program
The projects in the book cover the standard DC motors, stepper motors, servo motors, and mobile robots. The book is aimed at students, hobbyists, and anyone else interested in developing microcontroller based projects using the Arduino Uno or the Raspberry Pi Zero W.
One of the nice features of this book is that it gives complete projects for remote control of a mobile robot from a mobile phone, using the Arduino Uno as well as the Raspberry Pi Zero W development boards. These projects are developed using Wi-Fi as well as the Bluetooth connectivity with the mobile phone. Readers should be able to move a robot forward, reverse, turn left, or turn right by sending simple commands from a mobile phone. Full program listings of all the projects as well as the detailed program descriptions are given in the book. Users should be able to use the projects as they are presented, or modify them to suit to their own needs.
Pfiffige Projekte zum Messen, Steuern und Regeln
Der Raspberry Pi dominiert seit vielen Jahren die Maker-Szene. Frei verfügbare I/O-Pins machten ihn zu einem der beliebtesten Prozessorboards aller Zeiten. Allerdings verfügt der klassische Raspberry Pi über keinerlei Analogeingänge. Eine direkte Messung analoger Werte ist damit nicht möglich. So können weder Photodioden noch NTCs oder Hallsensoren etc. unmittelbar ausgelesen werden. Zudem sind die Pins direkt, d. h. ohne Treiber oder Schutzschaltung, mit den freiliegenden Kontakten verbunden. Dadurch kann der zentrale Controller und damit der gesamte Raspberry Pi schnell zerstört werden.
Mit dem Pico können diese Probleme elegant gelöst werden. Er kann als sogenanntes „Frontend“ problemlos vielfältige Messaufgaben übernehmen. Zudem ist der Pico deutlich preisgünstiger als ein klassischer Raspberry Pi 4. Falls eine Fehlbeschaltung zur Zerstörung des Pico führt, ist dies vor allem für nicht-professionelle Anwender relativ leicht zu verkraften. Der klassische Raspberry Pi und der Pico werden so zum idealen Duo.
Das Buch führt entsprechend in das weite und hochaktuelle Gebiet der modernen Controllertechnik anhand der beiden Boards „Raspberry Pi 4“ und „Raspberry Pi Pico“ ein. Neben einer tiefergehenden Einführung in die Arbeits- und Funktionsweise der Controllerboards selbst wird insbesondere auch auf die Messwerterfassung und -verarbeitung mit digitalen Prozessoren eingegangen. Insbesondere die Kombination beider Systeme bietet vielfältige und hochinteressante Möglichkeiten.
Praktische Projekte aus dem Inhalt:
USB-Verbindung zwischen Raspberry Pi 4 und Pico
I²C-Kommunikation und Pico als I²C-Device
Voltmeter und Computerthermometer
Pico W als Web-Server und WLAN-Scanner
Frequenzmesser und -generatoren
OLED-Displays an Pico und Raspberry Pi 4
Energiesparmonitor
Welche Astronauten sind im Orbit?
Mini-Monitor für den aktuellen Bitcoin-Kurs
Dit boek gaat over de Raspberry Pi, en over het programmeren in C. De programmeertaal C en het besturingssysteem Linux (Raspbian) passen uitstekend bij elkaar. Alles wat we nodig hebben om in C te programmeren wordt meegeleverd met het besturingssysteem van de Raspberry Pi.
In dit boek leert u hoe C gebruikt wordt met de Raspberry Pi, en krijgt u een overzicht van de taal.
WiringPi is een softwarebibliotheek voor de Raspberry Pi waarmee C hardware-uitbreidingen kan benaderen. Die bibliotheek wordt gebruikt om sensoren uit te lezen en om extra hardware aan te sturen. U gaat experimenteren met LED’s en schakelaars, met motoren, met geluid en met sensoren voor temperatuur, luchtdruk, en luchtvochtigheid.
Met een Linux-systeem kunt u een webserver maken, inclusief interactieve websites met PHP en WiringPi. Daarom is ook een beknopt overzicht van HTML en PHP in het boek opgenomen. In de voorbeelden worden sensoren via het web uitgelezen en worden apparaten bestuurd. In het laatste voorbeeld wordt een temperatuurlogger gemaakt. Die meet elk kwartier de temperatuur. Een tabel met de meetwaarden kan via het web worden uitgelezen.
Alle voorbeeldprogramma’s kunnen worden gedownload van de website van Elektor.
Develop innovative hardware-based projects in C
The Raspberry Pi has traditionally been programmed using Python. Although this is a very powerful language, many programmers may not be familiar with it. C on the other hand is perhaps the most commonly used programming language and all embedded microcontrollers can be programmed using it.
The C language is taught in most technical colleges and universities and almost all engineering students are familiar with using it with their projects. This book is about using the Raspberry Pi with C to develop a range of hardware-based projects. Two of the most popular C libraries, wiringPi and pigpio are used.
The book starts with an introduction to C and most students and newcomers will find this chapter invaluable. Many projects are provided in the book, including using Wi-Fi and Bluetooth to establish communication with smartphones.
Many sensor and hardware-based projects are included. Both wiringPi and pigpio libraries are used in all projects. Complete program listings are given with full explanations. All projects have been fully tested and work.
The following hardware-based projects are provided in the book:
Using sensors
Using LCDs
I²C and SPI buses
Serial communication
Multitasking
External and timer interrupts
Using Wi-Fi
Webservers
Communicating with smartphones
Using Bluetooth
Sending data to the cloud
Program listings of all Raspberry Pi projects developed in this book are available on the Elektor website. Readers can download and use these programs in their projects. Alternatively, they can customize them to suit their applications.
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.
Secure, Modular, Open-Source and Self-Sufficient
Ever since the Raspberry Pi was introduced, it has been used by enthusiasts to automate their homes. The Raspberry Pi is a powerful computer in a small package, with lots of interfacing options to control various devices. This book shows you how you can automate your home with a Raspberry Pi. You’ll learn how to use various wireless protocols for home automation, such as Bluetooth, 433.92 MHz radio waves, Z-Wave, and Zigbee. Soon you’ll automate your home with Python, Node-RED, and Home Assistant, and you’ll even be able to speak to your home automation system. All this is done securely, with a modular system, completely open-source, without relying on third-party services. You’re in control of your home, and no one else.
At the end of this book, you can install and configure your Raspberry Pi as a highly flexible home automation gateway for protocols of your choice, and link various services with MQTT to make it your own system. This DIY (do it yourself) approach is a bit more laborious than just installing an off-the-shelf home automation system, but in the process, you can learn a lot, and in the end, you know exactly what’s running your house and how to tweak it. This is why you were interested in the Raspberry Pi in the first place, right?
Turn your Raspberry Pi into a reliable gateway for various home automation protocols.
Make your home automation setup reproducible with Docker Compose.
Secure all your network communication with TLS.
Create a video surveillance system for your home.
Automate your home with Python, Node-RED, Home Assistant and AppDaemon.
Securely access your home automation dashboard from remote locations.
Use fully offline voice commands in your own language.
Download the software and view the errata for the book on GitHub.