mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
Grove O2 Sensor: Correcting Sensor Voltage Calculation
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
parent
fa1c1f3aa4
commit
422592f993
@ -50,6 +50,6 @@ float GroveO2::voltageValue()
|
|||||||
{
|
{
|
||||||
int val = mraa_aio_read(m_aio);
|
int val = mraa_aio_read(m_aio);
|
||||||
float sensorVoltage = (val/1024.0) * 5.0;
|
float sensorVoltage = (val/1024.0) * 5.0;
|
||||||
sensorVoltage = (sensorVoltage/201.0) * 1000.0;
|
sensorVoltage = (sensorVoltage/201.0) * 10000.0;
|
||||||
return sensorVoltage;
|
return sensorVoltage;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user