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.
Dependencies: 4DGL-uLCD-SE_ PinDetect SDFileSystem mbed
Fork of mythermostat by
RGBLED.h
- Committer:
- jboettcher
- Date:
- 2016-09-06
- Revision:
- 5:c73ebb00e86d
File content as of revision 5:c73ebb00e86d:
#include "mbed.h"
//Setup a new class for a Shiftbrite RGB LED module
class Shiftbrite
{
public:
    Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk);
    void write(int red, int green, int blue);
private:
//class sets up the pins
    DigitalOut _pin_e;
    DigitalOut _pin_l;
    SPI _spi;
};
Shiftbrite::Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk)
    : _pin_e(pin_e), _pin_l(pin_l), _spi(pin_do, pin_di, pin_clk)
{
 // ADD CODE HERE
}
void Shiftbrite::write(int red, int green, int blue)
{
 // ADD CODE HERE
}
            
    