Projects with Thonny-IDE, uPyCraft-IDE, and ESP32
The 'Python' programming language has enjoyed an enormous upswing in recent years. Not least, various single-board systems such as the Raspberry Pi have contributed to its popularity. But Python has also found widespread use in other fields, such as artificial intelligence (AI) or machine learning (ML). It is obvious, therefore, to use Python or the 'MicroPython' variant for use in SoCs (Systems on Chip) as well.
Powerful controllers such as the ESP32 from Espressif Systems offer excellent performance as well as Wi-Fi and Bluetooth functionality at an affordable price. With these features, the Maker scene has been taken by storm. Compared to other controllers, the ESP32 has a significantly larger flash and SRAM memory, as well as a much higher CPU speed. Due to these characteristics, the chip is not only suitable for classic C applications, but also for programming with MicroPython.
This book introduces the application of modern one-chip systems. In addition to the technical background, the focus is on MicroPython itself. After the introduction to the language, the programming skills learned are immediately put into practice. The individual projects are suitable for use in the laboratory as well as for everyday applications. So, in addition to the actual learning effect, the focus is also on the joy of building complete and useful devices. By using laboratory breadboards, circuits of all kinds can be realized with little effort, turning the testing and debugging of the 100% homebrew projects into an instructive pleasure.
The various applications, such as weather stations, digital voltmeters, ultrasound range finders, RFID card readers or function generators, make the projects presented ideally suited for practical courses or subject and study work in the natural sciences, or in science and technology classes.
In Get Started with MicroPython on Raspberry Pi Pico, you will learn how to use the beginner-friendly language MicroPython to write programs and connect up hardware to make your Raspberry Pi Pico interact with the world around it. Using these skills, you can create your own electro‑mechanical projects, whether for fun or to make your life easier.
Microcontrollers, like RP2040 at the heart of Raspberry Pi Pico, are computers stripped back to their bare essentials. You don’t use monitors or keyboards, but program them to take their input from, and send their output to the input/output pins.
Using these programmable connections, you can light lights, make noises, send text to screens, and much more. In Get Started with MicroPython on Raspberry Pi Pico, you will learn how to use the beginner-friendly language MicroPython to write programs and connect up hardware to make your Raspberry Pi Pico interact with the world around it. Using these skills, you can create your own electro‑mechanical projects, whether for fun or to make your life easier.
The robotic future is here – you just have to build it yourself. We’ll show you how.
About the authors
Gareth Halfacree is a freelance technology journalist, writer, and former system administrator in the education sector. With a passion for open-source software and hardware, he was an early adopter of the Raspberry Pi platform and has written several publications on its capabilities and flexibility.
Ben Everard is a geek who has stumbled into a career that lets him play with new hardware. As the editor of HackSpace magazine, he spends more time than he really should experimenting with the latest (and not-solatest) DIY tech.
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 e-book (pdf) 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.
The LuckFox Pico Ultra is a compact single-board computer (SBC) powered by the Rockchip RV1106G3 chipset, designed for AI processing, multimedia, and low-power embedded applications.
It comes equipped with a built-in 1 TOPS NPU, making it ideal for edge AI workloads. With 256 MB RAM, 8 GB onboard eMMC storage, integrated WiFi, and support for the LuckFox PoE module, the board delivers both performance and versatility across a wide range of use cases.
Running Linux, the LuckFox Pico Ultra supports a variety of interfaces – including MIPI CSI, RGB LCD, GPIO, UART, SPI, I²C, and USB – providing a simple and efficient development platform for applications in smart home, industrial control, and IoT.
Specifications
Chip
Rockchip RV1106G3
Processor
Cortex-A7 1.2 GHz
Neural Network Processor (NPU)
1 TOPS, supports int4, int8, int16
Image Processor (ISP)
Max input 5M @30fps
Memory
256 MB DDR3L
WiFi + Bluetooth
2.4GHz WiFi-6 Bluetooth 5.2/BLE
Camera Interface
MIPI CSI 2-lane
DPI Interface
RGB666
PoE Interface
IEEE 802.3af PoE
Speaker interface
MX1.25 mm
USB
USB 2.0 Host/Device
GPIO
30 GPIO pins
Ethernet
10/100M Ethernet controller and embedded PHY
Default Storage Medium
eMMC (8 GB)
Included
1x LuckFox Pico Ultra W
1x LuckFox PoE module
1x IPX 2.4G 2 db antenna
1x USB-A to USB-C cable
1x Screws pack
Downloads
Wiki
LuckFox Pico Mini is a compact Linux micro development board based on the Rockchip RV1103 chip, providing a simple and efficient development platform for developers. It supports a variety of interfaces, including MIPI CSI, GPIO, UART, SPI, I²C, USB, etc., which is convenient for quick development and debugging.
Features
Single-core ARM Cortex-A7 32-bit core with integrated NEON and FPU
Built-in Rockchip self-developed 4th generation NPU, features high computing precision and supports int, int8, and int16 hybrid quantization. The computing power of int8 is 0.5 TOPS, and up to 1.0 TOPS with int4
Built-in self-developed third-generation ISP3.2, supports 4-Megapixel, with multiple image enhancement and correction algorithms such as HDR, WDR, multi-level noise reduction, etc.
Features powerful encoding performance, supports intelligent encoding mode and adaptive stream saving according to the scene, saves more than 50% bit rate of the conventional CBR mode so that the images from camera are high-definition with smaller size, double the storage space
Built-in RISC-V MCU supports low power consumption and fast start-up, supports 250 ms fast picture capture and loading Al model library at the same time to realize face recognition "in one second"
Built-in 16-bit DRAM DDR2, which is capable of sustaining demanding memory bandwidths
Integrated with built-in POR, audio codec and MAC PHY
Specifications
Processor
ARM Cortex-A7, single-core 32-bit CPU, 1.2 GHz, with NEON and FPU
NPU
Rockchip 4th-gen NPU, supports int4, int8, int16; up to 1.0 TOPS (int4)
ISP
Third-gen ISP3.2, up to 4 MP input at 30fps, HDR, WDR, noise reduction
RAM
64 MB DDR2
Storage
128 MB SPI NAND Flash
USB
USB 2.0 Host/Device via Type-C
Camera Interface
MIPI CSI 2-lane
GPIO Pins
17 GPIO pins
Power Consumption
Low power, RISC-V MCU for fast startup
Dimensions
28 x 21 mm
Downloads
Wiki
35 Touch Develop & MicroPython Projects
The BBC micro:bit is a credit sized computer based on a highly popular and high performance ARM processor. The device is designed by a group of 29 partners for use in computer education in the UK and will be given free of charge to every secondary school student in the UK.
The device is based on the Cortex-M0 processor and it measures 4 x 5 cm. It includes several important sensors and modules such as an accelerometer, magnetometer, 25 LEDs, 2 programmable push-button switches, Bluetooth connectivity, micro USB socket, 5 ring type connectors, and a 23-pin edge connector. The device can be powered from its micro USB port by connecting it to a PC, or two external AAA type batteries can be used.
This book is about the use of the BBC micro:bit computer in practical projects. The BBC micro:bit computer can be programmed using several different programming languages, such as Microsoft Block Editor, Microsoft Touch Develop, MicroPython, and JavaScript.
The book makes a brief introduction to the Touch Develop programming language and the MicroPython programming language. It then gives 35 example working and tested projects using these language. Readers who learn to program in Touch Develop and MicroPython should find it very easy to program using the Block Editor or any other languages.
The following are given for each project:
Title of the project
Description of the project
Aim of the project
Touch Develop and MicroPython program listings
Complete program listings are given for each project. In addition, working principles of the projects are described briefly in each section. Readers are encouraged to go through the projects in the order given in the book.
35 Touch Develop & MicroPython Projects
The BBC micro:bit is a credit sized computer based on a highly popular and high performance ARM processor. The device is designed by a group of 29 partners for use in computer education in the UK and will be given free of charge to every secondary school student in the UK.
The device is based on the Cortex-M0 processor and it measures 4 x 5 cm. It includes several important sensors and modules such as an accelerometer, magnetometer, 25 LEDs, 2 programmable push-button switches, Bluetooth connectivity, micro USB socket, 5 ring type connectors, and a 23-pin edge connector. The device can be powered from its micro USB port by connecting it to a PC, or two external AAA type batteries can be used.
This book is about the use of the BBC micro:bit computer in practical projects. The BBC micro:bit computer can be programmed using several different programming languages, such as Microsoft Block Editor, Microsoft Touch Develop, MicroPython, and JavaScript.
The book makes a brief introduction to the Touch Develop programming language and the MicroPython programming language. It then gives 35 example working and tested projects using these language. Readers who learn to program in Touch Develop and MicroPython should find it very easy to program using the Block Editor or any other languages.
The following are given for each project:
Title of the project
Description of the project
Aim of the project
Touch Develop and MicroPython program listings
Complete program listings are given for each project. In addition, working principles of the projects are described briefly in each section. Readers are encouraged to go through the projects in the order given in the book.
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.
The QA403 is QuantAsylum's fourth-generation audio analyzer. The QA403 extends the functionality of the QA402 with improved noise and distortion performance, in addition to a flatter response at band edges. The compact size of the QA403 means you can take it just about anywhere.
Features
24-bit ADC/DAC
Up to 192 kS/s
Fully isolated from PC
Differential Input/Output
USB powered
Built-in Attenuator
Fast Bootup and Driverless
The QA403 is a driverless USB device, meaning it’s ready as soon as you plug it in. The software is free and it is quick and easy to move the hardware from one machine to the next. So, if you need to head to the factory to troubleshoot a problem or take the QA403 home for a work-from-home day, you can do it without hassle.
No-Cal Design
The QA403 comes with a factory calibration in its flash memory, ensuring consistent unit-to-unit performance. On your manufacturing line you can install another QA403 and be confident what you read on one unit will be very similar to the next unit. It is not expected that re-calibration will be required at regular intervals.
Measurements
Making basic measurements is quick and easy. In a few clicks you will understand the frequency response, THD(+N), gain, SNR and more of your device-under test.
Dynamic Range
The QA403 offers 8 gain ranges on the input (0 to +42 dBV in 6 steps), and 4 gain ranges on the output (-12 to +18 dBV in 10 dB steps). This ensures consistent performance over very wide ranges of input and output levels. The maximum AC input to the QA403 is +32 dBV = 40 Vrms. The maximum DC is ±40 V, and the maximum ACPEAK + DC = ±56 V.
Easy Programmability
The QA403 supports a REST interface, making it easy to automate measurements in just about any language you might anticipate. From Python to C++ to Visual Basic—if you know how to load a web page in your favorite language, you can control the QA403 remotely. Measurements are fast and responsive, usually with dozens of commands being processed per second.
Isolated and USB Powered
The QA403 is isolated from the PC, meaning you are measuring your DUT and not chasing some phantom ground loop. The QA403 is USB powered, like nearly all our instruments. If you are setting up remotely, throw a powered hub in your bag and your entire test setup can be running with a minimum of cables.
Goodbye Soundcard, Hello QA403
Tired of trying to make a soundcard work? The calibration nightmare? The lack of gain stages? The limited drive? Are you tired of dealing with the fixed input ranges? The worry that you might destroy it with too much DC or AC? Tired of the ground loops? That’s why QuantAsylum built the QA403.
Specifications
Dimensions
177 x 44 x 97 mm (W x H x D)
Weight
435 g
Case Material
Powder-coating Aluminum (2 mm thick front panel, 1.6 mm thick top/bottom)
Downloads
Datasheet
Manual
GitHub
The SparkFun RP2350 Pro Micro provides a powerful development platform, built around the RP2350 microcontroller. This board uses the updated Pro Micro form factor. It includes a USB-C connector, Qwiic connector, WS2812B addressable RGB LED, Boot and Reset buttons, resettable PTC fuse, and PTH and castellated solder pads.
The RP2350 is a unique dual-core microcontroller with two ARM Cortex-M33 processors and two Hazard3 RISC-V processors, all running at up to 150 MHz! Now, this doesn't mean the RP2350 is a quad-core microcontroller. Instead, users can select which two processors to run on boot instead. You can run two processors of the same type or one of each. The RP2350 also features 520 kB SRAM in ten banks, a host of peripherals including two UARTs, two SPI and two I²C controllers, and a USB 1.1 controller for host and device support.
The Pro Micro also includes two expanded memory options: 16 MB of external Flash and 8 MB PSRAM connected to the RP2350's QSPI controller. The RP2350 Pro Micro works with C/C++ using the Pico SDK, MicroPython, and Arduino development environments.
Features
RP2350 Microcontroller
8 MB PSRAM
16 MB Flash
Supply Voltage
USB: 5 V
RAW: 5.3 V (max.)
Pro Micro Pinout
2x UART
1x SPI
10x GPIO (4 used for UART1 and UART0)
4x Analog
USB-C Connector
USB 1.1 Host/Device Support
Qwiic Connector
Buttons
Reset
Boot
LEDs
WS2812 Addressable RGB LED
Red Power LED
Dimensions: 33 x 17.8 mm
Downloads
Schematic
Eagle Files
Board Dimensions
Hookup Guide
RP2350 MicroPython Firmware (Beta 04)
SparkFun Pico SDK Library
Arduino Pico Arduino Core
Datasheet (RP2350)
Datasheet (APS6404L PSRAM)
RP2350 Product Brief
Raspberry Pi RP2350 Microcontroller Documentation
Qwiic Info Page
GitHub Repository
Ready-to-use devices and self-built Arduino nodes in the 'The Things Network'
LoRaWAN has developed excellently as a communication solution in the IoT. The Things Network (TTN) has contributed to this. The Things Network was upgraded to The Things Stack Community Edition (TTS (CE)). The TTN V2 clusters were closed towards the end of 2021.
This book shows you the necessary steps to operate LoRaWAN nodes using TTS (CE) and maybe extend the network of gateways with an own gateway. Meanwhile, there are even LoRaWAN gateways suitable for mobile use with which you can connect to the TTN server via your cell phone.
The author presents several commercial LoRaWAN nodes and new, low-cost and battery-powered hardware for building autonomous LoRaWAN nodes. Registering LoRaWAN nodes and gateways in the TTS (CE), providing the collected data via MQTT and visualization via Node-RED, Cayenne, Thingspeak, and Datacake enable complex IoT projects and completely new applications at very low cost.
This book will enable you to provide and visualize data collected with battery-powered sensors (LoRaWAN nodes) wirelessly on the Internet. You will learn the basics for smart city and IoT applications that enable, for example, the measurement of air quality, water levels, snow depths, the determination of free parking spaces (smart parking), and the intelligent control of street lighting (smart lighting), among others.
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.