Labs / MicroPython tutorials

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

Author: Li Zisheng · Source: FreakStudio open documentation, v1.5 · License: CC BY 4.0

Contents

Welcome to the Wiki of the tutorial *Getting Started with MicroPython: Playing with the Raspberry Pi Pico Microcontroller*!

This is a Raspberry Pi Pico microcontroller tutorial ranging from "zero-based beginner" to "comprehensive practical combat" — we use MicroPython as the development language to help you skip the complicated underlying compile, directly focus on "hardware interaction + function implementation", and get started with this lightweight and flexible microcontroller with ease.

0. What Is This?

0.1 What is this?

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
100 No.1
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
GP0 GP16
9 I2C
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

A stacked open-source development board kit designed exclusively for MicroPython teaching, making embedded system learning easier and teaching more systematic!!!

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
ColorEasyPico2 R200 R150

0.2 Object Oriented

Target AudienceDescription
Absolute beginners and hobbyistsPeople who want to build electronic gadgets but do not know complex technology.
Computer science university studentsPeople who want to quickly turn hardware product prototypes into reality, or get started with embedded development.
MicroPython enthusiastsFill in gaps in fundamentals and improve engineering skills.

0.3 Why Choose MicroPython + Fengya No. 1 Board

0.3.1 Why MicroPython (mpy)

Reasons why traditional embedded development is prone to being abandoned:

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
1.4.3
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

0.3.2 Why Choose Elegance No. 1 Board / Choose Us

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

Why Choose Us?

When you choose the Fengya No. 1 board, what you get is never just a set of "bare hardware", but a "worry-free implementation guarantee" that runs through the entire creative cycle — this is our core confidence. Most kits on the market only stay at the level of "providing hardware plus basic documentation", but as a tech-focused startup team, we invest our costs squarely in the areas that you don't see but have the most inelastic demand for:

  • Professional MicroPython driver, covering everything from getting started to underlying principles;
  • Exclusive driver libraries for multiple sensor modules (supporting one-click MIP installation, open-source and traceable) + component libraries;
  • Wiki Knowledge Base + cross-platform text, image and video tutorials (for troubleshooting via on-demand search);
  • We also provide after-sales support with fast response and customized training services, which thoroughly addresses the pain points of "knowing hardware but not knowing how to teach" and "having no one to turn to when problems arise".

We do not engage in one-off sales; instead, we are your long-term partner that accompanies you all the way from "scattered modules" to "finished prototypes", and from basic experiments to competition projects. Every penny you spend saves time for your ideas, detours, and ensures that every hands-on effort can be efficiently implemented and drive continuous growth!

For bulk purchases by schools, teaching plans can be customized based on students' foundation, curriculum arrangement and class hour planning; orders of 500 sets or above come with 36 class hours of training for science and technology teachers/laboratory operation teachers.

✅ No need to find tutorials on your own: primary and secondary school students can just drag and drop blocks (no coding required), while college students can learn professional skills;

✅ No wiring by soldering: Simply plug in the module for immediate use, one connection can be completed in 10 seconds, and it cannot be plugged in if the connection is wrong;

✅ No need to understand "underlying principles": one-click driver installation, no need to find codes or debug manually;

✅ Get help when in trouble: There are teachers and fellow patients in the QQ group, and you can find picture/video tutorials by searching for keywords

I. Introduction to Fengya No. 1 Board and Shipping Accessories

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

The packing list includes the following items:

Name

Specifications/Accessories

Quantity

Universal Compatibility Expansion Board

It is equipped with a Raspberry Pi Pico core board, along with an onboard CH340K USB-to-TTL chip, a reset button and a user button.

x1

7-inch Color Touch Expansion Board

It comes with one TTP224, four WS2812, one RGB LED, and a pair of LEDs triggered by high and low levels respectively.

x1

Environmental and Storage Expansion Board

On-board components include a serial gyroscope, DHT11, DS1302 RTC chip, and AT24C256.

x1

OLED Display and Interaction Expansion Board

It is equipped with an onboard 0.96-inch OLED screen, a 16-bit IO expansion chip, a 5-way navigation key, an independent SET key, an analog joystick, a passive buzzer, 8 LEDs and two Grove digital interfaces.

x1

LCD Screen Human-Machine Interaction Expansion Board

It is equipped with a 3.2-inch on-board LCD touch screen, a rotary potentiometer, a 5-way navigation key, a rotary encoder, as well as one UART and one I2C Grove interface.

x1

Serial Port Level Conversion Board

It is equipped with one MAX13487 chip and one MAX3232 chip onboard.

x1

Data Conversion Board

This board is not equipped with an onboard ADS1115, an onboard MCP4725, nor two SMA interfaces for internal ADC inputs.

x1

Adjustable DDS Signal Generation Board

Onboard AD9833 and MCP41010 chips, with two SMA interfaces.

x1

Grove Interface Expansion Board

Multiple HY2.0-4P interfaces compliant with the Grove specification are integrated on the board.

x1

Ethernet and SD Card Expansion Board

Onboard W5500 module and SD card.

x1

GraftSense: A USB-to-TTL Module Based on CH340K

HY2.0-4P-Reverse Cable x 1, MiniUSB Cable x 1

x1

GraftSense - A Temperature Sensor Module Based on DS18B20

HY2.0-4P-Reverse Flat Cable x 1

x1

GraftSense - A Watchdog Module Based on the DS1232 Chip

HY2.0-4P-Reverse Flat Cable x 1

x1

GraftSense - Digital Potentiometer Module Based on DS3502

HY2.0-4P-Reverse Cable x 1 MCX Male to Red-Black Dupont Wire x 1

x1

GraftSense - Adjustable Power Supply Module Based on LM2596S

Lithium-ion battery charger set x 1

x1

USB to MicroUSB Cable

0.5m

x1

MiniUSB cable x 1

0.25m

x1

Ethernet cable

1m Category 6 Gigabit

x1

RS232 to USB connector

0.5m

x1

RS485 to USB Connector

Industrial Grade USB to 485 Converter

x1

logic analyzer

NanoDLA

x1

SMA Male to SMA Female

x1

SMA to red-black Dupont wires

x1

SMA to MCX cable

x1

Polymer lithium battery

x1

SD card

industrial-grade

x1

1.1 Universal Compatible Expansion Board

CH340K

This is a flexible development adaptation platform that is compatible with soldering multiple microcontroller core boards of the Raspberry Pi Pico series through on-board pads, allowing users to flexibly select the main controller as needed; meanwhile, it integrates an on-board CH340K USB-to-TTL chip, a reset button and a user button, providing functions for program burning, serial port debugging and customization. With the design concept of "one platform, multiple cores", it transforms fixed hardware into a customizable development system, supports Out Of The Box, and can serve as the foundation of various projects to carry the core board and connect to a computer for programming and debugging.

Raspberry Pi Pico Pin Numbering

Corresponds to the MCU peripheral

Extension Board Corresponding Device

GP0

UART0-TX

USB to TTL Chip - RXD

GP1

UART0-RX

USB to TTL Chip - TXD

RUN

Digital IO

RST Button - Digital Signal Output

GP22

Digital IO

USER Button - Digital Signal Output

1.2 Colorful Touch Expansion Board

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

Raspberry Pi Pico Pinout

Corresponding MCU peripherals

Expansion board compatible devices

GP10

Digital IO

Touch Key 1 - Digital Output

GP11

Digital IO

No. 2 Touch Key - Digital Output

GP12

Digital IO

Touch Key No. 3 - Digital Output

GP13

Digital IO

Touch Key 4 - Digital Output

GP21

PWM Timer

RGB LED Light - BLUE Terminal

GP20

PWM Timer

RGB LED Light - GREEN Terminal

GP19

PWM Timer

RGB LED Light - RED Terminal

GP18

Digital IO

WS2812 - Signal Input Terminal

GP17

Digital IO

Common Anode LED - High Level

GP16

Digital IO

Common Cathode LED - High Level

1.3 Environmental and Storage Acquisition Board

DHT11 DS1302 AT24C256 E2PROM

Raspberry Pi Pico Pinout

Corresponding to MCU peripherals

Expansion Board Corresponding Device

GP2

I2C1-SDA

EEPROM chip AT24C256-I2C-SDA

GP3

I2C1-SCL

EEPROM chip AT24C256-I2C-SCL

GP4

UART1-TX

Serial Port Gyroscope - UART - RX

GP5

UART1-RX

Serial Port Gyroscope - UART - TX

GP10

Digital IO

RTC real-time clock chip DS1302-CLK

GP11

Digital IO

RTC Real-time Clock Chip DS1302-DIO

GP12

Digital IO

RTC Real-Time Clock Chip DS1302-CS

GP13

Digital IO

DHT11 Temperature and Humidity Chip - 1-Wire Bus

1.4 OLED Display and Interaction Expansion Board

SSD1306 0.96 PCF8575 16 8 PS2

Raspberry Pi Pico Pin Numbering

Corresponding to MCU peripherals

Expansion Board Compatible Devices

GP6

I2C1-SDA

OLED Display/IO Expansion Chip - I2C - SDA

GP7

I2C1-SCL

OLED Display / IO Expansion Chip - I2C - SCL

GP8

Digital IO

IO Expansion Chip - Interrupt Pin

GP9

PWM Timer

Buzzer - PWM Signal Input

GP27

ADC1

Joystick X-direction - Analog Voltage Output

GP26

ADC0

Joystick Y-axis - Analog Voltage Output

GP22

Digital IO

Digital signal output of joystick switch

1.5 LCD Screen Human-Machine Interaction Board

3.2 ST7789+GT911 1 I2C

Raspberry Pi Pico Pin Numbering

Corresponds to the MCU peripheral

Extension Board Corresponding Device

GP2

I2C1-SDA

Grove Interface - I2C - SDA

GP3

I2C1-SCL

Grove Interface - I2C - SCL

GP4

UART1-TX

Grove Interface - UART - TX

GP5

UART1-RX

Grove Interface - UART - RX

GP6

SPI0-SCK

LCD Screen - SCK

GP7

SPI0-MOSI

LCD Screen - MOSI

GP8

Digital IO

LCD Screen - RST

GP9

Digital IO

LCD Screen - DC

GP10

Digital IO

LCD Screen - CS

GP11

Digital IO

LCD Screen - BLK

GP12

I2C0-SDA

LCD Screen Touch Chip - I2C - SDA

GP13

I2C0-SCL

LCD Screen Touch Chip - I2C - SCL

GP14

Digital IO

LCD Screen Touch Chip - CS

GP15

Digital IO

LCD Screen Touch Chip - INT

GP28

ADC2

Rotary Potentiometer - POT Voltage Output

GP27

Digital IO

Digital Potentiometer - CLK

GP26

Digital IO

Digital Potentiometer - DT

GP21

Digital IO

Digital Potentiometer - SW

GP20

Digital IO

5-way Switch-UP

GP19

Digital IO

5-way Button - RIGHT

GP18

Digital IO

5-way Button - DOWN

GP17

Digital IO

5-way Switch - CENTER

GP16

Digital IO

5-way Button - LEFT

1.6 Serial Port Level Conversion Board

MAX3232 RS232 MAX13487 RS485

Raspberry Pi Pico Pinout

Corresponding MCU peripherals

Expansion board compatible devices

GP18

Digital IO

MAX13487 Chip - EN

GP17

UART0-RX

MAX13487 Chip/MAX3232 Chip - TX

GP16

UART0-TX

MAX13487 Chip/MAX3232 Chip - RX

1.7 Data Conversion Board

ADS1115 4 16 MCP4725 1 12 2

Raspberry Pi Pico Pinout

Corresponding to MCU peripherals

Expansion Board Corresponding Device

GP2

I2C1-SDA

ADS1115 Chip / MCP4725 Chip - I2C - SDA

GP3

I2C1-SCL

ADS1115 Chip / MCP4725 Chip - I2C - SCL

GP4

Digital IO

ADS1115 Chip - RDY

GP27

ADC1

SMA connector

GP26

ADC0

SMA connector

1.8 Adjustable DDS Signal Generation Board

AD9833 MCP41010

Raspberry Pi Pico Pinout

Corresponding to MCU peripherals

Expansion Board Corresponding Device

GP21

Digital IO

MCP41010 Digital Potentiometer - CS

GP20

Digital IO

AD9833 Chip - FSYNC

GP19

SPI0-TX

AD9833 Chip / MCP41010 Digital Potentiometer - MOSI

GP18

SPI0-SCK

AD9833 Chip / MCP41010 Digital Potentiometer - SCLK

1.9 Grove Base Shield

HY2.0-4P

Raspberry Pi Pico Pin Numbering

Corresponding to MCU peripherals

Expansion Board Compatible Devices

GP4

UART1-TX

Grove-UART1 Interface - UART1-TX

GP5

UART1-RX

Grove-UART1 Interface - UART1-RX

GP10

12C1-SDA

Grove-12C1 interface-12C1-SDA

GP11

I2C1-SCL

Grove-12C1 interface-I2C1-SCL

GP12

UART0-TX

UART0-TXGrove-UART0 Interface-

GP13

UART0-RX

Grove-UART0 Interface - UART0 - RX

GP14

Digital IO

Grove-DIO0 Interface - DIO

GP15

Digital IO

Grove-DIO1 Interface - DIO

GP27

ADC1

Grove-AIN1 Interface - AIN

GP26

ADC0

Grove-AIN0 Interface - AIN

GP21

I2C0-SCL

Grove-12C0 interface-I2C0-SCL

GP20

I2C0-SDA

Grove-12C0 interface-I2C0-SDA

1.10 Ethernet and SD Card Expansion Board

W5500

Raspberry Pi Pico Pin Numbering

Corresponding to MCU peripherals

Expansion Board Compatible Devices

GP10

SPI1-SCK

SD Card - SCLK

GP11

SPI1-TX

SD Card - MOSI

GP12

SPI1-RX

SD Card - MISO

GP13

SPI1-CSn

SD Card - CS

GP21

Digital IO

External Ethernet W5500 Chip - INT

GP20

Digital IO

External Ethernet W5500 Chip - RST

GP19

SPI0-TX

External Ethernet W5500 Chip - MOSI

GP18

SPI0-SCK

External Ethernet W5500 Chip - SCLK

GP17

SPI0-CSn

External Ethernet W5500 Chip - CS

GP16

SPI0-RX

External Ethernet W5500 Chip - MISO

Note when using:

  • Power off before plugging or unplugging (default).
  • Align with the guide slot when inserting the board to avoid lateral torque.
  • High-power boards (for LCD backlight, Ethernet, DDS amplification) should be placed close to the power supply or in the lower layers to avoid voltage drop.
  • When multiple boards share a bus (I²C / SPI / UART), pay attention to the allocation of addresses, chip select (CS) and interrupt (INT). I²C pull-up resistors are usually already installed on the motherboard or the first expansion board, and duplicate pull-up resistors will interfere with the signal.
  • Avoid removing the SD card during operation to prevent damage to the file system; do not remove the card while it is being written to.

II. What will you learn?

2.1 Core Information Summary of Raspberry Pi Pico & RP2040

Top-Level ModuleSub-ModuleKey Topics / Contents
I. Raspberry Pi Pico Introduction1. Pico Board Basic ParametersCore parameters such as basic hardware specifications, operating voltage, clock frequency, storage capacity, and electrical characteristics of the board
2. Pico Board PinoutPin definitions, function mapping, GPIO/ADC/PWM/I²C/SPI/UART correspondence, peripheral connection notes
3. Pico Board Hardware Circuits- Power circuit: power input, power management design
- Clock crystal circuit: system clock source configuration
- BOOT mode selection circuit: boot mode switching logic
- Power supply/current measurement circuit: voltage/current monitoring design
- Chip peripheral circuit: auxiliary chips, interface expansion circuits
- LED driver circuit: onboard LED control logic
- Debug interface circuit: design of debug interfaces such as SWD
- Pin expansion circuit: ways to extend pin functions
- Test points: description of hardware test points
II. RP2040 Chip Introduction1. Chip System Block DiagramInternal module interconnect architecture of the chip, functional module partitioning (CPU, DMA, I/O, Periph, etc.)
2. Pin MappingCorrespondence between physical pins and internal peripherals, description of IO bank and pads
3. Pin Multiplexing FunctionsRules for switching a single pin among multiple peripheral functions, multiplexing priority and configuration methods
4. System Features and Structure Overview- Bus interconnect structure: internal data transfer bus architecture
- Address map: allocation of memory / peripheral address space
- Processor subsystem: single-cycle IO block, interrupts, event signals, debug module
- Cortex-M0+ core: core architecture, instruction set features
- DMA: functions of the direct memory access controller
- Memory: ROM (fixed program), SRAM (runtime memory), Flash (external storage)
- BOOT sequence: hardware-controlled boot, processor-controlled boot flow
- Power supply system: digital IO power, digital core power, on-chip voltage regulator, USB PHY power, ADC power, power-up/power-down sequence and supply schemes (3.3V single supply, external core supply, etc.)
- Core voltage regulator: operating modes, output configuration, register description
- Low-power mode regulation: control of sleep / deep sleep and other modes
- Reset: chip-level reset, subsystem reset mechanisms
- Power-on state machine: chip power-on initialization flow
- Clock system: clock sources, dividers and configuration logic
- GPIO interface and peripherals: function selection, interrupt control, Pads configuration
- Sysinfo / Syscfg registers: management of system information and configuration parameters
- TBMAN test manager: chip test and debug interface
III. Official References1. Schematics and DatasheetsKey reference documents such as the Pico schematic, RP2040 Hardware Design Manual, and Raspberry Pi Pico Datasheet
2. Boot Files and Source Codepico-bootrom (boot loader), links to official SDK / firmware source code (pico-sdk, pico-extras)
3. Example ProgramsOfficial C/C++ examples, MicroPython examples, example projects and usage instructions
4. User ManualsUser documents such as the Pico C SDK manual, MicroPython manual, frequently asked questions (FAQ), and Wiring manual
5. FirmwareMicroPython firmware for Pico W, Pico Probe firmware and their usage instructions
6. Other FilesPico W wireless-related files, configuration files, toolchain scripts and auxiliary resources (drivers, patches, sample configurations, etc.)

2.2 Brief Introduction to MicroPython Language

Top-Level ModuleSub-ModuleKey Topics / Contents
Introduction to the MicroPython Language1. Introduction to MicroPython- Language development background- Other embedded Python solutions: PyMite, CircuitPython
- Comparison of CircuitPython and MicroPython
- Advantages of using MicroPython: lower development difficulty, high portability, strong openness
2. Overview of the MicroPython Project ArchitectureOverall project architecture design, core module partitioning, runtime and module loading flow
3. Introduction to MicroPython-Related Modules- System structure of MicroPython
- machine module: core interface for hardware interaction (GPIO/ADC/PWM/I2C/SPI/UART, etc.)
- rp2 module: RP2040-specific features (PIO, etc.)
- MicroPython standard micro-libraries (micropython-lib)
- MicroPython-specific libraries (built into firmware and distributed externally)
4. Implementation Characteristics of MicroPython- Optimization steps- Methods to maximize running speed (mpy, native/viper, mpy-cross, etc.)
- Strategies to minimize memory usage (frozen, .mpy, qstr optimization, etc.)
- Distribution packages, package management and deployment: process of creating/publishing distribution packages
5. MicroPython Kernel DevelopmentLow-level kernel implementation, core mechanism principles (object model, GC, bytecode interpreter, module loading mechanism, etc.)
SupplementComparison of core differences between CPython and MicroPython (interpreter implementation, standard library coverage, differences in memory/performance/extension mechanisms)
MicroPython/Python Release1. PrefaceRelease background and goals (why release, target audience, expected outcome)
2. MicroPython Third-Party Files- Definition of a released library file- Library file organization (package structure, __init__.py, module layering)
- Library file description: core code, README, open-source license, dependency notes, example files, etc.
3. Code Formatting Standards and Static Checking- Format code with black
- Perform static checking with flake8
- Run checks automatically with pre-commit hooks
- Using GitHub accelerators (mirror/proxy tools)
- Introduction to and use of the mpremote tool (deployment, REPL, file transfer)
4. Public Release on the PyPI Platform- PyPI registration process
- Steps to create and upload a distribution package (setup / pyproject / twine, etc.)
MicroPython
Concepts of Packages and Modules
1. Introduction to the micropython-lib Library Modules- Collection of MicroPython-specific modules
- Trimming and porting of the Python standard library- Notes on common compatible/alternative modules
2. Installing Packages and Modules Remotely- Basic mip installation method and command parameters
- mip installation demo (online installation on the device)
3. Installing Packages and Modules ManuallyManually download, unpack, and copy files to the device (using tools such as ampy, rshell, mpremote)
4. Cross Installation and Freezing- Cross-compilation installation method (cross toolchain, generating .mpy)
- Steps, advantages, and disadvantages of freezing modules (compiling modules into the firmware)
How to Speed Up MicroPython
Execution Speed
1. Optimization StepsOverall performance optimization process (locate → analyze → optimize → verify)
2. Optimization Methods- Identify the slowest code (benchmarking and profiling)
- Specific measures:
① Basic concepts: variables/constants, memory partitions, references and copies
② MicroPython performance bottleneck analysis ③ Memory and object optimization: preallocation, fixed objects, using array/memoryview instead of list, caching references, manual GC control
④ Code execution efficiency: declaring constants with const(), .mpy/mpy-cross, native/viper compilers (code emitters)
⑤ Arithmetic and hardware optimization: using integers instead of floats, direct register operations, using DMA to accelerate data transfer
3. Optimization Experiments- LCD screen driver optimization practice (reduce refreshes, batch writes, use buffers)
- DMA-related optimization practice (zero-copy, direct peripheral writes)
How to Minimize MicroPython
Memory Usage
1. Prerequisite ConceptsBasic principles of memory management (heap/stack/flash, how GC works, the qstr concept)
2. Optimization Methods- Basic principles and strategies
- Data storage scheme using an SD card to expand external storage
- Frozen modules and frozen bytecode: generation and usage process, advantages
- Using files compiled to .mpy (mpy-cross)
- Optimization using const constants and namespaces/scopes
- Reducing temporary objects and string allocations: reusing strings/buffers, avoiding temporary containers in loops, the mechanism by which qstr stores strings in flash
- Heap and GC optimization: adjusting heap size, explicitly triggering GC, avoiding concurrent allocation of large objects

2.3 Setting Up the MicroPython Development Environment

Top-Level ModuleSub-ModuleKey Topics / Contents
Firmware Flashing1. Flashing MicroPython Firmware on the Raspberry Pi PicoHow to put the Raspberry Pi Pico into BOOTSEL mode, the UF2 firmware copy procedure, flashing precautions and common problems
2. MicroPython Firmware Version on the Raspberry Pi PicoHow to check the firmware version, upgrade/downgrade procedure, features and compatibility notes of different versions
Development Environment Setup1. PyCharm- Online/offline installation of the MicroPython plugin- Main features of the MicroPython Tool plugin: code editing, device connection, file management, REPL interaction
2. VS Code(Not recommended for beginners) Setup procedure for a VS Code-based MicroPython development environment on Linux, plugin selection, and basic configuration
3. Thonny(Recommended for learning) A lightweight IDE with built-in MicroPython support, suitable for beginners to write, flash, and debug code
Online Simulation Platforms
Supporting MicroPython
1. WokwiA browser-based online simulation and debugging platform that supports running MicroPython code and peripheral simulation
2. UnicornAnother online MicroPython simulation tool that supports basic peripherals and logic verification
Graphical Programming for MicroPython1. Graphical Programming ToolsDesign program logic by drag and drop, enabling MicroPython application development with little or no code
Supplementary Resources1. ReferencesLearning and reference resources such as official documentation, tutorials, example projects, and community articles
2. Software InstallationList of software and tool installers needed for MicroPython development (drivers, IDE, flashing tools, etc.)
3. Version HistoryDocument update history, version iteration notes, and change log

2.4 Using the REPL Interactive Interpreter

Top-Level ModuleSub-ModuleKey Topics / Contents
Basic Concepts of the REPL Interactive Interpreter1. How the REPL WorksHow the REPL (Read-Eval-Print-Loop) works: read input → interpret and execute → print result → enter the next loop
2. REPL Shortcut KeysDescription and use cases of common shortcut keys (such as interrupting execution, soft reset, history recall) to improve interaction efficiency
Connecting a Computer to the Raspberry Pi Pico1. Connecting via USB- Connect using the mpremote tool (officially recommended)
- Connect using PuTTY
- Connect using MobaXterm
2. Connecting via Serial PortHardware required for a serial connection, TX/RX/GND wiring, serial parameter configuration, and connection steps
REPL Applications1. Quickly Mastering REPL Methods- Use help() / dir() to look up function and module usage
- View the attributes and methods contained in a module
- Tips for pasting and running long blocks of code
2. Terminal Print OutputUse print() and similar methods for debug output; understand line breaks, formatted output, and how to view debug messages
3. Driving an LEDBasic hands-on procedure for sending commands directly through the REPL to control a GPIO and turn an LED on/off
Supplementary Resources1. ReferencesOfficial documentation, tutorials, example code, and community learning resources
2. Version HistoryDocument update history, version iteration notes, and change log

2.5 Basic Principles of Microcontroller Peripherals and Introduction to Corresponding Registers of Raspberry Pi Pico

Top-Level ModuleSub-ModuleKey Topics / Contents
I. GPIO General-Purpose Input/Output1. Hardware Overview- Basic concepts and internal structure of an MCU
- Basic structure and working principle of GPIO
- Raspberry Pi Pico GPIO overview:
① IO function introduction
② GPIO electrical parameters: maximum/minimum rated voltage, digital IO parameters, analog IO parameters
II. UART Serial Communication1. Communication Basics- Basic concepts of communication
- Classification of common communication protocols-
Classification of communication methods: ① Serial vs. parallel ② Synchronous vs. asynchronous ③ Simplex / half-duplex / full-duplex
- Core concepts of communication rate: bit rate, baud rate, symbol
- Definitions of and relationships among interface, bus, and protocol
2. Hardware Overview- Basic concepts of serial communication
- Serial data packet format and transmission process
- Custom protocol frames: frame format, packing and unpacking
- Serial flow control and data verification mechanisms
- The "pipeline" idea for improving communication throughput
- UART peripheral structure and functions:
① UART peripheral structure
② UARTCLK clock configuration
③ Peripheral operations: baud rate setting, error detection, loopback test, FIFO operation
④ Transmit/receive flow: transmit and receive mechanisms
⑤ Hardware flow control
⑥ DMA interface
⑦ Interrupts: types, enable/disable, status reading, FIFO interrupts
- Overview of the Raspberry Pi Pico UART
III. Interrupts1. Basic concepts and types of interrupts- Basic concepts of interrupts
- Types of interrupts
- How the NVIC (Nested Vectored Interrupt Controller) works
2. The NVIC interrupt controller of the Raspberry Pi Pico- Basic interrupt operation flow
- NVIC configuration methods and function descriptions
IV. I2C (Inter-Integrated Circuit) Bus1. Hardware Overview- The BUS concept: history, characteristics, and modern significance
- Introduction to the I2C bus and its history
- I2C protocol in detail:
① Physical layer: communication interface, master-slave relationship, topology, speed, logic levels, electrical characteristics
② Protocol layer: data frame format, start/stop signals, acknowledgment mechanism, clock stretching, arbitration, broadcast, device ID
- Advantages of the I2C bus and comparison with UART/SPI
- I2C peripheral structure and related registers
- Overview of the Raspberry Pi Pico I2C
V. SPI (Serial Peripheral Interface)1. Hardware Overview- Introduction to SPI and its history
- Serial vs. parallel communication, and the background of SPI
- SPI protocol:
① Protocol layer: communication flow, clock polarity and phase (CPOL/CPHA)
② Electrical specification: connection methods and timing
- Advantages and disadvantages of SPI, and protocol types
- SPI peripheral structure:
① Basic structure
② Registers: clock divider, communication parameters, FIFO, interrupts, DMA, peripheral and PrimeCell identification registers
- Overview of the Raspberry Pi Pico SPI
VI. Timers1. Hardware Overview- Introduction to timers and how they work
- Operating modes: timing, counting, PWM
- Timer structure:
① General-purpose timer: counter, alarm unit
② PWM timer: structure, channel triggering, counting modes, dual-register mechanism
③ SysTick system tick timer: functions and controller
- Overview of the Raspberry Pi Pico timers
VII. PIO (Programmable Input/Output)1. Hardware Overview- Basic structure of the PIO peripheral
- PIO programming model and state machine principles:
① Control flow and PC mechanism
② OSR / ISR / Shifter / erasable registers
③ Wait states and the Side-set mechanism
④ GPIO mapping, IRQ flags, and state machine synchronization
- PIO assembly syntax and instruction set (JMP, WAIT, IN, OUT, PUSH, PULL, MOV, IRQ, SET)
- PIO features: Side-set, program wrapping, FIFO joining, autopush/autopull, clock divider, GPIO mapping
- Instruction execution mechanism
- PIO-related control registers on the Pico
VIII. OneWire Single-Bus Communication1. Hardware Overview- Introduction to the single-bus protocol, its history, and application scenarios
- Protocol in detail:
① Physical layer: connection method, levels, open-drain output, power supply modes (parasitic/independent)
② Protocol layer: communication flow, signal timing, ROM commands and addressing
- Overview of the Raspberry Pi Pico OneWire
IX. USB (Universal Serial Bus)1. Hardware Overview- USB basics and history
- USB system architecture and physical interface
- USB communication layers and endpoints/descriptors
- USB enumeration process and device states
- USB data transfer and packet types
- USB frames and transaction mechanism
- Overview of the Raspberry Pi Pico USB peripheral
X. RTC (Real-Time Clock)1. Hardware Overview- Basic structure and working principle of the RTC
- Accuracy, error, and comparison of internal/external RTCs
- Pico RTC: clock input, leap year detection, interrupt and wake-up functions
XI. WDT (Watchdog Timer)1. Hardware Overview- Introduction to the watchdog and its application scenarios
- Pico WDT: clock input, reset mechanism, counter, Scratch registers and magic numbers
XII. Low-Power Modes1. Hardware Overview- Definition and principles of low-power modes
- Microcontroller operating modes and wake-up mechanisms
- Low-power mode support on the Raspberry Pi Pico
XIII. ADC (Analog-to-Digital Conversion)1. Hardware Overview- Basics of analog and digital signals
- ADC peripheral structure, working principle, performance metrics, and types
- Pico ADC:
① Peripheral introduction
② One-shot / free-running sampling modes
③ Multi-channel sampling
④ FIFO: enable, overflow, data format, DMA/interrupt coordination
⑤ Effective resolution notes
⑥ Built-in temperature sensor
XIV. DMA (Direct Memory Access)1. Hardware Overview- Introduction to DMA, working principle, types, and transfer modes
- Pico DMA:
① DMA unit structure
② Channel configuration (read/write address, count, control trigger registers)
③ Start and chained triggering, null trigger, and chain interrupt
④ Data request mechanism
⑤ DMA interrupts
⑥ Other features: pacing timer, CRC check, channel abort and debugging

2.6 Relevant Methods for MicroPython to Control Corresponding Peripherals and Usage of Related Tool Software

Top-Level ModuleSub-ModuleKey Topics / Contents
GPIO and Signal Control1. machine.Pin class- Constructor: pin initialization (number, mode, pull-up/pull-down, etc.)
- Other methods: basic GPIO operations such as setting, reading, and toggling the pin level
2. machine.Signal class- Constructor: signal object wrapping a Pin
- Other methods: signal level toggling and logic state control (for convenient management of inverted high/low levels)
UART Serial Communication1. machine.UART class- Construction and initialization: configuration of baud rate, TX/RX pins, parity bit, stop bits, etc.
- Other methods: data transmit/receive, buffer status query
2. Auxiliary tools and drivers- select module: multi-serial-port listening and event polling
- CH340 chip driver: USB-to-serial hardware support
- XCOM / SerialPlot: serial debugging and data visualization tools
3. Serial port interrupt control- UART.irq() configuration parameters: • handler: interrupt callback function (memory allocation is prohibited when hard=True) • trigger: interrupt trigger condition (RXIDLE / TXIDLE / BREAK) • hard: hard interrupt / soft interrupt selection
- Interrupt sources supported by the RP2040: IRQ_RXIDLE, IRQ_TXIDLE, IRQ_BREAK
I2C Communication1. machine.I2C class- Constructor: configuration of the hardware I2C SDA/SCL pins, communication speed, and other parameters
2. machine.SoftI2C class- Constructor: configuration of the software-emulated I2C pins, speed, and other parameters
3. Other I2C class methods- General methods: scan devices, basic read/write
- Raw methods: low-level SoftI2C operation interface
- Standard methods: read/write flows that follow the I2C bus protocol
- Memory methods: bulk read/write of device registers
SPI communication1. machine.SPI class- Constructor: hardware SPI pins, clock polarity/phase (CPOL/CPHA) configuration
2. machine.SoftSPI class- Constructor: configuration of the software-emulated SPI pins and clock parameters
3. Other SPI class methods- Data transmit/receive interface
- Status query
- Chip select (CS) control for multiple devices
Timer and PWM1. machine.Timer class- Constructor: timing / counting mode, period, and other parameters
- Other methods: start/stop, callback function and interrupt configuration
2. machine.PWM class- Constructor: PWM pin, frequency, duty cycle configuration
- Other methods: dynamic duty cycle adjustment, PWM start/stop
PIO programmable control1. rp2.StateMachine class- Constructor: bind PIO program, pin mapping, initial parameters
- Other methods: state machine start/stop, FIFO data transmit/receive
2. rp2.PIO class- Constructor: PIO pin mapping, clock divider configuration
- Other methods: PIO interrupt management, FIFO operations
3. PIO helper functions- PIO assembly program loading function
- PIO instruction wrappers in MicroPython (JMP / WAIT / IN / OUT, etc.)
OneWire single bus1. Software-emulated single bus- Pin initialization: open-drain mode, interrupt configuration
- Core operations: reset pulse, presence detection, bit/byte read/write
- ROM operations: ID scan, match, CRC8 check
- Common command constant definitions
USB device control1. USBDevice class- Device types: Runtime USB, Built-in USB (CDC / MSC, etc.)
- Construction feature: singleton pattern
- Main methods: config(), active(), builtin_driver, remote_wakeup()
- Pico limitation: Runtime USB cannot be controlled through this class
RTC real-time clock1. machine.RTC class- Constructor: RTC initialization, time calibration
- Other methods: time read/set, alarm and interrupt configuration
WDT watchdog1. machine.WDT class- Constructor: timeout configuration
- Other methods: feeding the watchdog, watchdog control
Low-power modes1. Low-power control- machine module low-power interface: sleep / deep sleep configuration and wake-up
- Pico-specific issue: MicroPython low-power limitations and workarounds
ADC analog-to-digital conversion1. machine.ADC class- Constructor: ADC pin, sampling resolution configuration
- Other methods: analog voltage reading, sampling rate control
DMA direct memory access1. rp2.DMA class- Constructor: source/destination address, transfer length, and other configuration
- Other methods: DMA start/stop, status query
- Properties: channel priority, transfer mode, and other parameters
Top-Level ModuleSub-ModuleKey Topics / Contents
Basic peripherals and GPIO experimentsGPIO basic experimentsGPIO read/write example;
GPIO external interrupt example;
machine.Signal class (signal wrapping and control)
Serial communication and protocol practiceMotor and encoder experimentsGPIO control of a stepper motor (principle / drive / microstepping);
Rotary encoder (pulse counting / direction detection);
Five-way button (debouncing / state machine)
Basic serial port experimentsSerial receive-only / transmit-only;
select module listening;
RS232 / RS485 (CH340 / MAX3232 / MAX13487, level conversion)
Serial protocol parsing practiceJY61 six-axis gyroscope (protocol frame / checksum / core methods);
R60ABD1 radar (data frame parsing / business mapping / DataFlowProcessor);
Bus servo (Hiwonder protocol / SerialServo)
Serial interrupt experimentsRX idle interrupt (complete frame reception);
TX idle interrupt (transmit completion confirmation)
I2C / SPI peripherals and
extension experiments
I2C peripheral experimentsSSD1306 OLED;
PCF8575 GPIO expander;
AT24C256 EEPROM;
ADS1115 ADC;
MCP4725 DAC
SPI peripheral experimentsGT911 touchscreen;
ST7789 LCD;
AD9833 waveform generator;
DS3502 / MCP41010 digital potentiometer
Display and input interaction experimentsScreen display experimentsOLED text / graphics / data visualization;
LCD color UI / custom widgets
Touch and button interactionGT911 multi-touch / gestures;
Five-way button / joystick menu navigation
Sensor and data acquisition experimentsEnvironmental sensor experimentsDHT11 (single bus);
MY18E20 (CRC / alarm);
Internal temperature sensor (timer / interrupt)
Motion sensor experimentsJY61 attitude calculation and calibration;
R60ABD1 human presence / heart rate / respiration / sleep
PIO advanced control experimentsPIO basic experimentsLED control;
PIO interrupt;
exec / instr instructions
PIO Peripheral DriversWS2812 LEDs;
Precise stepper motor pulses;
PIO-emulated UART / SPI
RTC and Watchdog ExperimentsRTC ExperimentDS1302 real-time clock;
Network time sync for RTC
Watchdog ExperimentBuilt-in WDT;
Software timer WDT;
Multithreaded WDT;
External DS1232
Timer and PWM ExperimentsTimer ExperimentButton state machine;
Task scheduling;
Rotary encoder;
PWM ExperimentLED breathing light;
RGB color mixing;
Buzzer / MIDI
Low-Power and Interrupt Optimization ExperimentsLow-Power ExperimentIdle / Sleep / DeepSleep;
Wake-up sources;
Power consumption comparison
ISR OptimizationCommunication between ISR and main loop;
micropython.schedule;
Critical sections and reentrant design
DAC and Waveform Generation ExperimentsDAC ExperimentMCP4725 (DDS);
AD9833 (frequency / phase registers);
DS3502 resistance adjustment
DMA (Direct Memory Access) ExperimentsDMA Transfer ExperimentMemory↔memory;
Memory→peripheral (UART DMA);
Peripheral→memory (ADC DMA);
Chained triggering
Driver Development and Architecture OptimizationDriver Architecture DesignR60ABD1 driver layering; DataFlowProcessor; command mapping table (COMMAND_MAP)
Driver Optimization and TestingConfigurable initialization; test scripts; business driver layer decoupling and refactoring

2.8 Communication Protocol and Component Library Section

2.8.1 Ethernet Communication Protocol

Top-Level ModuleSub-ModuleKey Topics / Contents
I. Hardware OverviewIntroduction to the ETH Ethernet ProtocolEthernet Basics: Protocol Overview and History
OSI seven-layer model:
① Preliminary concepts (node / link / protocol / network / topology)
② Physical layer (basic functions, bit / byte)
③ Data link layer (LLC / MAC)
④ Network layer (router / routing table / gateway / subnet mask / packet)
⑤ Transport layer (TCP / UDP / segment)
⑥ Session layer (Session, C/S, request-response model)
⑦ Presentation layer (data formatting / security protocols)
⑧ Application layer (common protocols)
TCP/IP model: correspondence with OSI
Ethernet protocol in detail:
• Physical layer (transmission media, encoding, MAC mechanism, CSMA/CD, auto-negotiation, 7.5-4-3 rule, segment / microsegment, VLAN)
• Data link layer (MAC sublayer / LLC sublayer)
Common network protocols: DHCP, DNS, HTTP, MQTT, Modbus TCP, PPP / PPPoE
Introduction to the W5500 Ethernet ModuleW5500 Chip Internal Structure
Pin Functions and Peripheral Circuit Design
Host Interface and SPI Data Frame Format
Registers and memory organization:
① Overall structure
② Common register block
③ Socket register block
④ Memory organization
⑤ VDM (Variable Data Length) read/write mechanism
⑥ FDM (Fixed Data Length) read/write mechanism
II. Software Control MethodsFirmware FlashingWiznet W5500-EVB-Pico Development Board MicroPython Firmware Flashing Procedure
Ethernet Communication Methodsnetwork module (network initialization / parameter configuration)
WIZNET5K class (W5500 core driver)
socket module (TCP / UDP socket communication)
Development PreparationDebugging Software Download and Configuration
Development Environment Preparation
Hardware Connections and Development Notes
III. Application ExamplesTCP Protocol ExperimentsPing test (network connectivity)
TCP client (connect / send and receive data)
TCP server (listen / handle multiple clients)
UDP Protocol ExperimentsUDP client / server experiments, verifying connectionless data transmission characteristics
Basic Network Protocol ExperimentsDHCP automatic IP acquisition
DNS domain name resolution experiment
HTTP client requests
HTTP server setup
MQTT Protocol ExperimentsMQTT client (connect / publish / subscribe)
MQTT Broker configuration, publish / subscribe communication verification

2.8.2 ulab Scientific Computing

Top-Level ModuleSub-ModuleKey Topics / Contents
ulab Core Information in DetailBasic Positioning and ConfigurationPositioning and design goals of ulab (a lightweight replacement for numpy / scipy in embedded environments)
Firmware customization mechanism: trimming features through compile-time macros to reduce firmware size
Compatibility with numpy: API alignment principles, scope of feature trimming
Interpreting the version string: correspondence between version number and feature set
Feature Verification MethodsModule / function availability check: interfaces supported by tools such as dir()
ndarray built-in methods
Verifying support for unary / binary operators
ndarray Core Concepts in DetailBasic Features and Initializationndarray core features: multidimensional arrays, dtype, memory layout
Array initialization methods:
① Basic construction with np.array()
② Dedicated constructors such as zeros() / ones() / eye()
Core Operation Rulesndarray attributes and methods: shape / dtype / reshape() / flatten(), etc.
Operator rules:
① Unary operators (+ / − / ~)
② Binary operators (+ / − / * / //) and broadcasting
Indexing and slicing:
① Integer / slice / boolean indexing
② View-first principle (avoid memory copies)
numpy in ulab
Function categories and descriptions
Function categories and functionsLogic: where() / all() / any()
Indexing and sorting: argsort() / sort() / take()
Numerical computation: sum() / mean() / std() / max() / min()
Array manipulation: concatenate() / split() / reshape()
Bitwise operations: bitwise_and() / bitwise_or()
Complex numbers: real() / imag() / conj()
Matrix and convolution: dot() / matmul() / convolve()
File I/O: loadtxt() / savetxt()
ulab general math functionsFunction rules and featuresGeneral rules: broadcasting, dtype adaptation rules
Special function rules:
① arctan2 (two-argument arctangent)
② around (rounding)
③ exp (exponential)
④ sqrt (square root)
Function vectorization: np.vectorize(), otypes parameter, performance characteristics
Key differences from numpy: feature trimming and performance trade-offs
ulab FFT / IFFTCore mechanisms and differencesDefault behavior: real FFT without complex number support
numpy-compatible mode with complex number support enabled
Differences from numpy FFT: simplified interface, embedded performance optimization
ulab linalg linear algebra moduleFunction analysis and comparisonOverview: matrix operations, eigenvalue / eigenvector computation
Core function analysis:
① eig (eigenvalues / eigenvectors)
② norm (2-norm)
③ inv (matrix inverse)
ulab vs numpy: feature trimming, precision and performance trade-offs
ulab numpy.random
Random number generation
Generators and methodsGenerator random number generator object
Comparison of parameters and features of the three random number generation methods; key usage points:
① Fix the seed to ensure reproducibility
② random reuses the out array
③ Equivalence of uniform and random
Interface differences between ulab and numpy
ulab scipy.integrate numerical integrationModule configuration and function analysisCompile macro enabling requirements; comparison of the four integration functions
Key function analysis:
① quad (general-purpose first choice)
② tanhsinh (infinite interval / singularity integration)
③ romberg / simpson (supplementary scenarios)
Performance and accuracy trade-offs in embedded scenarios
ulab scipy.linalg equation solvingFunction comparison and advantagesCore comparison of cho_solve and solve_triangular
Key function analysis:
① cho_solve (efficient solving after Cholesky decomposition)
② solve_triangular (dedicated to triangular matrices)
Embedded application advantages: low memory, high efficiency
ulab scipy.optimize
Root finding and optimization
Function analysis and differencesComparison of three methods: bisect / fmin / newton
Key function analysis:
① bisect (bisection method, robust)
② fmin (derivative-free minimum search)
③ newton (fast convergence)
Differences from CPython scipy
ulab scipy.signal.sosfiltFeatures and applicationsSecond-order IIR filter implementation mechanism
Differences from CPython sosfilt
Typical application: 50Hz / 60Hz power-line interference suppression
ulab scipy.special special functionsFunction coverageSpecial functions commonly used in embedded systems: gamma function, Bessel functions, etc. (trimmed according to computing power)
ulab utils data conversion and spectrum analysisEnabling and core featuresCompile macro enabling requirements
Buffer conversion functions:
from_(u)int16/32_buffer() (byte order / array reuse)
spectrogram: efficient spectrum analysis, FFT adaptation, parameter descriptions
Core ulab optimization tipsPerformance and memory optimizationUse ndarray instead of native containers
Choose dtype sensibly (prefer float32)
Axis order optimization for multidimensional arrays (longest axis last)
Reduce intermediate arrays, prevent memory fragmentation; low-resolution data / image adaptation
ulab underlying implementation and extension analysisResources and extensionsSummary of firmware, source code, and official documentation resources
Underlying implementation principle: lightweight C wrapper; hardware adaptation extension methods:
Compile macro trimming, custom function extension
Top-Level ModuleSub-ModuleKey Topics / Contents
Hardware explanationOverview of microcontroller memory structureMain memory categories and characteristics:
① ROM (read-only memory): stores firmware and boot code, retained after power loss
② RAM (random access memory): stores runtime data, fast but lost after power loss
External memory: Flash, EEPROM, SD card, etc. (large capacity, expandable)
Address space and bus structure: memory mapping mechanism, bus transfer protocol, data interaction model
Raspberry Pi Pico memory structureROM: contains the bootloader and boot-related code
SRAM: runtime memory, holds the stack, heap, variables, etc.
External Flash:
① XIP execution mechanism: code in Flash executes directly
② XIP Cache mechanism: cache hits and performance improvement
③ XIP Cache clearing and maintenance
④ SSI serial flash interface structure
⑤ Flash streaming and auxiliary bus slave mode
⑥ Flash performance counters
MicroPython memory regionsMicroPython internal storage layout: code area / data area / heap area / file system area
Memory allocation strategy under embedded resource constraints
MicroPython file systemBasic file system concepts: files, directories, metadata
VFS (virtual file system): unified abstraction of different storage media
Block device concept: underlying storage unit of Flash / SD / EEPROM
Software control methodsos moduleFile and directory operations: create / delete / rename / read and write; path management and current working directory
File system status and capacity information queries
vfs virtual file system moduleVFS mount and unmount process
Block device registration and management; unified file interface for accessing different storage media
Block device abstract classStandard block device interface definition: read block / write block / erase block
Basic abstraction for custom storage devices
Application examplesFile read/write operationsopen() / read() / write() / close()
Basic interfaces: text file vs. binary file read/write comparison
Custom logging functionalityDesign principles of the logger class: log levels, output targets
Configuring log filters and formatters: format customization, conditional filtering
Application experiment: log file storage, rotation and viewing
Simple block device class implementationDesign concept of the block device abstract base class
RAM block device implementation: simulating a storage medium with RAM
Application experiment: file system mounting and verification based on a RAM block device
Mounting a file system on an SD cardSD card basics:
① SD / SDHC / SDXC classification and differences
② Storage structure and controller principles
③ SPI mode vs. SD bus mode comparison
④ Communication protocol and command-response flow
⑤ Partition table and block allocation mechanism
Custom SD card driver: initialization, commands, data blocks
SD card read/write: file system mounting and read/write experiment
Mounting a file system on an external EEPROMExperiment preparation: EEPROM wiring and driver dependencies
EEPROM block device adaptation: byte addressing, handling erase characteristics
Application experiment: mounting a file system on a small-capacity EEPROM and data persistence

2.8.4 Graphical GUI

Top-Level ModuleSub-ModuleKey Topics / Contents
LVGL basicsCore positioningLightweight embedded GUI library for resource-constrained devices
Supports MCU platforms such as Raspberry Pi Pico and ESP32
Supports multiple environments: bare metal (no OS) / RTOS / Linux
Core conceptsScreen (Display): the display device
Abstract object (Object): the smallest building unit of the UI (essentially a widget)
Style (Style): appearance properties such as color, font, border, and corner radius
Theme (Theme): a set of predefined styles
Event (Event): the mechanism that triggers user interaction and system behavior
Porting essentialsDisplay driver porting: screen resolution, color depth, flush callback
Input driver porting: touch / buttons / encoder
Memory management configuration: heap size, cache strategy
Refresh period and frame rate configuration, balancing performance and power consumption
Basic widget systemCore widgetsCommon basic widgets:
Button (btn), Label (label), Slider (slider), List (list), Chart (chart), Progress bar (bar)
Widget featuresWidget hierarchy nesting (parent-child relationship)
Style customization and dynamic switching, event binding (click / drag / value change)
Real-time update of widget properties
Display driver adaptationDriver interfaceImplement the LVGL display flush callback function
Adapting common Pico displays:
ST7789 color
LCDSSD1306
Monochrome OLED
Display buffer optimizationFor the Pico SRAM limit: use a partial buffer (Partial Buffer) and double buffering (Double Buffer) to reduce the refresh area and cut memory usage and SPI bandwidth pressure
Interaction controlInput driversTouchscreen driver: I2C touch chips such as GT911
Button input: GPIO button mapping
LVGL events
Rotary encoder: adapting direction and press events
Event handlingCommon event types:
Click (CLICKED), press / release (PRESSED / RELEASED), swipe, value change, etc. Event callback function design and context passing
Advanced applicationsAnimation effectsWidget animation: position / scale / opacity changes
Fade animation and timeline control
Animation optimization strategies under Pico performance limits
Multi-screen managementPage (Page / Screen)
Switching mechanism, window (Window) management model
Multi-screen state management and UI logic organization

2.8.5 uShell Command Line

DimensionSubcategoryDetails
Usage guideInstallation method1. Upload the upy-shell script to the MicroPython device with the mpremote tool;
2. Copy the script directly to the device file system (e.g., the external Flash of a Raspberry Pi Pico)
Startup methodIn the MicroPython REPL, run: import upy_shellupy_shell.shell() to start the interactive shell
Basic operation flowAfter startup, the command-line interface appears; you can type Unix-like commands (such as ls) directly to perform the corresponding operations
Basic principlesRuntime dependenciesBased on the MicroPython os module and the VFS virtual file system interface, reusing the native file system capabilities of the embedded device
Command parsing mechanism1. Receive the command string entered by the user;
2. Split it into "command + arguments";
3. Match a predefined command function (e.g., ls → list_dir);
4. Call the corresponding function and return the execution result
Resource adaptation designLightweight implementation:
1. Avoid redundant memory usage, suitable for RAM-limited devices such as Pico;
2. Reuse the native file system interface, with no extra resource overhead
Core methodsFile operation commands- ls (list_dir): list files / folders in the current directory;
- cd (change_dir): change the working directory;
- pwd (print_cwd): display the current working directory;
- mkdir (make_dir): create a new folder;
- rm (remove): delete a file / empty folder
System operation commands- version: show the upy-shell version;
- exit / quit: exit the shell interface
Extension capabilitiesCustom commandsVia the register_command method
Register a custom command: upy_shell.register_command('hello', lambda: print('Hello'))
After registration, you can run hello directly in the shell
NotesUsage restrictions1. Only supports the MicroPython runtime environment;
2. Some commands (such as permission management) are simplified to suit embedded file system characteristics

2.8.6 uMial Email Sending SMTP

SectionSub-item
I. Background and Core Positioning1.1 Development Background
1.2 Core Function of uMail
II. Core Implementation Principles2.1 Underlying Dependencies
2.2 Core SMTP Protocol Interaction Flow and Core Methods
III. Usage3.1 Environment Preparation
3.2 Configuration Using QQ Mail as an Example
3.3 Related Examples:
3.3.1 WiFi Connection (Required Prerequisite Step)
3.3.2 Basic Usage: WiFi + Sending Email
3.3.3 Advanced Usage: Sending Long Emails in Chunks
3.3.4 Advanced Usage: Custom MAIL FROM Address
IV. API Reference4.1 Core Class: umail.SMTP
4.2 Core Methods
V. Usage Notes-

III. What teaching materials are available?

Here is a one-stop embedded teaching resource library that covers everything from beginner to advanced levels and from theory to practical implementation, providing you with a clear learning path, practical tools, and solid support:

3.1 MicroPython Teaching Knowledge Base

Related Links: Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

11 12
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
1.1 1.2

3.2 Quick Start Guide for Scalable Electronic Modules and Hardware Principles

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

Related Links: GraftSense Sensor Module Documentation (Open Version)

BH1750
BH1750 4 5 I2C PC4060 PC4065
BH1750

Some modules are summarized as follows, and the list is being updated continuously:

Module NameFunction CategoryApplication Areas
Piranha LED ModuleDisplay / Indicator ModuleMaker project indicators, lighting decoration, device status indication, primary and secondary school maker competitions
High-Power Single-LED Module Based on OC7140Display / Indicator ModuleHigh-brightness lighting, outdoor device indicators, emergency light projects
WS2812 Matrix ModuleDisplay / Indicator ModuleDot-matrix display, light animations, creative visual projects, maker competition effects
0.96-inch SSD1306 OLED ModuleDisplay / Indicator ModuleDevice parameter display, small instrument interfaces, maker project data display
PCF8574-Based Eight-Segment Light Bar Digital Display ModuleDisplay / Indicator ModuleNumeric counting display, temperature and humidity value display, simple instruments
TM1637-Based 4-Digit Digital Display Driver ModuleDisplay / Indicator ModuleCountdown timers, counters, small device parameter display
MG811 Carbon Dioxide Sensor ModuleGas Sensor ModuleIndoor air quality monitoring, agricultural greenhouse CO₂ concentration detection, maker environmental monitoring
MQ-Series Electrochemical Gas Sensor ModuleGas Sensor ModuleCombustible gas leak detection, smoke monitoring, hazardous gas alarm devices
UV Ultraviolet Sensor Module Based on GUVA-S12SDEnvironmental Sensor ModuleUV intensity monitoring, sunscreen reminder devices, outdoor environmental monitoring
DHT11-Based Temperature and Humidity Sensor ModuleEnvironmental Sensor ModuleIndoor temperature and humidity monitoring, simple weather stations, maker beginner projects
DHT22-Based Temperature and Humidity Sensor ModuleEnvironmental Sensor ModuleHigh-precision temperature and humidity monitoring, agricultural greenhouses, smart home environment control
MLX90614-Based Non-Contact Infrared Temperature ModuleTemperature Sensor ModuleNon-contact temperature measurement, human body temperature detection, equipment surface temperature monitoring
DS18B20-Based Temperature Sensor ModuleTemperature Sensor ModuleMulti-point temperature acquisition, cold chain monitoring, industrial temperature detection
BMP280-Based Barometric Pressure and Temperature Sensor ModuleEnvironmental Sensor ModuleWeather stations, altitude measurement, drone barometric altitude hold
MLX90640-Based Non-Contact Infrared Image Sensor ModuleImage Sensor ModuleThermal imagers, human body thermal temperature images, equipment fault thermal detection
PT334-Based Flame Sensor ModuleEnvironmental Sensor ModuleFire alarms, flame detection robots, security projects
BH1750-Based Light Intensity Sensor ModuleEnvironmental Sensor ModuleIlluminance monitoring, automatic dimming systems, agricultural lighting control
GL5516-Based Light Intensity Sensor ModuleEnvironmental Sensor ModuleSimple light monitoring, automatic streetlight control, maker beginner projects
L916-Based Infrared Pyroelectric Human Proximity Sensor ModuleHuman Sensing ModuleMotion-sensing lights, security alarms, automatic door control
OH34N-Based Hall Sensor ModuleMotion Sensing ModuleMotor speed measurement, position detection, magnetic switches
PS2 Joystick ModuleHuman-Machine Interaction ModuleRemote-controlled robots, game controllers, gimbal control
Slide Potentiometer ModuleHuman-Machine Interaction ModuleDimming and speed control, parameter adjustment, maker beginner circuit experiments
EC11-Based Rotary Encoder ModuleHuman-Machine Interaction ModuleVolume adjustment, menu selection, parameter knobs
RK09L-Based Rotary Potentiometer ModuleHuman-Machine Interaction ModuleAnalog adjustment, brightness/speed control, experiment debugging
TTP223-Based Touch Key ModuleHuman-Machine Interaction ModuleTouch switches, touch panels, maker interactive control
Mechanical Key ModuleHuman-Machine Interaction ModuleDevice switches, function selection, maker beginner input
PCF8574-Based Five-Way Key ModuleHuman-Machine Interaction ModuleMenu navigation, direction control, small control panels
Limit Switch Sensor ModuleHuman-Machine Interaction / Limit ModuleRobot travel limits, mechanical positioning, equipment protection
ASRPRO-CORE-Based Offline Voice ModuleVoice ModuleOffline voice control, smart home voice interaction, maker voice projects
DY-SV19T-Based Voice Playback ModuleVoice ModuleVoice announcements, device prompts, storyteller projects
MAX9814-Based Electret Condenser Microphone ModuleVoice ModuleSound acquisition, recording, voice-controlled projects
SNR9816-Based Human Voice Speech Synthesis ModuleVoice ModuleText-to-speech, smart prompts, accessibility devices
MOS Transistor Level Shifter ModuleSignal Conversion ModuleHigh/low level matching, level compatibility between microcontrollers and peripherals
Isolated TTL-to-RS485 ModuleCommunication ModuleIndustrial networking, long-distance data transmission, PLC communication
CH340K-Based USB-to-TTL ModuleCommunication ModuleMicrocontroller programming, serial debugging, USB-to-serial
MAX3232-Based TTL-to-RS232 ModuleCommunication ModuleTraditional serial communication, industrial control connections, long-distance transmission
PN532-Based NFC Communication ModuleCommunication ModuleNear-field communication, access control reading/writing, maker NFC projects
HC-08-Based Master/Slave Integrated BLE Bluetooth ModuleCommunication ModuleBluetooth wireless control, mobile phone device communication, smart home
HC-14-Based LoRa Communication ModuleCommunication ModuleLong-distance wireless communication, IoT transmission, outdoor networking
CC2530-Based Zigbee Communication ModuleCommunication ModuleIoT networking, smart home, industrial wireless networks
Air530Z-Based BeiDou Navigation ModulePositioning ModuleOutdoor positioning, drone navigation, vehicle positioning
TAS-755C-Based Serial-to-Ethernet ModuleCommunication ModuleDevice networking, Ethernet data transmission, remote monitoring
AT24C256C-Based EEPROM ModuleStorage ModuleParameter storage, power-off retention, configuration record
Watchdog module based on the DS1232 chipSystem protection moduleMCU crash prevention, stable devices, industrial control
RTC real-time clock module based on the DS1307 chipTiming moduleClock display, scheduled tasks, timestamps
Clock signal generator module based on the SI5351 chipSignal generator moduleRF signal source, clock synchronization, circuit testing
Lithium battery charge/discharge module based on the IP5407Power management moduleLithium battery charging, portable device power supply
Lithium battery charge/discharge module based on the SY7656 chipPower management moduleHigh-precision charging, portable power supply, charging case design
Adjustable power supply module based on the LM2596SPower management moduleRegulated power supply, adjustable output, lab power supply
Low-power solar power management module based on the SPV1050Power management moduleSolar charging, outdoor portable use, photovoltaic maker projects
Serial servo driver moduleDrive control moduleRobot joints, gimbal steering, robotic arm drive
I2C bus 16-channel PWM servo driver moduleDrive control moduleMulti-servo robots, biomimetic robots
Optocoupler-isolated MOSFET single-motor driver moduleMotor driver moduleDC motor forward/reverse, speed control, power drive
I2C bus DC motor driver moduleMotor driver moduleSmart car, motor speed control, DC drive
I2C bus unipolar stepper motor driver moduleMotor driver moduleStepper motor control, 3D printing, precision positioning
Latching relay module based on the G6KUSwitch control moduleHigh-power device control, energy-saving switch
Standard relay module based on the HF46FSwitch control moduleHome appliance control, power switch, security systems
MOSFET switch relay module based on the JMSL0406Switch control moduleMedium-power switching, DC loads, fast on/off
Cooling fan module based on a MOSFETDevice control moduleDevice cooling, temperature-linked fan, industrial temperature control
Vibration motor module based on a MOSFETDevice control moduleVibration feedback, alarm, haptic feedback for portable devices
UV ultraviolet lamp matrix module based on a MOSFETDevice control moduleUV disinfection lamp, UV curing, maker UV applications
Ultrasonic atomization module based on the FM8118 chipDevice control moduleHumidifier, atomizer, maker atomization projects
6-channel direct-connect I2C expansion moduleInterface expansion moduleI2C device expansion, multi-sensor networking
8-bit IO port expansion module based on the PCF8574Interface expansion moduleIO port expansion, multi-device control, key expansion
4-channel I2C multiplexer expansion module based on the PCA9546ADRInterface expansion moduleI2C multiplexing, avoiding address conflicts
GraftPort-OpenMV expansion boardInterface expansion moduleOpenMV vision development
Analog-to-digital conversion module based on the ADS1115 chipSignal Conversion ModuleHigh-precision analog acquisition, sensor data acquisition
Digital-to-analog conversion module based on the MCP4725 chipSignal Conversion ModuleAnalog output, waveform generator, analog control
Serial gyroscope module based on the JY60Motion Sensing ModuleAttitude detection, self-balancing car, drone attitude control
Six-axis gyroscope module based on the MPU6050Motion Sensing ModuleRobot attitude control, motion-sensing devices
Heart rate and blood oxygen sensor module based on the MAX30102 chipBiosensing moduleHeart rate monitoring, blood oxygen detection, wearable devices
Transceiver-integrated ultrasonic module based on the RCWL-9623Distance measurement moduleCar obstacle avoidance, range finder, liquid level detection
Laser distance measurement module based on the VL53L0X chipDistance measurement moduleHigh-precision distance measurement, obstacle avoidance, displacement measurement
Single-channel line-tracking module based on the TCR5000LRobot moduleLine-tracking car, maker competitions, path recognition
Color recognition module based on the TCS34725Vision sensing moduleColor recognition, color detection
Passive buzzer moduleSound and light alarm modulePrompt tone, alarm sound, maker sound effects
Power amplifier speaker module based on the LM386 chipAudio moduleAudio amplification, sound playback, maker audio
Breathing and sleep monitoring millimeter-wave radar module based on the R60ABD1Radar sensing moduleSleep monitoring, breathing detection, smart home
Fall alarm millimeter-wave radar module based on the R60AFD1Radar sensing moduleElderly fall alarm, posture detection, security
Multi-person trajectory millimeter-wave radar module based on the R60AMP1Radar sensing modulePerson trajectory tracking, security monitoring, smart spaces
Gas concentration measurement module based on the JED-MEMSGas sensing moduleGas monitoring, air quality analysis
Surface EMG signal amplification and acquisition moduleBiosensing moduleEMG detection, motion-sensing control, bioelectric maker projects
Digital potentiometer module based on the DS3502Analog adjustment moduleDigital dimming and speed control, programmable parameters, industrial control

3.3 Rapid Prototype Expansion Board and Teaching Case Library

After you have completed the systematic learning of core knowledge points, we have seamlessly connected you with the GraftPort, a dedicated expansion board suitable for rapid prototyping, and the supporting teaching case library, helping you directly leap from "mastering knowledge points" to "prototype implementation of hands-on mini projects". It truly translates learning outcomes into tangible practical works, forming a complete capability closed loop of "learning → practice → prototype → iteration".

Related Links: Teaching Case Based on GraftPort Expansion Board (Open Version)

Some teaching cases are summarized as follows, and the list is being updated continuously:

Case Name

Core knowledge points to be learned

Contactless Respiration and Heart Rate Measurement Device

1. Hardware connection: Learn to connect radar and OLED display via UART and I2C interfaces, and connect the pushbutton to the GPIO port (pull-down mode to prevent false triggering);

2. Data processing: Read radar data and extract respiration and heartbeat values (entry-level data parsing);

3. Interactive operation: The OLED screen displays data in two lines, implementing the logic that a short key press triggers measurement and a long key press stops it;

4. Practical Tips: Be aware that low battery level of lithium batteries may affect data, and learn to avoid common malfunctions.

Heart Rate and Blood Oxygen Health Monitor

1. Sensor Usage: Connect the MAX30102 module and learn to collect basic data of heart rate and blood oxygen;

2. Display control: Use the 4-digit nixie tube to switch and display heart rate and blood oxygen, and long press to lock the values;

3. Abnormality judgment: Set the normal range (heart rate: 40-180, blood oxygen: ≥90%), and the LED will flash for alarm when the value exceeds the range;

4. Key Practical Points: Ensure the sensor is firmly attached to the fingertip to avoid light leakage that may interfere with data accuracy.

Water Quality TDS Detection Device

1. Analog signal acquisition: Read the data of the TDS sensor via the ADC interface and convert it into the ppm value;

2. Display and Alarm: The OLED displays the TDS value and water quality level; when the standard is exceeded, the buzzer alarms and the LED flashes; 3

. Calibration Tip: Learn to calibrate the sensor with distilled water to obtain more accurate data;

4. Precautions: Be aware of the influence of water temperature on the measurement, and understand the cleaning and maintenance methods for the probe.

Infrared Temperature Measurement Human Body Induction Alarm Device

1. Multi-sensor collaboration: Connect the infrared temperature measurement (MLX90614) and human body induction (L916) modules to realize the function of "temperature measurement only when a person is present";

2. Temperature alarm: Set a threshold of 36.5°C; when the temperature exceeds the threshold, the buzzer will give an intermittent alarm, and the OLED will display the temperature.

3. Power consumption optimization: It detects the human body at a low frequency in standby mode to avoid power waste;

4. Installation Tips: Know the temperature measurement distance and the methods to prevent false triggering of the sensor (avoid direct sunlight, add a lens).

Integrated Monitoring Station for Soil Temperature, Moisture and Illumination

1. Multi-bus usage: Master the basic connections of the single bus (for temperature measurement with DS18B20) and dual I2C buses (for light sensing and OLED display);

2. Data conversion: Convert the ADC value of soil moisture into percentage, and convert the illumination value into lux (lx);

3. Display Design: The OLED cyclically displays 3 parameters, with fixed titles to make the interface clearer;

4. Key points to avoid pitfalls: Prevent address conflicts between two I2C devices, and install the sensors separately to avoid interference.

Touch Key Controlled Fan Speed Regulation Device

1. PWM Speed Regulation: The fan speed is controlled via PWM signals, with 3 speed settings available (Low/Medium/High/Off);

2. Touch interaction: Use the touch button to switch gears, and the digital tube displays the current gear (0-3);

3. Hardware adaptation: Note that the minimum fan speed shall not be too low (≥20%), otherwise the fan will fail to start;

4. Sensitivity Adjustment: Learn to adjust the sensitivity of the touch buttons to prevent false triggering.

BeiDou Navigation and Positioning Data Acquisition Device

1. Serial communication: Connect to the BeiDou module and read positioning data (latitude and longitude, altitude);

2. Data conversion: Convert latitude and longitude to the "degrees-minutes-seconds" format for easier reading;

3. Status feedback: Use an LED to indicate whether positioning succeeds or fails, and prompt the user to move to an open area when positioning fails;

4. Basic Check: Note that the baud rate should be set to 9600 to avoid program freezes caused by data errors.

Anti-theft Alarm Device with Vibration and Infrared Sensing

1. Trigger Detection: Detect anomalies via vibration and human body sensors, and trigger an alarm once the system is armed.

2. Status switching: Arm/disarm via key press, with the OLED displaying the current status;

3. Alarm control: When an alarm is triggered, the buzzer sounds and the LED flashes; press and hold the button to reset.

4. Anti-misoperation: Fix the vibration sensor, and add a lens to the human body induction module to narrow the detection range.

Surface Electromyography Signal Intensity Monitoring Device

1. Biological signal acquisition: Read the myoelectric signal through the ADC interface, and remove interference via basic filtering;

2. Intensity Display: Convert the signal into percentage and display the OLED status (normal/abnormal);

3. Peak Value and Alarm: Press the key to lock the peak value, and an alarm will be triggered when the signal is out of range (<10% or >80%);

4. Anti-interference: It is required to use shielded wires for connection, and the electrode patches shall be firmly attached to the skin with conductive paste applied.

Portable ECG Signal Acquisition Device

1. ECG acquisition: Connect the ECG module, read the ECG signal and filter out interference;

2. Bluetooth transmission: Data is sent to the mobile APP via BLE Bluetooth to enable real-time viewing;

3. Power consumption control: Reduce the sampling rate when no mobile phone is connected to save power;

Real-time Monitoring and Alarm Device for Smoke Concentration

1. Gas detection: Connect the smoke module, read the concentration data, and wait for 30 seconds for preheating (until the data stabilizes);

2. Alarm logic: When the concentration is ≥500ppm, the buzzer will alarm intermittently, and the OLED will display the status;

3. Installation Specification: The module shall be installed in a well-ventilated area to avoid gas accumulation that may cause inaccurate data; 4. Data Filtering: Simply process the data to eliminate abnormal fluctuations for more stable display.

Smart Eye-Caring Desk Lamp

1. Automatic dimming: The brightness is collected by a light sensor to automatically adjust the brightness of the desk lamp (target: 300 lx);

2. Manual Control: Tap the button to switch the table lamp on/off; long press for stepless dimming (10% - 100%);

3. Eye Care Tips: Set the PWM frequency to 1kHz or higher to avoid eye damage caused by stroboscopic light;

4. Anti-misoperation: Keep the touch keys away from metal surfaces and ensure proper insulation for wiring.

Succulent UV Supplemental Lighting Controller

1. Dimming Control: The UV lamp is controlled by a MOS tube, with stepless brightness adjustment via PWM (0-100%);

2. Timer protection: The UV lamp can be turned on for a maximum of 8 hours, and will automatically shut down when the time limit is exceeded to prevent burning the plants;

3. Manual operation: Rotate the potentiometer to adjust the brightness, and press the button to switch the light (with 10ms debounce to prevent accidental touch);

4. Safety Notes: Keep the UV lamp away from the human body, place the equipment in a dry place, and avoid watering to prevent short circuits.

Noise Detector

1. Audio acquisition: Read the sound intensity via a microphone module and convert it into a dB value (relative value);

2. Exceedance Reminder: When the noise level exceeds 85dB, the LED will flash and the OLED will display the prompt "Noise Exceedance";

3. Data Export: Export the day's noise data via Bluetooth for easy viewing;

4. Calibration Instructions: Note that the dB value is a reference value, and it can only be accurate after being calibrated with professional equipment.

10 RP2040
GraftPort-RP2040
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
flake8 5
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

3.4 Advanced Python Programming Tutorial

We have two featured tutorials supporting this course: *The Most Beginner-Friendly Object Oriented Programming Tutorial Across the Internet* and *A Quick Guide to Mastering Python Parallel Computing*. Different from those scattered online tutorials that either focus too much on theory or only cover a single scenario, these two tutorials form a complete closed loop following the flow of "principle breakdown → code practice → project implementation":

Module NameIncluded chapters
Getting started- Introduction to object-oriented design methods
- Basic concepts of object-oriented programming
Core implementation of classes and objects- Creating classes with Python- Adding attributes to custom classes- Adding methods to custom classes-
PyCharm code tag tips- Data encapsulation in custom classes- Improving readability with type annotations
- @property decorator: wrapping methods as attributes- Relationships between classes- Inheritance and the Liskov substitution principle
- Calling parent class methods from a subclass
- Outputting logs with the logging module
- Installing and using SourceTrail
- Static methods and class methods- __slots__ magic method
- Polymorphism, method overriding, and the open-closed principle
- Duck typing and "file-like object"
- Multiple inheritance and plotting with PyQtGraph
- PyCharm auto-generated comments
- Implementing composition and saving to CSV
- Multi-file organization: module and package
Exceptions and debugging- Exceptions and syntax errors
- Raising exceptions
- Exception handling: try/except statements
- Checking the input data type
- Context managers and the with statement
- Exception hierarchy and custom exceptions
- Python programming principles and conventions
- Assertions and defensive programming
Data Types and Structures- Python built-in data types: the object root class
- Object and Type - Class and Instance - The relationship between Object, Type and Class
- Common compound types: tuples and named tuples
- Strings and the __doc__ attribute
- Dictionaries
- Lists and list comprehensions
- Implementing stacks, queues and deques with lists
- Sets - Enumerations and the enum module
- Queues (FIFO, LIFO, priority queues)
- collections container data types
- Extending built-in data types
- Overriding the magic methods of built-in types
- Common data structures: linked lists, trees, hash tables
Functions and Interfaces- Functions and event-driven frameworks
- Callback functions
- Positional, default, variable-length and keyword arguments
- Differences between functions and methods, and lambda anonymous functions
- Interfaces and abstract base classes
- Implementing interfaces with Zope
- Protocols and interfaces
Strings and Serialization- Strings and character encoding
- String formatting and the format method
- Byte sequence types and mutable byte strings
- Regular expressions and the re module
- Serialization and deserialization
- Definition and implementation of serializing Web objects
Advanced Practice- Parallelism and concurrency: threads and processes
- Comprehensive object-oriented example: real-time sensor data plotter
Module NameIncluded chapters
Parallel Computing Basics- Basic concepts of parallel computing
Python Multithreading- Python Multithreading - Basic concepts, switching process, GIL mechanism and the producer-consumer model
- Python Multithreading - The threading module, creating and querying threads, and daemon threads - Python Multithreading
- Thread synchronization (Part 1) - Based on mutex locks, recursive locks and semaphores - Python Multithreading
- Thread synchronization (Part 2) - Based on condition variables, events and barriers - Python Multithreading - Running threads on a timer - Python Multithreading
- Communication based on queues - Python Multithreading
- Using thread pools and evaluating multithreading performance
Python Multiprocessing- Python Multiprocessing - The multiprocessing module, creating and naming processes, getting process IDs, creating daemon processes
- Python Multiprocessing - Data synchronization between processes - Based on mutex locks, recursive locks, semaphores, condition variables and events
- Python Multiprocessing - Data sharing between processes
- Based on shared memory and data managers
- Python Multiprocessing - Secure data transfer between processes
- Based on queues and pipes
- Python Multiprocessing - Process pool Pool
Python Asynchronous Programming- Python Asynchronous Programming - Basic concepts, event loop and callback mechanism
- Python Asynchronous Programming - Managing and scheduling coroutines
Tutorial Summary- Tutorial Summary

It not only helps you build a reusable knowledge system, but also directly supports the secondary development requirements of hardware projects.

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

3.5 Full Open Source for Cases and Hardware

3.5.1 Fully Open-Source Code

Repository Address: https://github.com/leezisheng/elegance-devkit-v1_DemoCode

I2C
3.5.1 S2_UART_RS232
pc9837s.py PC9837S

3.5.2 Fully open source hardware of the development board

100

The full series hardware design of Fengya No. 1 board is 100% open source and has been fully launched LCKFB Open Source Plaza, where you can directly obtain the full set of editable hardware design files (schematic diagram, PCB layout, BOM Bill of Material, soldering guide):

3.6 Dedicated uPyPI Platform

Similar to PyPI's package management, it enables one-click installation of driver libraries and supports third-party library publishing:

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
ben00s 0
0

3.x Bipes-based MicroPython Graphical Tutorial - DIY for Primary and Secondary School Students / Zero Beginners

As a dedicated expansion board tailored for rapid prototyping, GraftPort's exclusive supporting component (this module is not included in the core course of the Fengya No. 1 Board), we have specially launched this lightweight graphical programming tutorial. Bipes replaces traditional code writing with drag-and-drop blocks, allowing users to implement core functions such as hardware control, Data Acquisition, and logical judgment without memorizing MicroPython syntax:

This tutorial covers the entire process from basic graphical instructions to complex prototype projects, including cases such as sensor data visualization, interactive device construction, and IoT node development. It not only helps you quickly verify hardware solutions, but also enables a natural transition to pure code development through the corresponding display of graphics and code, laying a solid foundation for your subsequent in-depth learning of MicroPython.

Some tutorials are summarized as follows, and the list is being updated continuously: Graft Dev Kit - Bipes-Based Graphical Programming Teaching Documentation

1.2
2.1
3.4
7 7.1 7.1.1 7.1.2 7.1.3

IV. What after-sales services are available?

5. Relevant web addresses and open-source code repositories

Elegance V1 Board Address: https://github.com/FreakStudioCN/elegance-devkit-v1

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

Warehouse Address: https://github.com/orgs/FreakStudioCN/repositories

7
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)

Wiki URL: https://freakstudio.cn/

Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
Getting Started with MicroPython: Product Introduction to Raspberry Pi Pico Microcontroller / Fengya No. 1 Board (MicroPython Teaching Development Board)
M6408

uPyPi Address: https://upypi.net/

91 v5310x_driver tcs34725_color_driver mpu6050_driver mlx90614_driver mlx90640_driver

Graphical programming software address: https://freakstudiocn.github.io/pages/ui/

STM32 ESP32 ESP8266

References

None.

Knowledge Base Version Record

Version Number

Modifier

Time

Content

v1.0

Li Zisheng

2025/12/27

Initialize the Knowledge Base

v1.1

Li Zisheng

2025/01/23

Section 4: Summary of Key Points has been added.

v1.2

Li Zisheng

2025/01/24

Added support for uMial.

v1.2.1

Li Zisheng

2025/01/25

A delivery list table has been added, so a stepper motor driver board needs to be added accordingly.

v1.3.0

Li Zisheng

2026/02/15

Changed the relevant web pages.

v1.4

Li Zisheng

2026/02/15

Added the address of Fengya No. 1 Board.

v1.5

Li Zisheng

2026/03/22

Added the images of Lichuang · ColorEasyPico2 development board.