Conceito de Classe (Private Public),

Dependencies:   mbed

Revision:
2:f8dd6b50073a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Car.cpp	Tue Aug 04 14:14:54 2015 +0000
@@ -0,0 +1,40 @@
+#include "Car.h"
+
+//Porque isso só deu certo aqui.?
+//Quando eu colocava no car.h dava erro de multipla definição?
+
+DigitalOut turnRightLed(LED1);
+DigitalOut turnLeftLed(LED2); 
+
+void Car::turnRight(void){
+    
+    turnRightLed = 0;
+    turnLeftLed = 1;    
+    
+    }
+    
+void Car::turnLeft(void){
+    
+    turnRightLed = 1;
+    turnLeftLed = 0;    
+    
+    }
+
+void Car::goStraight(void){
+    
+    turnRightLed = 1;
+    turnLeftLed = 1;
+    
+    }
+
+uint32_t Car::getSpeed(void){
+    
+    return speed;
+    
+    }
+
+void Car::setSpeed(uint32_t value1){
+    
+    speed = value1;
+    
+    }
\ No newline at end of file