pull/13/head
alanbjohnston 7 years ago committed by GitHub
parent d7fb15541d
commit 52819fa7ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -139,7 +139,7 @@ struct SensorData read_sensor_data(struct SensorConfig sensor) {
data.voltage = ((float)(value >> 3) * 4) / 1000;
// data.power = (float) wiringPiI2CReadReg16(sensor.fd, INA219_REG_POWER) * (float) sensor.powerMultiplier;
a
wiringPiI2CWriteReg16(sensor.fd, INA219_REG_CALIBRATION, sensor.calValue);
wiringPiI2CWrite(sensor.fd, INA219_REG_POWER);
delay(1); // Max 12-bit conversion time is 586us per sample

Loading…
Cancel
Save

Powered by TurnKey Linux.