Hallo, ich weiß das der Titel dieser Topic nicht wirklich viel aussagt (sorry dafür). Mein Ziel ist es Daten per Artnet zu empfangen und diese auf einem WS2812-Strip per FastLED anzuzeigen. Mein aktueller Code sieht so aus:
/*
Example Artnet RGB LED, 3 LED (one per color) react on ArtNet messages from a master.
Charles Yarnold 2015 - charlesyarnold@gmail.com
https://github.com/solexious/ESP8266_artnet_led_node
Stephan Ruloff 2016-2017
https://github.com/rstephan
*/
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <ArtnetnodeWifi.h>
#include <FastLED.h>
//Wifi settings
const char* ssid = "myssid";
const char* password = "myPassword";
ArtnetnodeWifi artnetnode;
#define NUM_LEDS 15
#define DATA_PIN 5
int pos = 0;
CRGB leds[NUM_LEDS];
// connect to wifi – returns true if successful or false if not
boolean ConnectWifi(void)
{
boolean state = true;
int i = 0;
WiFi.begin(ssid, password);
Serial.println("");
Serial.println("Connecting to WiFi");
// Wait for connection
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
if (i > 20) {
state = false;
break;
}
i++;
}
if (state) {
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
} else {
Serial.println("");
Serial.println("Connection failed.");
}
return state;
}
void setup()
{
delay(2000);
Serial.begin(115200);
artnetnode.setName("ESP8266 - Artnet");
artnetnode.setNumPorts(1);
artnetnode.enableDMXOutput(0);
artnetnode.setStartingUniverse(1);
ConnectWifi();
artnetnode.begin();
Serial.println();
Serial.println("Connected");
FastLED.addLeds<WS2811, DATA_PIN, BRG>(leds, NUM_LEDS);
}
void loop()
{
/*for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
// Turn our current led on to white, then show the leds
leds[whiteLed] = CRGB::White;
// Show the leds (only one of which is set to white, from above)
FastLED.show();
// Wait a little bit
delay(100);
// Turn our current led back to black for the next loop around
leds[whiteLed] = CRGB::Black;
}*/
uint16_t code = artnetnode.read();
if (code) {
if (code == OpDmx) {
//Serial.println("ArtPacket");
//Serial.println(artnetnode.getDmxFrame()[0]);
pos = 0;
for (int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
leds[whiteLed] = CRGB(artnetnode.getDmxFrame()[pos], artnetnode.getDmxFrame()[pos+1], artnetnode.getDmxFrame()[pos+2]);
pos+=3;
yield();
// Show the leds (only one of which is set to white, from above)
FastLED.show();
}
//leds[5] = CRGB(artnetnode.getDmxFrame()[0], artnetnode.getDmxFrame()[1], artnetnode.getDmxFrame()[2]);
//FastLED.show();
}
else if (code == OpPoll) {
//Serial.println("Art Poll Packet");
}
}
if (WiFi.status() == 6) {
ESP.reset();
}
yield();
}
Sobald nun die Verbindung mit dem WLAN steht und die Software im Loop ankommt bekomme ich einen Trace mit der Exception 29. Was ist das Problem, falls irgendwelche Informationen fehlen, einfach hier kommentieren ich füge die dann hinzu.
