Main Code
Dependencies: DRV8833 PidControllerV3 mbed Buffer
Fork of ApexPID by
RGB_LED/RGB_LED.cpp
- Committer:
- batchee7
- Date:
- 2018-05-07
- Revision:
- 0:95384d72794f
File content as of revision 0:95384d72794f:
#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; }