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: mbed 4DGL-uLCD-SE SDFileSystem PinDetect
Shiftbrite.h
00001 #include "mbed.h" 00002 00003 //Setup a new class for a Shiftbrite RGB LED module 00004 class Shiftbrite 00005 { 00006 public: 00007 Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk); 00008 void write(int red, int green, int blue); 00009 00010 private: 00011 //class sets up the pins 00012 DigitalOut _pin_e; 00013 DigitalOut _pin_l; 00014 SPI _spi; 00015 }; 00016 00017 Shiftbrite::Shiftbrite(PinName pin_e, PinName pin_l, PinName pin_do, PinName pin_di, PinName pin_clk) 00018 : _pin_e(pin_e), _pin_l(pin_l), _spi(pin_do, pin_di, pin_clk) 00019 { 00020 // ADD CODE HERE 00021 } 00022 00023 void Shiftbrite::write(int red, int green, int blue) 00024 { 00025 // ADD CODE HERE 00026 }
Generated on Fri Jul 15 2022 09:57:48 by
1.7.2