Main Code

Dependencies:   DRV8833 PidControllerV3 mbed Buffer

Fork of ApexPID by James Batchelar

Revision:
0:95384d72794f
diff -r 000000000000 -r 95384d72794f RGB_LED/RGB_LED.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGB_LED/RGB_LED.cpp	Mon May 07 05:20:37 2018 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+#include "RGB_LED.h"
+
+RGB_LED::RGB_LED(PinName RedPin, PinName GreenPin, PinName BluePin):_Rpin(RedPin),
+                                        _Gpin(GreenPin), _Bpin(BluePin)
+{
+    _Rpin = false;
+    _Gpin = false;
+    _Bpin = false;
+}
+
+void RGB_LED::Red()
+{
+    _Rpin = true;
+    _Gpin = false;
+    _Bpin = false;
+    return;
+}
+
+void RGB_LED::Green()
+{
+    _Rpin = false;
+    _Gpin = true;
+    _Bpin = false;
+    return;
+}
+
+void RGB_LED::Blue()
+{
+    _Rpin = false;
+    _Gpin = false;
+    _Bpin = true;
+    return;
+}
+
+void RGB_LED::Off()
+{
+    _Rpin = false;
+    _Gpin = false;
+    _Bpin = false;
+    return;
+}
\ No newline at end of file