Ben Michael / Mbed 2 deprecated miniProject4

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mchristianson21
Date:
Sun Jan 13 02:38:34 2019 +0000
Parent:
5:08abb0ea4193
Child:
8:fb50cf601521
Commit message:
Minor code changes

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
tempSnsr.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Jan 13 01:31:58 2019 +0000
+++ b/main.cpp	Sun Jan 13 02:38:34 2019 +0000
@@ -1,5 +1,5 @@
 \**********************************************************************
-Mini-Porject 4
+Mini-Project 4
 Move TMP36 sensors attached to servo to make them line up with highest
 heat source and display the hot temperature on seven segment displays.
  
--- a/tempSnsr.cpp	Sun Jan 13 01:31:58 2019 +0000
+++ b/tempSnsr.cpp	Sun Jan 13 02:38:34 2019 +0000
@@ -16,7 +16,7 @@
     for(int i = 0; i < 10; i++){
          temp1 += tempSnsr1;
     }
-    return ((temp1 / 10 * 3.3  - 0.5) * 1.8 + 32); //conversion to the actual temperature in farenheit allows for reusability of function
+    return ((temp1 * 10 * 3.3  - 0.5) * 1.8 + 32); //conversion to the actual temperature in farenheit allows for reusability of function
 }
 
 float avgTemp2(){
@@ -24,7 +24,7 @@
     for(int i = 0; i < 10; i++){
          temp2 += tempSnsr2;
     }
-    return ((temp2 / 10 * 3.3  - 0.5) * 1.8 + 32);
+    return ((temp2 * 10 * 3.3  - 0.5) * 1.8 + 32);
 }
 
 float tempDiff(){ //this function is simple but mainly for modularity