A zero-copy, hardware-to-network streaming engine for the Raspberry Pi Pico 2 W (RP2350).
MemStream acts as a wireless oscilloscope. It captures analog signals via hardware DMA (zero CPU overhead) and blasts them over WiFi via WebSockets using a FreeRTOS-managed TCP/IP stack.
The pipeline is entirely zero-copy, eliminating expensive memory-to-memory transfers between acquisition and transmission:
- The Producer (Hardware): The ADC is tied directly to the DMA engine, streaming into memory buffers at up to 500 kS/s. This guarantees hard real-time, deterministic sampling regardless of network load.
- The Consumer (Network): A dual-core FreeRTOS SMP setup manages task synchronization. Upon buffer completion, Task Notifications instantly wake the Mongoose web server, which publishes the raw memory buffers directly to connected WebSocket clients.
Dependencies: CMake, Arm-GCC Toolchain, Pico-SDK
mkdir build && cd build
cmake ..
make
# Drop the compiled .uf2 onto your Raspberry Pi Pico 2 W.Video demo of the oscilloscope successfully streaming a square wave signal over WiFi via the Pico 2 W.
Some references I used for this project:

