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: LineLedControl LineLedControl2
Fork of LPD8806 by
LPD8806.h
00001 // Mbed library to control LPD8806-based RGB LED Strips 00002 // (c) 2011 Jelmer Tiete 00003 // This library is ported from the Arduino implementation of Adafruit Industries 00004 // found at: http://github.com/adafruit/LPD8806 00005 // and their strips: http://www.adafruit.com/products/306 00006 // Released under the MIT License: http://mbed.org/license/mit 00007 // 00008 // standard connected to 1st hardware SPI 00009 // LPD8806 <> MBED 00010 // DATA -> P5 00011 // CLOCK -> p7 00012 /*****************************************************************************/ 00013 00014 #include "mbed.h" 00015 #ifndef MBED_LPD8806_H 00016 #define MBED_LPD8806_H 00017 00018 class LPD8806 { 00019 00020 public: 00021 00022 LPD8806(uint16_t n); 00023 void 00024 begin(void), 00025 show(void), 00026 setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b), 00027 setPixelColor(uint16_t n, uint32_t c); 00028 uint16_t 00029 numPixels(void); 00030 uint32_t 00031 Color(uint8_t, uint8_t, uint8_t); 00032 00033 private: 00034 00035 uint8_t 00036 *pixels; // Holds LED color values 00037 uint16_t 00038 numLEDs; // Number of RGB LEDs in strand 00039 00040 void 00041 writezeros(uint16_t n); 00042 }; 00043 #endif
Generated on Tue Jul 19 2022 11:37:59 by
1.7.2
