Dependencies: KellerDruck_pressure PID PWM-Coil-driver Sensirion_SF04 VL6180
Fork of HSPFLOWFINAL by
Revision 8:72b6c4a5320a, committed 2017-08-16
- Comitter:
- 212600191
- Date:
- Wed Aug 16 13:50:56 2017 +0000
- Parent:
- 7:fb77fbe65357
- Commit message:
- pressure;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r fb77fbe65357 -r 72b6c4a5320a main.cpp --- a/main.cpp Tue Aug 08 21:11:27 2017 +0000 +++ b/main.cpp Wed Aug 16 13:50:56 2017 +0000 @@ -2,7 +2,7 @@ int numsamples =64; - +int i =0; int main() @@ -10,9 +10,9 @@ pc.baud(250000); //t1.start(); //pc.printf("Serenity Starting up..."); - for (int i=0; i<100000; i++){ + while (i<1){ //float t= t1.read_ms(); - double High_Speed_Pressure1=0; + //double High_Speed_Pressure1=0; double High_Speed_Pressure=0; //High_Speed_Pressure1 = analog_value.read(); // //High_Speed_Pressure1 = High_Speed_Pressure1*100*(14.6959/8.6); // Calibrate value to 1atm @@ -25,10 +25,11 @@ //mainflow.Measure(FLOW); High_Speed_Pressure = (High_Speed_Pressure / numsamples); High_Speed_Pressure = High_Speed_Pressure*100*(14.6959/8.6); + pc.printf("%.02f\r\n", High_Speed_Pressure); //pc.printf("Hello\r"); //pc.printf("%0.02fpsi raw: %u %.02f", High_Speed_Pressure, mainflow.flow.u16, t);*/ - wait(.01); + wait(.001); }