Guest User

Hat_V2_Hardware_Test_DotStar works fine

a guest
Jun 4th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <Adafruit_DotStar.h>
  2.  
  3. #define NUMPIXELS 28  // Number of LEDs in strip
  4.  
  5. #define DATAPIN    6
  6. #define CLOCKPIN   5
  7. Adafruit_DotStar strip = Adafruit_DotStar(NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_BGR);
  8.  
  9. void setup() {
  10.   strip.begin();
  11.   strip.show();
  12. }
  13.  
  14. void loop() {
  15.   strip.setPixelColor(0, 32, 0, 0);
  16.   strip.setPixelColor(1, 0, 32, 0);
  17.   strip.setPixelColor(2, 0, 0, 32);
  18.   strip.setPixelColor(27, 32, 0, 32);
  19.   strip.show();
  20.   delay(8);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment