Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
rgb.h
- Committer:
- ciryk
- Date:
- 2015-12-10
- Revision:
- 3:c6e16ad073f6
- Parent:
- 2:37ffab5933a1
- Child:
- 4:630bc0ac793a
File content as of revision 3:c6e16ad073f6:
#ifndef RGB_H #define RGB_H #include "mbed.h" #include "color.h" /** My HelloWorld class. * Used for printing "Hello World" on USB serial. */ class RGB { public : /** Create RGB instance */ RGB(PinName r_pin, PinName g_pin, PinName b_pin); /** setColor instance *This will set the color */ void setColor(Color*color); /** setColor instance with RGB *This will set the color with given values red, green, blue */ void setColor(int red, int green, int blue); void setColor(int color); Color*getColor(); void Off(); PinName r_pin, b_pin, g_pin; Color*color; void invertColor(Color* color); PwmOut* r_out; PwmOut* b_out; PwmOut* g_out; static const int MAX_COLOR_VALUE = 255; }; #endif