rgb+lcd+pot

Dependencies:   C12832

Files at this revision

API Documentation at this revision

Comitter:
robindeleu
Date:
Mon Feb 10 10:08:59 2020 +0000
Parent:
5:a89ad54e5ac7
Commit message:
2pots+lcd+rgb

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Sep 19 19:25:46 2017 +0000
+++ b/main.cpp	Mon Feb 10 10:08:59 2020 +0000
@@ -6,14 +6,25 @@
 AnalogIn pot1 (A0);
 AnalogIn pot2 (A1);
 
+
+PwmOut r (D5);
+PwmOut g (D8);
+PwmOut b (D9);
+
 int main()
 {
-    while(1) {
-        lcd.cls();
-        lcd.locate(0,3);
-        lcd.printf("Pot 1 = %.2f", (float)pot1);
-        lcd.locate(0,14);
-        lcd.printf("Pot 2 = %.2f", (float)pot2);
+    lcd.cls();
+    lcd.locate(0,3);
+    lcd.printf("P1 : P2");
+    
+    while(true) {
+        r = pot1-pot2;
+        g = pot1;
+        b = pot2;
+       
+       
+       
+        
         wait(0.1);
     }
 }