ok

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
DeanArm7
Date:
Tue Nov 28 16:40:36 2017 +0000
Parent:
0:0302f3c057c9
Commit message:
Now with connected grounds and serial display;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 0302f3c057c9 -r 0260e05c8e83 main.cpp
--- a/main.cpp	Tue Nov 28 00:08:45 2017 +0000
+++ b/main.cpp	Tue Nov 28 16:40:36 2017 +0000
@@ -3,19 +3,26 @@
 DigitalOut myled1(LED1);
 DigitalOut myled2(LED2);
 
-AnalogIn   tempin(p17);
+AnalogIn   tempin(p16);
+
+Serial pc(USBTX, USBRX); // tx, rx
+
 
 int main() {
     myled1 = 0;
     myled2 = 0;
+    float test=0;
  
     while(1) {
         wait(0.5);
-        if(tempin > 0.34f){ //going above 1.07V
+        
+        test = tempin;
+         pc.printf("%f\n\r",test);
+        if(tempin > 0.28f){ //going above max temp
             myled1 = 0;
             myled2 = 1;
             }
-        if(tempin < 0.34f){ //going below 1.07V
+        if(tempin < 0.28f){ //going below max temp
             myled1 = 1;
             myled2 = 0;
             }