Code IR sensor counts and controls relay. Erkle grue pizza is good.

Dependencies:   BSP_DISCO_L476VG LCD_DISCO_L476VG

Revision:
1:28d1cf3f31f7
Parent:
0:0949c00010ff
Child:
2:f8e9daaf48b5
--- a/main.cpp	Mon Oct 19 20:57:39 2020 +0000
+++ b/main.cpp	Mon Oct 19 21:05:49 2020 +0000
@@ -62,7 +62,7 @@
                 count++;
                 Counter(count);
             }
-            else if(person == 0)
+            else if(person == -1)
             {
                 count--;
                 Counter(count);
@@ -108,11 +108,11 @@
 {
     int lowest = PeakLocation();
     
-    if(lowest < (numDataSamples*(1/2 - 0.1)))        // Lowest < midpoint - 10%
+    if(lowest < (numDataSamples*(1/2)))        // Lowest < midpoint - 10%
     {
         return -1;
     }
-    else if(lowest > (numDataSamples*(1/2 + 0.1)))  // Lowest > midpoint + 10%
+    else if(lowest > (numDataSamples*(1/2)))  // Lowest > midpoint + 10%
     {
         return 1;
     }