
test TTL
flow.h
- Committer:
- mehrnaz
- Date:
- 2019-05-23
- Revision:
- 1:fd5a598caa32
File content as of revision 1:fd5a598caa32:
#include "mbed.h" AnalogIn flowadc(PC_4); float flowVal1; float flowVal2; float Pressure; float finalflow; float flow() { while(1) { flowVal1=3.3*flowadc; //Logic level 3.3 flowVal2 = 1.5*flowVal1; //5v Pressure =(125*flowVal2)-62.5; finalflow=(0.1989*sqrt(Pressure))+0.0284; //flow in litter per min return finalflow; } }