Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: KellerDruck_pressure PID PWM-Coil-driver Sensirion_SF04 VL6180
Fork of HSPFLOW1 by
main.cpp
- Committer:
- 212600191
- Date:
- 2017-08-08
- Revision:
- 7:fb77fbe65357
- Parent:
- 6:c20cf19f7d9b
- Child:
- 8:72b6c4a5320a
File content as of revision 7:fb77fbe65357:
#include "main.h"
int numsamples =64;
int main()
{
pc.baud(250000);
//t1.start();
//pc.printf("Serenity Starting up...");
for (int i=0; i<100000; i++){
//float t= t1.read_ms();
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
for (int j=0; j<numsamples; j++) {
High_Speed_Pressure += analog_value.read();;
}
//High_Speed_Pressure_Calibrated = (High_Speed_Pressure - 14.6959);
//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);
}
}
