With the availability of free and open source C/C++ compilers today, you might wonder why someone would be interested in assembler language. What is so compelling about the RISC-V Instruction Set Architecture (ISA)? How does RISC-V differ from existing architectures? And most importantly, how do we gain experience with the RISC-V without a major investment? Is there affordable hardware available?
The availability of the Espressif ESP32-C3 chip provides a way to get hands-on experience with RISC-V. The open sourced QEMU emulator adds a 64-bit experience in RISC-V under Linux. These are just two ways for the student and enthusiast alike to explore RISC-V in this book.
The projects in this book are boiled down to the barest essentials to keep the assembly language concepts clear and simple. In this manner you will have “aha!” moments rather than puzzling about something difficult. The focus in this book is about learning how to write RISC-V assembly language code without getting bogged down. As you work your way through this tutorial, you’ll build up small demonstration programs to be run and tested. Often the result is some simple printed messages to prove a concept. Once you’ve mastered these basic concepts, you will be well equipped to apply assembly language in larger projects.
Easy and Affordable Digital Signal Processing
The 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)
Affordable solutions with the ESP8266 and 3D printing
If you are looking for a small yet powerful IoT device, you are likely to come across the ESP8266 and compatible products on the market today. One of these, the Wemos/Lolin D1 Mini Pro board strikes a remarkable balance between cost and performance. A small and very affordable prototype board, the D1 Mini Pro stands out with its WiFi functionality and a 16-Mbytes flash memory for easy creation of a flash file system. In addition, there are sufficient input and output pins (only one analog input though) to support PWM, I²C, and One-Wire systems to mention but a few. The book describes the operation, modding, construction, and programming of home appliances including a colorful smart home accessory, a refrigerator/greenhouse controller, an AC powerline monitor, a door lock monitor, and an IKEA Trådfri controller.
As a benefit, all firmware developed for these DIY, 'IoT-ized' devices can be updated over-the-air (OTA).
For most of the designs in the book, a small printed circuit board (PCB) and an enclosure are presented so readers can have a finished and attractive-looking product. Readers having – or with access to! – a 3D printer can 'print' the suggested enclosures at home or in a shop.
Some of the constructions benefit from a Raspberry Pi configured as a gateway or cms server. This is also described in detail with all the necessary configuring.
You don’t need to be an expert but the prerequisites to successful replication of the projects include basic skills with PC software including the ability to surf the Internet. In terms of hardware, you should be comfortable with soldering and generally assembling the PCBs presented in the book.
All custom software written for the IoT devices, the PCB layouts, and 3D print files described in the book are available for free downloading.
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
59 Experiments with Arduino IDE and Python
The main aim of this book is to teach the Arduino IDE and MicroPython programming languages in ESP32 based projects, using the highly popular ESP32 DevKitC development board. Many simple, basic, and intermediate level projects are provided in the book using the Arduino IDE with ESP32 DevKitC. All projects have been tested and work. Block diagrams, circuit diagrams, and complete program listings of all projects are given with explanations. In addition, several projects are provided for programming the ESP32 DevKitC using MicroPython. The projects provided in this book are designed to teach the following features of the ESP32 processor:
GPIOs
Touch sensors
External interrupts
Timer interrupts
I²C and I²S
SPI
PWM
ADC
DAC
UART
Hall sensor
Temperature sensor
Infrared controller
Reading and writing to SD card
Reading and writing to flash memory
RTC timer
Chip ID
Security and encryption
Wi-Fi and network programming
Bluetooth BLE programming
Communication mobile devices
Low power design
ESP-IDF programming
The projects have been organized with increasing levels of difficulty. Readers are encouraged to tackle the projects in the order given. A specially prepared hardware kit is available from Elektor. With the help of this hardware, it should be easy and fun to build the projects in this book.
Develop your own custom home automation devices
Espressif's ESP8266 and ESP32 microcontrollers have brought DIY home automation to the masses. However, not everyone is fluent in programming these microcontrollers with Espressif's C/C++ SDK, the Arduino core, or MicroPython. This is where ESPHome comes into its own: with this project, you don’t program your microcontroller but configure it.
This book demonstrates how to create your own home automation devices with ESPHome on an ESP32 microcontroller board. You’ll learn how to combine all kinds of electronic components and automate complex behaviours. Your devices can work completely autonomously, and connect over Wi-Fi to your home automation gateways such as Home Assistant or MQTT broker.
By the end of this book, you will be able to create your own custom home automation devices the way you want. Thanks to ESPHome and the ESP32, this is within everyone’s grasp.
Set up an ESPHome development environment and create maintainable configurations
Use buttons and LEDs
Sound a buzzer and play melodies
Read measurements from various types of sensors
Communicate over a short distance with NFC, infrared light, and Bluetooth Low Energy
Show information on various types of displays
Downloads
Software
40+ Projects using Arduino, Raspberry Pi and ESP32
This book is about developing projects using the sensor-modules with Arduino Uno, Raspberry Pi and ESP32 microcontroller development systems. More than 40 different sensors types are used in various projects in the book. The book explains in simple terms and with tested and fully working example projects, how to use the sensors in your project. The projects provided in the book include the following:
Changing LED brightness
RGB LEDs
Creating rainbow colours
Magic wand
Silent door alarm
Dark sensor with relay
Secret key
Magic light cup
Decoding commercial IR handsets
Controlling TV channels with IT sensors
Target shooting detector
Shock time duration measurement
Ultrasonic reverse parking
Toggle lights by clapping hands
Playing melody
Measuring magnetic field strength
Joystick musical instrument
Line tracking
Displaying temperature
Temperature ON/OFF control
Mobile phone-based Wi-Fi projects
Mobile phone-based Bluetooth projects
Sending data to the Cloud
The projects have been organized with increasing levels of difficulty. Readers are encouraged to tackle the projects in the order given. A specially prepared sensor kit is available from Elektor. With the help of this hardware, it should be easy and fun to build the projects in this book.
Recently, the development of a tiny chip called the ESP8266 has made it possible to interface any type of microcontroller to a Wi-Fi AP. The ESP8266 is a low-cost tiny Wi-Fi chip having fully built-in TCP/IP stack and a 32-bit microcontroller unit. This chip, produced by Shanghai based Chinese manufacturer Espressif System, is IEEE 802.11 b/g/n Wi-Fi compatible with on-chip program and data memory, and general purpose input-output ports. Several manufacturers have incorporated the ESP8266 chip in their hardware products (e.g. ESP-xx, NodeMCU etc) and offer these products as a means of connecting a microcontroller system such as the Android, PIC microcontroller or others to a Wi-Fi. The ESP8266 is a low-power chip and costs only a few Dollars.
ESP8266 and MicroPython – Coding Cool Stuff is an introduction to the ESP8266 chip and describes the features of this chip and shows how various firmware and programming languages such as the MicroPython can be uploaded to the chip. The main aim of the book is to teach the readers how to use the MicroPython programming language on ESP8266 based hardware, especially on the NodeMCU.
Several interesting and useful projects are given in the book to show how to use the MicroPython in NodeMCU type ESP8266 hardware:
Project “What shall I wear today?”: You will be developing a weather information system using a NodeMCU development board together with a Text-to-Speech processor module.
Project “The Temperature and Humidity on the Cloud”: You will be developing a system that will get the ambient temperature and humidity using a sensor and then store this data on the cloud so that it can be accessed from anywhere.
Project “Remote Web Based Control”: You will be developing a system that will remotely control two LEDs connected to a NodeMCU development board using an HTTP Web Server application.
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.
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