REV1

Dependencies:   KellerDruck_pressure PID PWM-Coil-driver Sensirion_SF04 VL6180

Fork of TestBenchFlow by Ian Wolf

Files at this revision

API Documentation at this revision

Comitter:
iwolf32
Date:
Mon Jul 31 21:02:18 2017 +0000
Parent:
6:330773526c35
Commit message:
REV1;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
main.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jul 31 16:25:47 2017 +0000
+++ b/main.cpp	Mon Jul 31 21:02:18 2017 +0000
@@ -10,7 +10,9 @@
 
    while (1) {
         mainflow.Measure(FLOW);
+        wait(.01);
         mainflow.Measure(TEMP);
+        wait(.01);
         mainflow.Measure(VDD);
         pc.printf("%.0f %s (raw: %i) Temp: %.1fC Vdd: %.2f\n\r", ((float)mainflow.flow.i16 / mainflow.scaleFactor.u16), mainflow.flowUnitStr, mainflow.flow.i16, (float)mainflow.temperature.i16/10, (float)mainflow.vdd.u16/1000);
     wait(2);
--- a/main.h	Mon Jul 31 16:25:47 2017 +0000
+++ b/main.h	Mon Jul 31 21:02:18 2017 +0000
@@ -20,10 +20,10 @@
 };
 
 //I2CPreInit gI2C1(I2C_SDA, I2C_SCL, I2C frequency);
-I2CPreInit i2c1(PB_9, PB_8, 100000);
+I2CPreInit i2c2(PB_4, PA_8, 100000);
 
 
 // Sensirion gas flow sensor object (i2c object, i2c address, calibration field, resolution 9-16 bit)
-SF04 mainflow(i2c1, MAINFLOW_ADDR, 0, 16); // Gas flow sensor (SFM7033)
+SF04 mainflow(i2c2, MAINFLOW_ADDR, 0, 16); // Gas flow sensor (SFM7033)
 
 #endif
\ No newline at end of file