The Rust port lived two directories deep (rust-port/wifi-densepose-rs/) without any sibling under rust-port/ that warranted the extra level. Move the whole workspace up to v2/ to match v1/ (Python) at the same depth and shorten every cd / build command across the repo. git mv preserves history for all tracked files. 60 files updated for path references (CI workflows, ADRs, docs, scripts, READMEs, internal .claude-flow state). Two manual fixes for relative-cd paths in CLAUDE.md and ADR-043 that became wrong after the depth change (cd ../.. → cd ..). Validated: - cargo check --workspace --no-default-features → clean (after target/ nuke; the gitignored target/ was carried by the OS rename and had hard-coded old paths in build scripts) - cargo test --workspace --no-default-features → 1,539 passed, 0 failed, 8 ignored (same totals as pre-rename) - ESP32-S3 on COM7 → still streaming live CSI (cb #40300, RSSI -64 dBm) After-merge follow-up: contributors should `rm -rf v2/target` once and let cargo regenerate from the new path. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
ruv-neural-esp32
ESP32 edge integration for neural sensor data acquisition and preprocessing.
Overview
ruv-neural-esp32 provides lightweight processing modules designed to run on
ESP32 microcontrollers for real-time neural sensor data acquisition and
preprocessing at the edge. It handles ADC sampling, time-division multiplexing
for multi-sensor coordination, IIR filtering and downsampling on-device, power
management for battery operation, a binary communication protocol for streaming
data to the rUv Neural backend, and multi-node data aggregation.
Features
- ADC interface (
adc):AdcReaderwith configurableAdcConfigincluding sample rate, resolution, attenuation levels, and multi-channel support viaAdcChannel - TDM scheduling (
tdm):TdmSchedulerandTdmNodefor time-division multiplexed multi-sensor coordination with configurableSyncMethod(GPIO trigger, I2S clock, software timer) - Edge preprocessing (
preprocessing):EdgePreprocessorwith fixed-point IIR filters (IirCoeffs), downsampling, and DC offset removal optimized for constrained embedded environments - Communication protocol (
protocol):NeuralDataPacketwithPacketHeaderandChannelDatafor efficient binary data streaming to the backend over UART, SPI, or WiFi - Power management (
power):PowerManagerwithPowerConfigandPowerMode(active, light sleep, deep sleep, hibernate) for battery-powered deployments - Multi-node aggregation (
aggregator):NodeAggregatorfor combining data from multiple ESP32 nodes into synchronized multi-channel streams
Usage
use ruv_neural_esp32::{
AdcReader, AdcConfig, Attenuation,
TdmScheduler, TdmNode, SyncMethod,
EdgePreprocessor, IirCoeffs,
NeuralDataPacket, PacketHeader, ChannelData,
PowerManager, PowerConfig, PowerMode,
NodeAggregator,
};
// Configure ADC for 4-channel acquisition
let config = AdcConfig {
sample_rate_hz: 1000,
resolution_bits: 12,
attenuation: Attenuation::Db11,
channels: vec![
AdcChannel { pin: 32, gain: 1.0 },
AdcChannel { pin: 33, gain: 1.0 },
AdcChannel { pin: 34, gain: 1.0 },
AdcChannel { pin: 35, gain: 1.0 },
],
};
let mut adc = AdcReader::new(config);
// Set up TDM scheduling for multi-sensor sync
let scheduler = TdmScheduler::new(SyncMethod::GpioTrigger);
let node = TdmNode::new(0, scheduler);
// Preprocess on-device with IIR filter
let mut preprocessor = EdgePreprocessor::new(1000.0);
let filtered = preprocessor.process(&raw_samples);
// Build a data packet for transmission
let packet = NeuralDataPacket {
header: PacketHeader::new(4, 250),
channels: vec![ChannelData { samples: filtered }],
};
// Power management
let mut power = PowerManager::new(PowerConfig::default());
power.set_mode(PowerMode::LightSleep);
API Reference
| Module | Key Types |
|---|---|
adc |
AdcReader, AdcConfig, AdcChannel, Attenuation |
tdm |
TdmScheduler, TdmNode, SyncMethod |
preprocessing |
EdgePreprocessor, IirCoeffs |
protocol |
NeuralDataPacket, PacketHeader, ChannelData |
power |
PowerManager, PowerConfig, PowerMode |
aggregator |
NodeAggregator |
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
Yes | Standard library (desktop simulation) |
no_std |
No | Bare-metal ESP32 target |
simulator |
No | Simulated ADC for testing (requires std) |
Integration
Depends on ruv-neural-core for shared types. Preprocessed data packets are
sent to the host system where ruv-neural-sensor or ruv-neural-signal can
consume them for further processing. Designed to run independently on ESP32
hardware or in simulation mode on desktop for testing.
License
MIT OR Apache-2.0