Final

Dependencies:   mbed

Fork of MiniProject5_LightTracker by Austin Sloop

Revision:
5:af4d347a72b8
Parent:
4:87d0b3943dfb
--- a/SegDisplay.cpp	Mon Jan 11 22:03:53 2016 +0000
+++ b/SegDisplay.cpp	Mon Jan 11 23:17:39 2016 +0000
@@ -1,8 +1,9 @@
 #include "SegDisplay.h"
 BusOut Display(p5,p6,p7,p8,p9,p10,p11,p12);
+
 DigitalOut Display1(p16);
 DigitalOut Display10(p17);
-
+DigitalOut Negative(p14);
 
 void SegInit(void)
 {
@@ -28,15 +29,24 @@
     return SegByte;
 }
 
-void SegDisplay(char x)
+void SegDisplay(int x, bool Neg)
 {
+     if(Neg == 1)
+        {
+            Negative =1;    
+        }
     while(1)
     {
+        
         Display1 =1;
         Display = SegConvert(x/10);
-        Display1=0;
-        Display10 = 1;
-        Display = SegConvert(y%10);
-        Display10=0;    
+        wait(0.01);
+        Display1 = 0;
+        
+        Display10 =1;
+        Display = SegConvert(x%10);
+        wait(0.01);
+        Display10 = 0;
+    
     }    
 }