Skip to content

v2.2.3 - LED Initialization Fix (2026-01-01)

What Changed?

This release fixes a critical initialization issue where LED pins were not being properly set up during device startup. This was causing undefined behavior in GPIO pin states and LED feedback during detection events. The fix ensures all peripheral initialization happens in the correct order.


What's New

Main Fix: LED Pin Initialization

What it does: Added led_init() call in the setup sequence to properly initialize LED pins (GPIO14, GPIO26, GPIO33) as outputs with LOW state. This ensures LED feedback works correctly during cosmic ray detection events.

How to use it: No user action required. LED feedback now works automatically when cosmic rays are detected.

Code change:

void setup(void) {
  // ... other initialization ...
  dac_init();
  led_init();  // Initialize LED pins as outputs
  CosmicDetector::init();
  // ... rest of initialization ...
}

Installation

Quick Start

# Get the release
git checkout v2.2.3

# Build
task v2:build

# Upload
task v2:upload

# Check it works
task monitor

What's Different from the Last Version?

✅ Added

  • LED pin initialization in setup() sequence

🔧 Changed

  • Debug logging removed from detector, DAC, and command modules for cleaner output

🐛 Fixed

  • LED feedback not working due to uninitialized GPIO pins
  • GPIO detection pins (GPIO12, GPIO19, GPIO27) returning undefined values at startup

Is It Safe to Upgrade?

Backward Compatible: Yes

  • No breaking changes to API or command interface
  • LED feedback behavior improves without affecting other functionality
  • All existing commands work identically

Tests Passed

  • ✅ Builds without errors
  • ✅ LED pins initialize correctly on startup
  • ✅ SET_THRESHOLD command properly controls DAC
  • ✅ GPIO detection pins read correct values
  • ✅ LED feedback triggers on detection events

Release Details

  • Date: 2026-01-01
  • Version: v2.2.3
  • Files Changed: 5
  • src/v2_main.cpp (added led_init)
  • src/dac_manager.cpp (removed debug logs)
  • src/v2_command.cpp (removed debug logs)
  • src/v2_detector.cpp (removed debug logs)
  • src/command/threshold.cpp (removed debug logs)

Next Steps

  • Continued v2 feature development
  • Hardware integration verification for all modules
  • Performance optimization of detection pipeline