asdf

Dependencies:   KellerDruck_pressure PID PWM-Coil-driver Sensirion_SF04 VL6180

Fork of TestBenchSerenity-proto_F429ZI by Ian Wolf

Committer:
iwolf32
Date:
Mon Jul 31 16:25:47 2017 +0000
Revision:
6:330773526c35
Parent:
5:e3eff8a04b25
Rev1;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dmwahl 0:67debf2ccbc2 1 #include "main.h"
dmwahl 0:67debf2ccbc2 2
dmwahl 0:67debf2ccbc2 3 // main() runs in its own thread in the OS
dmwahl 0:67debf2ccbc2 4 int main()
dmwahl 0:67debf2ccbc2 5 {
iwolf32 5:e3eff8a04b25 6 pc.baud(250000);
iwolf32 5:e3eff8a04b25 7 pc.printf("Starting up...\n\r");
dmwahl 0:67debf2ccbc2 8
iwolf32 5:e3eff8a04b25 9 pc.printf("SN: %u Scale: %d Unit:%s\n\r", mainflow.serialNumber.u32, mainflow.scaleFactor.u16, mainflow.flowUnitStr);
dmwahl 0:67debf2ccbc2 10
iwolf32 5:e3eff8a04b25 11 while (1) {
iwolf32 5:e3eff8a04b25 12 mainflow.Measure(FLOW);
iwolf32 5:e3eff8a04b25 13 mainflow.Measure(TEMP);
iwolf32 5:e3eff8a04b25 14 mainflow.Measure(VDD);
iwolf32 5:e3eff8a04b25 15 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);
iwolf32 5:e3eff8a04b25 16 wait(2);
dmwahl 0:67debf2ccbc2 17 }
iwolf32 5:e3eff8a04b25 18 }