calibrated voltmeter
This commit is contained in:
parent
e4516bc804
commit
498287aedf
1 changed files with 2 additions and 1 deletions
|
@ -199,7 +199,8 @@ async fn bus_voltage_monitor(adc: ADC, bus: PIN_28) {
|
|||
|
||||
loop {
|
||||
let level = adc.read(&mut bus_voltage).await.unwrap();
|
||||
SENSOR_DATA.send(SensorData::BusVoltage(level as f32)).await;
|
||||
// empirically calculated against $20 microcenter voltmeter (10k & 33k divider circuit)
|
||||
SENSOR_DATA.send(SensorData::BusVoltage(level as f32 / 251.6763848397)).await;
|
||||
Timer::after_millis(3).await;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue