A Clark
/
VoltageThreshold
Temp
main.cpp
- Committer:
- ajclark2
- Date:
- 2014-03-18
- Revision:
- 0:e99407475b62
- Child:
- 1:2178a66e1223
File content as of revision 0:e99407475b62:
#include "mbed.h" AnalogIn ain_v1(p20); AnalogIn ain_v2(p19); int main() { float v1, v2; int value1, value2; v1 = ain_v1; v2 = ain_v2; // Thresholded voltages as found in testing if(v1 >= 2.345 & v1 <= 2.310) // 824 MHz to 896 MHz { value1 = 1; } if(v1 >= 2.120 & v1 <= 2.095) // 1855 MHz to 1910 MHz { value1 = 1; } else { value1 = 0; } }