updated
Fork of neopixels_spi by
neopixels_spi.h
- Committer:
- ivanyohuno
- Date:
- 2015-05-12
- Revision:
- 0:22b6f7132818
File content as of revision 0:22b6f7132818:
#ifndef NEOPIXELS_SPI_H #define NEOPIXELS_SPI_H #include <string.h> #include <stdio.h> #include "mbed.h" class neopixels_spi{ public: //function declarations void setRGBStrip1(int r, int g, int b); //sets colour of a strip of 8 RGB Pixels on pin 5 void setRGBStrip2(int r, int g, int b); //sets colour of a strip of 8 RGB Pixels on pin 11 void setRGBPixels1(int colours[8][3]); //sets sequence of colours for a strip of 8 RGB Pixels on pin 5 void setRGBPixels2(int colours[8][3]); //sets sequence of colours for a strip of 8 RGB Pixels on pin 11 void spi_init(); //initializes SPI pin at correct bit length and bit rate int * decimalToBinary(int n); //converts a decimal value between 0 and 255 to an 8 bit binary array of 0xF00 (0) and 0xFF0 (1) }; #endif