Lecomte Delys / MatchColors

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HL1606Stripe.h Source File

HL1606Stripe.h

00001 #ifndef HL1606_STRIPE_H
00002 #define HL1606_STRIPE_H
00003 
00004 #ifndef COLOR_H
00005 #define COLOR_H
00006 #include "Color.h"
00007 #endif
00008 
00009 #include "mbed.h"
00010 #include "Intensity.h"
00011 
00012 class HL1606Stripe
00013 {
00014 
00015 public:
00016     /* Constructeur */
00017     HL1606Stripe(PinName mosi, PinName miso, PinName sclk, PinName latch, uint8_t numLEDs, uint8_t m_numColors);
00018     
00019     /* Destructeur */
00020     ~HL1606Stripe();
00021 
00022     /* Méthodes */
00023     void Update(void);
00024     void SwitchOffRGB(void);
00025     void FillRGB(uint8_t color);
00026     void FillRGB(uint8_t* colors);
00027     void FillRGB(uint8_t red, uint8_t green, uint8_t blue);
00028     void FillRandomlyRGB(uint8_t* randomColors);
00029     
00030     void setLED(uint8_t Color, uint8_t LEDx);
00031 
00032 private:
00033     /*Attributs*/
00034     uint8_t* m_redPWM;
00035     uint8_t* m_greenPWM;
00036     uint8_t* m_bluePWM;
00037     
00038     uint8_t  m_numLEDs;
00039     uint8_t m_numColors;
00040 
00041     SPI m_SPI;
00042     DigitalOut m_latchPin;
00043     Ticker m_tickerUpdate;
00044 
00045 };
00046 
00047 #endif