From 6a51214407f6e3b222599f5c031d1063cf17bb5d Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 24 Jul 2019 06:12:36 -0400 Subject: [PATCH] 50ms delay --- afsk/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index e6019861..4b65bb8e 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -117,7 +117,7 @@ struct SensorData read_sensor_data(struct SensorConfig sensor) { // int valuec1 = wiringPiI2CReadReg16(sensor.fd, INA219_REG_CURRENT); // int twos = twosToInt(valuec1, 16); // currently doesn't read negative currents correctly // float valuec3 = (float)(twos); - + delay(50); wiringPiI2CWrite(sensor.fd, INA219_REG_CURRENT); delay(1); // Max 12-bit conversion time is 586us per sample int valueC = ((wiringPiI2CRead(sensor.fd) << 8 ) | wiringPiI2CRead (sensor.fd));