yajuan yue / Mbed 2 deprecated ele350

Dependencies:   mbed

Fork of ele350 by JIAWEI ZHANG

Files at this revision

API Documentation at this revision

Comitter:
GGHHHH
Date:
Thu Nov 05 13:11:29 2015 +0000
Parent:
5:e820e1348f98
Child:
7:04e1552c7c95
Commit message:
1

Changed in this revision

Led.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Led.cpp	Thu Nov 05 12:55:48 2015 +0000
+++ b/Led.cpp	Thu Nov 05 13:11:29 2015 +0000
@@ -4,9 +4,17 @@
 Led::Led(string s)      //contructor implementation
 {
     if(s== "red")
-         pin= PD_14;    //The pin for the red led
-         
+    pin= PD_14;    //The pin for the red led
+    if(s=="green")
+    pin= PD_12;
+    if(s== "blue")
+    pin= PD_15;
+    if(s=="orange")
+    pin= PD_13;
+    
+    
     l = new DigitalOut(pin);
+
 }
 
 void Led::On()          //function implementation