arduino: WT61 init logics & matched mounting

This commit is contained in:
Mikkeli Matlock
2026-02-02 19:30:15 +09:00
parent f7f0af92dd
commit 83cc6bed19
5 changed files with 86 additions and 21 deletions

View File

@@ -6,10 +6,17 @@
// Initialize voltage monitoring (call in setup)
void voltage_init();
// Read battery voltage, returns volts (e.g., 12.5)
// Set smoothing window size (1-32 samples, default 20)
// Resets the buffer with current reading
void voltage_set_smoothing(int windowSize);
// Read battery voltage (smoothed), returns volts (e.g., 12.5)
float voltage_read();
// Read raw ADC value (0-1023)
// Read smoothed ADC value (averaged over window)
int voltage_read_smoothed();
// Read raw ADC value (0-1023), no smoothing
int voltage_read_raw();
#endif