Pump Progress so far

Dependencies:   KellerDruck_pressure PID PWM-Coil-driver Sensirion_SF04 VL6180

Fork of TestBenchSerenity-proto_F429ZI1 by jack kemnitz

main.cpp

Committer:
iwolf32
Date:
2017-07-27
Revision:
6:e3eff8a04b25
Parent:
4:79b23d1fbcd1

File content as of revision 6:e3eff8a04b25:

#include "main.h"

// main() runs in its own thread in the OS
int main()
{
  pc.baud(250000);
    pc.printf("Starting up...\n\r");

    pc.printf("SN: %u Scale: %d Unit:%s\n\r", mainflow.serialNumber.u32, mainflow.scaleFactor.u16, mainflow.flowUnitStr);

   while (1) {
        mainflow.Measure(FLOW);
        mainflow.Measure(TEMP);
        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);
    }
}