Code: Select all
https://www.adafruit.com/product/2437
I'm now trying to get the sketch for the IstsyBitsy and Dotstar "ItsybitsyM4Onboard" to work and I cannot. I have it hooked up with all the defaults with the exception "NUMPIXELS 144" and have my Data hooked up to A2 and the clk hooked up to A5 as shown here in this https://app.box.com/s/svid2y97lnu7n3pzzeef7wvltvop6pdi.
this is the default example sketch from the library:
Code: Select all
// An example demonstrating how to control the Adafruit Dot Star RGB LED
// included on board the ItsyBitsy M4 board.
#include <Adafruit_DotStar.h>
// There is only one pixel on the board
#define NUMPIXELS 144
//Use these pin definitions for the ItsyBitsy M4
#define DATAPIN 8
#define CLOCKPIN 6
Adafruit_DotStar strip(NUMPIXELS, PIN_DOTSTAR_DATA, PIN_DOTSTAR_CLK, DOTSTAR_BRG);
void setup() {
strip.begin(); // Initialize pins for output
strip.setBrightness(80);
strip.show(); // Turn all LEDs off ASAP
}
void loop() {
rainbow(10); // Flowing rainbow cycle along the whole strip
}
// Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
void rainbow(int wait) {
// Hue of first pixel runs 5 complete loops through the color wheel.
// Color wheel has a range of 65536 but it's OK if we roll over, so
// just count from 0 to 5*65536. Adding 256 to firstPixelHue each time
// means we'll make 5*65536/256 = 1280 passes through this outer loop:
for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {
for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
// Offset pixel hue by an amount to make one full revolution of the
// color wheel (range of 65536) along the length of the strip
// (strip.numPixels() steps):
int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
// strip.ColorHSV() can take 1 or 3 arguments: a hue (0 to 65535) or
// optionally add saturation and value (brightness) (each 0 to 255).
// Here we're using just the single-argument hue variant. The result
// is passed through strip.gamma32() to provide 'truer' colors
// before assigning to each pixel:
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show(); // Update strip with new contents
delay(wait); // Pause for a moment
}
}