Log Test Code

Dependencies:   C12832 mbed

Fork of VoltageThreshold by A Clark

Revision:
0:e99407475b62
Child:
1:2178a66e1223
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 18 15:15:47 2014 +0000
@@ -0,0 +1,34 @@
+#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;
+    }
+    
+}
+
+
+