Skip to content

cshieldsce/memstream

Repository files navigation

MemStream

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.

Architecture

Architecture Diagram

The pipeline is entirely zero-copy, eliminating expensive memory-to-memory transfers between acquisition and transmission:

  1. 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.
  2. 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.

Build & Flash

Dependencies: CMake, Arm-GCC Toolchain, Pico-SDK

mkdir build && cd build
cmake ..
make
# Drop the compiled .uf2 onto your Raspberry Pi Pico 2 W.

Demo

Video demo of the oscilloscope successfully streaming a square wave signal over WiFi via the Pico 2 W.

References

Some references I used for this project:

About

A zero-copy, hardware-to-network WiFi oscilloscope for the RP2350.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors