simple RGB led library

Dependents:   m3Dpi MQTT-Thermostat-example Final_project_Tran Final_project_Tran ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Effect.h Source File

Effect.h

00001 
00002 #include "RGB.h"
00003 
00004 #ifndef EFFECT_H
00005 #define EFFECT_H
00006 
00007 class Effect
00008 {
00009 protected:
00010 
00011     float speed;
00012     RGB* led;
00013 
00014     void flash(Color * color, float onTime, float offTime);
00015     void flash(int color, float onTime, float offTime);
00016 
00017 public:
00018 
00019     Effect(RGB* led);
00020     virtual ~Effect();
00021 
00022     void setSpeed(float speed);
00023     float getSpeed();
00024 
00025     virtual void run() = 0;
00026     virtual void reset();
00027 
00028 };
00029 
00030 #endif