Alexander De Geeter
/
RGB-LED
voor rian
lib/rgb.cpp
- Committer:
- de_geeter_alexander
- Date:
- 2015-10-23
- Revision:
- 0:ff4d23667e75
File content as of revision 0:ff4d23667e75:
#include "rgb.h" Rgb::Rgb(PinName r_pin, PinName g_pin, PinName b_pin) { rout = new PwmOut(r_pin); gout = new PwmOut(g_pin); bout = new PwmOut(b_pin); } void Rgb::setColor(int red, int green, int blue) { rout->write(255-red); gout->write(255-green); bout->write(255-blue); }