Hi guys,
I have ws2811 LED strip of 28 leds. Only data, ground and live wire.
trying to play around with them but when I load a sketch provided in the forums for NeoPixel library "strandtest" sketch nothing happens.
Here is my setup:
-cut connection between USB and Vin due to LED strip requiring 5v input.
-temporary connected USB and Vin to upload a proper sketch (without connection it doesn't upload, right?)
-my 5v 30A power supply has been connected to LED strip
-LED strip ground wire connected to Teensy ground pin
-LED data wire (no clock wire) connected to Teensy pin 12
when sketch is uploaded nothing happens. Do I need to connect powersupply V to Teensy Vin pin as well?
I tried it with and without powersupply live wire connected to Vin but still nothing happens.
Sketch in questions is:
If I load a Teensy example Blink sketch Teensy LED blinks so the upload part on my computer is working properly.
Any help is appreciated.
Regards,
Milos
I have ws2811 LED strip of 28 leds. Only data, ground and live wire.
trying to play around with them but when I load a sketch provided in the forums for NeoPixel library "strandtest" sketch nothing happens.
Here is my setup:
-cut connection between USB and Vin due to LED strip requiring 5v input.
-temporary connected USB and Vin to upload a proper sketch (without connection it doesn't upload, right?)
-my 5v 30A power supply has been connected to LED strip
-LED strip ground wire connected to Teensy ground pin
-LED data wire (no clock wire) connected to Teensy pin 12
when sketch is uploaded nothing happens. Do I need to connect powersupply V to Teensy Vin pin as well?
I tried it with and without powersupply live wire connected to Vin but still nothing happens.
Sketch in questions is:
Code:
#include <Adafruit_NeoPixel.h>
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
// NEO_GRB Pixels are wired for GRB bitstream
// NEO_KHZ400 400 KHz bitstream (e.g. FLORA pixels)
// NEO_KHZ800 800 KHz bitstream (e.g. High Density LED strip)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(28, 12, NEO_RGB + NEO_KHZ800);
void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
// Some example procedures showing how to display to the pixels:
colorWipe(strip.Color(255, 0, 0), 50); // Red
colorWipe(strip.Color(0, 255, 0), 50); // Green
colorWipe(strip.Color(0, 0, 255), 50); // Blue
rainbow(20);
rainbowCycle(20);
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void rainbow(uint8_t wait) {
uint16_t i, j;
for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
strip.show();
delay(wait);
}
}
// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
uint16_t i, j;
for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
for(i=0; i< strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(wait);
}
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}
If I load a Teensy example Blink sketch Teensy LED blinks so the upload part on my computer is working properly.
Any help is appreciated.
Regards,
Milos
Last edited: