Comments (7)
The ESPixelStick code uses a custom method I developed to generate the WS2811 pixel stream by offloading it to the UART. Both the NeoPixel libraries and FastLED bit-bang the stream which can lead to watchdog resets as it interrupts the wifi stack. If the only difference is the reset time as @Strontium noted, its a fairly quick and easy fix. I'll look into it when I get time, hoping to start working on some updates soon.
from espixelstick.
I had WS2801 on my "todo" list for last year, but never got around to it. Most implementations just use SPI, but unfortunately the SPI interface isn't exposed on the ESP-01 module, which means it has to be done in software. I have some WS2801 pixels to test with, just have to get around to writing a "SPI-ish" driver for them and figure out how to handle timing without disrupting the wifi stack.
from espixelstick.
The external lib Adafruit_NeoPixel does not support WS2813 yet.
Maybe the FastLED lib is a better choice as it already supports WS2813.
https://github.com/FastLED/FastLED
from espixelstick.
Compiles, but I can not test it.
`
#include <ESP8266WiFi.h>
#include <E131.h>
#include <FastLED.h>
#define NUM_LEDS 60 /* Number of pixels /
#define UNIVERSE 1 / Universe to listen for /
#define CHANNEL_START 1 / Channel to start listening at /
#define DATA_PIN 0 / Pixel output - GPIO0 */
const char ssid[] = "........."; /* Replace with your SSID /
const char passphrase[] = "........"; / Replace with your WPA2 passphrase */
E131 e131;
CRGB leds[NUM_LEDS];
void setup() {
// Uncomment/edit one of the following lines for your leds arrangement.
// FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2813, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
//FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
// FastLED.addLeds<APA104, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<P9813, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<DOTSTAR, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<DOTSTAR, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
Serial.begin(115200);
delay(10);
/* Choose one to begin listening for E1.31 data */
//e131.begin(ssid, passphrase); /* via Unicast on the default port */
e131.beginMulticast(ssid, passphrase, UNIVERSE); /* via Multicast for Universe 1 */
/* Initialize output */
FastLED.show();
}
void loop() {
/* Parse a packet and update pixels */
if(e131.parsePacket()) {
if (e131.universe == UNIVERSE) {
for (int i = 0; i < NUM_LEDS; i++) {
int j = i * 3 + (CHANNEL_START - 1);
leds[i].setRGB( e131.data[j], e131.data[j+1], e131.data[j+2]);
}
FastLED.show();
}
}
}`
from espixelstick.
To add to this, using FastLED would also enable support of WS2801 pixels as well as a whole host of other chipsets. It's been ported to the ESP, so there should be no problems slotting it in in place of Adafruit's library.
from espixelstick.
Makes sense! Any chance WS2801 pixels would ever be supported? I've got a bunch kicking around I'd love to get on a PixelStick. Thanks for all the hard work you've put into this!
from espixelstick.
Reset timing fixed as of 3.0-dev1
from espixelstick.
Related Issues (20)
- Unable to control 12v puck lights HOT 1
- ESPixelStick-4.0-beta5 - Output issue WS2811 HOT 4
- APA102 Support HOT 18
- publish Temerature values to MQTT
- OLED Support? HOT 1
- SD Card not installed HOT 13
- ESPixelStick-4.0-beta5 Multi LED Protocol Output Bug HOT 10
- Can't connect HOT 24
- SoftAP uses target SSID instead of own ID HOT 13
- WebUI Update (EFU file) HOT 12
- Dig Octa ethernet connection issues HOT 1
- restore configuration issue (on dig octa) HOT 18
- serial port freaks out after specific output config (dig octa) HOT 4
- esp32_devkitc GPIO settings HOT 3
- Please add name support to the MQTT broker fields. HOT 15
- universe zero in artnet mode doesn't seem to work
- Led for simple monitor activity HOT 2
- SACN problem in priority HOT 4
- Issue running Output 4 with SD card on ESP32 Mini HOT 11
- GPIO problems with wemos D1 mini Pro HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espixelstick.