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.
neopixels_spi.h
00001 #ifndef NEOPIXELS_SPI_H 00002 #define NEOPIXELS_SPI_H 00003 #include <string.h> 00004 #include <stdio.h> 00005 #include "mbed.h" 00006 class neopixels_spi{ 00007 public: 00008 //function declarations 00009 void setRGBStrip1(int r, int g, int b); //sets colour of a strip of 8 RGB Pixels on pin 5 00010 void setRGBStrip2(int r, int g, int b); //sets colour of a strip of 8 RGB Pixels on pin 11 00011 void setRGBPixels1(int colours[8][3]); //sets sequence of colours for a strip of 8 RGB Pixels on pin 5 00012 void setRGBPixels2(int colours[8][3]); //sets sequence of colours for a strip of 8 RGB Pixels on pin 11 00013 void spi_init(); //initializes SPI pin at correct bit length and bit rate 00014 int * decimalToBinary(int n); //converts a decimal value between 0 and 255 to an 8 bit binary array of 0xF00 (0) and 0xFF0 (1) 00015 }; 00016 00017 #endif
Generated on Mon Jul 25 2022 08:45:06 by
