Log Test Code

Dependencies:   C12832 mbed

Fork of VoltageThreshold by A Clark

Files at this revision

API Documentation at this revision

Comitter:
ajclark2
Date:
Tue Mar 18 15:15:47 2014 +0000
Child:
1:2178a66e1223
Commit message:
Temp

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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;
+    }
+    
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 18 15:15:47 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file