← スキル一覧に戻る

pico-logger
by njfdev
The code for the entire payload system onboard the 2025 NCSSM HPR rocket named C.A.V.E.R.N.
⭐ 1🍴 0📅 2026年1月18日
SKILL.md
name: pico-logger description: Pico Logger subproject context. Use when working in the pico_logger package, RP2040 firmware, sensor data collection, SD card logging, or embedded telemetry. keywords: [pico logger, pico_logger, data logger, sensor, adalogger, feather, rp2040, firmware, telemetry, sd card, csv, usb cdc, serial]
Pico Logger Subproject
Hardware
Board: Adafruit Feather RP2040
Chip: RP2040 (Cortex-M0+, ARMv6-M)
Target: thumbv6m-none-eabi
CRITICAL: This is an RP2040, NOT RP2350. Use
rp2040feature in embassy-rp.
Role in System
The Pico Logger is the low-level data acquisition unit of the payload system, running bare-metal on an Adafruit Feather RP2040.
Responsibilities
- Collect data from multiple sensors at high rates
- Log all sensor data to SD card
- Send telemetry to flight computer via USB serial
- Operate reliably during high-G flight conditions
Sensors
| Sensor | Type | Interface |
|---|---|---|
| BMP390 | Barometer/Altitude | I2C |
| ENS160 | Air Quality/Gas | I2C |
| LSM6DSOX | 6-axis IMU | I2C |
| LIS3MDL | Magnetometer | I2C |
| HGLRC Mini M100 | GPS | UART |
Storage
- SPI SD card for flight data logging
Build & Flash
cd pico_logger
# Build
cargo build --release
# Flash (device must be in BOOTSEL mode)
cargo run --release
# Or use the helper script
.claude/skills/pico-tooling/scripts/wait_bootsel.sh && cargo run --release
Entering BOOTSEL Mode
- Hold BOOTSEL button on the Feather
- Press reset button (or replug USB while holding BOOTSEL)
- Release BOOTSEL
- Device appears as USB mass storage "RPI-RP2"
Memory Layout (RP2040)
BOOT2: 256B @ 0x10000000 (second-stage bootloader)
FLASH: 2048K @ 0x10000100
RAM: 256K @ 0x20000000
The RP2040 has 264KB SRAM total (6 banks), but 256K is the usable contiguous region.
Configuration Files
.cargo/config.toml
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "picotool load -u -v -x -t elf"
[build]
target = "thumbv6m-none-eabi"
Cargo.toml Dependencies
embassy-rp = { version = "0.9.0", features = ["rp2040", "binary-info", "critical-section-impl", "time-driver", "unstable-pac"] }
portable-atomic = { version = "1", features = ["critical-section"] } # Required for RP2040 atomics
memory.x (RP2040)
MEMORY {
BOOT2 : ORIGIN = 0x10000000, LENGTH = 0x100
FLASH : ORIGIN = 0x10000100, LENGTH = 2048K - 0x100
RAM : ORIGIN = 0x20000000, LENGTH = 256K
}
EXTERN(BOOT2_FIRMWARE)
SECTIONS {
.boot2 ORIGIN(BOOT2) :
{
KEEP(*(.boot2));
} > BOOT2
} INSERT BEFORE .text;
SECTIONS {
.bi_entries : ALIGN(4)
{
__bi_entries_start = .;
KEEP(*(.bi_entries));
. = ALIGN(4);
__bi_entries_end = .;
} > FLASH
} INSERT AFTER .text;
USB Serial Communication
The firmware uses USB CDC ACM for serial communication:
- Device appears as
/dev/cu.usbmodem*on macOS - Baud rate doesn't matter (USB CDC)
- Use
serial_monitor.pyfrom pico-tooling scripts
Key Dependencies
| Crate | Version | Purpose |
|---|---|---|
| embassy-executor | 0.9.1 | Async task runtime |
| embassy-rp | 0.9.0 | RP2040 HAL (use rp2040 feature) |
| embassy-usb | 0.5 | USB device stack |
| embassy-sync | 0.7.2 | Channels, mutexes |
| embassy-time | 0.4 | Async timers |
| static_cell | 2.1 | Static buffer allocation |
| portable-atomic | 1 | Atomics for Cortex-M0+ |
| heapless | 0.8 | Stack-allocated collections |
TODO / Planned Features
- Log data to SPI SD card
- Log data from BMP390 (Barometer)
- Log data from ENS160 (Gas)
- Log data from LSM6DSOX + LIS3MDL (IMU)
- Log data from HGLRC Mini M100 (GPS)
- Send sensor data to flight_computer board
- Add reset-to-bootsel command over USB
Related Skills
embassy-rp: HAL and peripheral usageembassy: Async framework patternssensor-drivers: Individual sensor detailssd-card-logging: Data storage patternspico-tooling: Flashing, serial, and debug toolsflight-computer: Telemetry destination
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です