Project Template for Headstart Course 2017

Dependencies:   N5110 ShiftReg Tone mbed

Fork of 1620_Project_Template by Craig Evans

Revision:
4:4269457cf8d8
Parent:
3:625925922d09
--- a/ModeB/ModeB.cpp	Mon Jul 10 14:28:29 2017 +0000
+++ b/ModeB/ModeB.cpp	Wed Jul 12 16:15:04 2017 +0000
@@ -18,7 +18,10 @@
         
         //All code goes in here!
         
-        
+
+
+
+
         
         
         update_display();
@@ -30,13 +33,9 @@
 
 void update_display(){
     
-    int red_percent = 100.0 - (red_led/1.0) * 100.0;
-    int blue_percent = 100.0 - (blue_led/1.0) * 100.0;
-    int green_percent = 100.0 -(green_led/1.0) * 100.0;
-    
-    voltage_a = pot_0.read() * 3.3;
-    voltage_b = pot_1.read() * 3.3;
-    voltage_c = pot_2.read() * 3.3;
+    int red_percent =  (voltage_a/3.3) * 100.0;
+    int green_percent = (voltage_b/3.3) * 100.0;
+    int blue_percent = (voltage_c/3.3) * 100.0;
     
     char new_string[3];
     lcd.printString("R    G    B   ",0,2);