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.
Dependents: m3Dpi MQTT-Thermostat-example Final_project_Tran Final_project_Tran ... more
Revision 7:d10cfeb2f18e, committed 2015-12-03
- Comitter:
- sillevl
- Date:
- Thu Dec 03 07:56:55 2015 +0000
- Parent:
- 6:b5a88296bc50
- Commit message:
- remove .orig files
Changed in this revision
Color.h.orig | Show diff for this revision Revisions of this file |
RGB.h.orig | Show diff for this revision Revisions of this file |
--- a/Color.h.orig Thu Nov 19 08:16:58 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - -#ifndef COLOR_H -#define COLOR_H - -class Color -{ - - int red; - int green; - int blue; - - void setColor(int red, int green, int blue); - -public: - - enum Colors {RED = 0xFF0000, GREEN = 0x00FF00, BLUE = 0x0000FF, CYAN = 0x00FFFF, MAGENTA = 0xFF00FF, YELLOW = 0xFFFF00, WHITE = 0xFFFFFF, BLACK = 0x000000}; - - Color(int red, int green, int blue); - Color(float red, float green, float blue); - Color(int hexColor); - - int getHex(); - - int getRed(); - int getGreen(); - int getBlue(); - -}; - -#endif
--- a/RGB.h.orig Thu Nov 19 08:16:58 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ - -#include "mbed.h" -#include "Color.h" - -#ifndef RGB_H -#define RGB_H - -class RGB -{ -public: - - static const int OFF = 0; - - RGB(PinName r_pin, PinName g_pin, PinName b_pin); - ~RGB(); - // void setIntensity(int intensity); // How are we gonna do this? - void setColor(Color* color); - void setColor(int color); - Color* getColor(); - - // void on(); // do we need this? what value to turn on to? - void off(); - -protected: - //void setColor(int r, int g, int b); - -private: - PwmOut* r_out; - PwmOut* g_out; - PwmOut* b_out; - - Color* color; - - void setPwmColor(int value, PwmOut* output); - -}; - -#endif