Arduino: modular structure
This commit is contained in:
15
arduino/main/voltage.h
Normal file
15
arduino/main/voltage.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef VOLTAGE_H
|
||||
#define VOLTAGE_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
// Initialize voltage monitoring (call in setup)
|
||||
void voltage_init();
|
||||
|
||||
// Read battery voltage, returns volts (e.g., 12.5)
|
||||
float voltage_read();
|
||||
|
||||
// Read raw ADC value (0-1023)
|
||||
int voltage_read_raw();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user