![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Two simple classes for using the RGB led
Dependents: 4180-lab3-RTOS 4180-FinalProject
SimpleRGB.h
- Committer:
- kswanson31
- Date:
- 2016-10-10
- Revision:
- 0:7a3ee33c0a53
- Child:
- 1:0008e30a2bda
File content as of revision 0:7a3ee33c0a53:
#ifndef SIMPLERGB_H #define SIMPLERGB_H #include "mbed.h" class LightColor { public: LightColor(float r, float g, float b); float red; float green; float blue; }; class RGBLed { public: RGBLed(PinName rpin, PinName gpin, PinName bpin); void write(float red, float green, float blue); void write(LightColor color); private: PwmOut _rpin; PwmOut _gpin; PwmOut _bpin; }; #endif