ArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2023-06-24T17:44:27+02:00https://brainmodular.com/forums/app.php/feed/topic/71362023-06-24T17:44:27+02:002023-06-24T17:44:27+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44845#p44845Statistics: Posted by dmitriyc — 24 Jun 2023, 17:44
]]>
2023-05-10T17:02:12+02:002023-05-10T17:02:12+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44784#p44784 I did some experiment with LOLIN D1 mini pro ESP8266, RGB led matrix and RGBW led
artnet thru wifi
I'm happy to share :
// pour LOLIN D1 mini pro ESP8266
// first DMX start address #define DMXSTART 0//canal de départ -1
#include <FastLED.h> // include FastLED *before* Artnet
// Please include ArtnetWiFi.h to use Artnet on the platform // which can use both WiFi and Ethernet #include <ArtnetWiFi.h> // this is also valid for other platforms which can use only WiFi // #include <Artnet.h>
FastLED.addLeds<NEOPIXEL, PIN_LED_DATA>(leds, NUM_LEDS); FastLED.setMaxPowerInVoltsAndMilliamps(5, 1000); // WiFi stuff WiFi.begin(ssid, pwd); WiFi.config(ip, gateway, subnet); while (WiFi.status() != WL_CONNECTED) { Serial.println("."); leds[0] = CRGB(10, 0, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED delay(50); leds[0] = CRGB(0, 0, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED delay(950); } Serial.print("WiFi connected, IP = "); Serial.println(WiFi.localIP()); leds[0] = CRGB(0, 100, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED delay(1000); leds[0] = CRGB(0, 0, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED
artnet.begin();
// artnet.subscribe_net(0); // optionally you can change // artnet.subscribe_subnet(0); // optionally you can change artnet.shortname("8 x 8 LED panel 1");//keep < 18 char artnet.longname("8 x 8 LED panel 1 64 RGB LED");//keep <64 char
// if Artnet packet comes to this universe, this function (lambda) is called artnet.subscribe(universe, [&](const uint8_t* data, const uint16_t size) { //Serial.print("lambda : artnet data (universe : "); //Serial.print(universe); // Serial.print(", size = "); //Serial.print(size); //Serial.print(") :"); // for (size_t i = 0; i < size; ++i) { // Serial.print(data); // Serial.print(","); //} // Serial.println(); if (universe == 0) { for (int i = 0; i < 170; i++) { //Serial.println(i); // get values from DMX decalage = i * 3; LedSet(i, data[DMXSTART + decalage], data[DMXSTART + decalage + 1], data[DMXSTART + decalage + 2]); } }
if (universe == 1) { for (int i = 170; i < 256; i++) { //Serial.println(i); // get values from DMX decalage = i * 3; LedSet(i, data[DMXSTART + decalage], data[DMXSTART + decalage + 1], data[DMXSTART + decalage + 2]); } }
}); }
void loop() { artnet.parse(); // check if artnet packet has come and execute callback //leds[0] = CRGB(100, 0, 0);//debug : check if fastled OK //leds[1] = CRGB(0, 100, 0);//debug : check if fastled OK
FastLED.show(); // Envoyer les couleurs aux LED }
Statistics: Posted by oli_lab — 10 May 2023, 17:02
]]>2023-05-09T13:49:19+02:002023-05-09T13:49:19+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44779#p44779If your want to light a RGB device is on the channel 1, you have to send the array R,G,B,0,0,0,....0 (509 zeros)
Ok, now we're cooking, but more questions than answers...I am able to change the colors of the LEDS by using Direct ArtNet module and an array of numbers (ie 255;0;0 to make the 1st LED red), which I thought that's what color Array to ArtNet module was doing, but I guess not. Just had a thought. My arduino is catching an array of numbers per channel, but perhaps that's not what color array is sending to ArtNet. The input isn't a string, so its not the name of the color.... is it the hex code for the color?
Statistics: Posted by dmitriyc — 09 May 2023, 01:52
]]>2023-05-08T23:13:12+02:002023-05-08T23:13:12+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44777#p44777Statistics: Posted by dmitriyc — 08 May 2023, 23:13
]]>BrainModularBrainModular Users Forum2023-06-24T17:44:27+02:00https://brainmodular.com/forums/app.php/feed/topic/71362023-06-24T17:44:27+02:002023-06-24T17:44:27+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44845#p44845Statistics: Posted by dmitriyc — 24 Jun 2023, 17:44
]]>2023-05-10T17:02:12+02:002023-05-10T17:02:12+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44784#p44784 I did some experiment with LOLIN D1 mini pro ESP8266, RGB led matrix and RGBW led
artnet thru wifi
I'm happy to share :
// pour LOLIN D1 mini pro ESP8266
// first DMX start address #define DMXSTART 0//canal de départ -1
#include <FastLED.h> // include FastLED *before* Artnet
// Please include ArtnetWiFi.h to use Artnet on the platform // which can use both WiFi and Ethernet #include <ArtnetWiFi.h> // this is also valid for other platforms which can use only WiFi // #include <Artnet.h>
FastLED.addLeds<NEOPIXEL, PIN_LED_DATA>(leds, NUM_LEDS); FastLED.setMaxPowerInVoltsAndMilliamps(5, 1000); // WiFi stuff WiFi.begin(ssid, pwd); WiFi.config(ip, gateway, subnet); while (WiFi.status() != WL_CONNECTED) { Serial.println("."); leds[0] = CRGB(10, 0, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED delay(50); leds[0] = CRGB(0, 0, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED delay(950); } Serial.print("WiFi connected, IP = "); Serial.println(WiFi.localIP()); leds[0] = CRGB(0, 100, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED delay(1000); leds[0] = CRGB(0, 0, 0);//debug : check if fastled OK FastLED.show(); // Envoyer les couleurs aux LED
artnet.begin();
// artnet.subscribe_net(0); // optionally you can change // artnet.subscribe_subnet(0); // optionally you can change artnet.shortname("8 x 8 LED panel 1");//keep < 18 char artnet.longname("8 x 8 LED panel 1 64 RGB LED");//keep <64 char
// if Artnet packet comes to this universe, this function (lambda) is called artnet.subscribe(universe, [&](const uint8_t* data, const uint16_t size) { //Serial.print("lambda : artnet data (universe : "); //Serial.print(universe); // Serial.print(", size = "); //Serial.print(size); //Serial.print(") :"); // for (size_t i = 0; i < size; ++i) { // Serial.print(data); // Serial.print(","); //} // Serial.println(); if (universe == 0) { for (int i = 0; i < 170; i++) { //Serial.println(i); // get values from DMX decalage = i * 3; LedSet(i, data[DMXSTART + decalage], data[DMXSTART + decalage + 1], data[DMXSTART + decalage + 2]); } }
if (universe == 1) { for (int i = 170; i < 256; i++) { //Serial.println(i); // get values from DMX decalage = i * 3; LedSet(i, data[DMXSTART + decalage], data[DMXSTART + decalage + 1], data[DMXSTART + decalage + 2]); } }
}); }
void loop() { artnet.parse(); // check if artnet packet has come and execute callback //leds[0] = CRGB(100, 0, 0);//debug : check if fastled OK //leds[1] = CRGB(0, 100, 0);//debug : check if fastled OK
FastLED.show(); // Envoyer les couleurs aux LED }
Statistics: Posted by oli_lab — 10 May 2023, 17:02
]]>2023-05-09T13:49:19+02:002023-05-09T13:49:19+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44779#p44779If your want to light a RGB device is on the channel 1, you have to send the array R,G,B,0,0,0,....0 (509 zeros)
Ok, now we're cooking, but more questions than answers...I am able to change the colors of the LEDS by using Direct ArtNet module and an array of numbers (ie 255;0;0 to make the 1st LED red), which I thought that's what color Array to ArtNet module was doing, but I guess not. Just had a thought. My arduino is catching an array of numbers per channel, but perhaps that's not what color array is sending to ArtNet. The input isn't a string, so its not the name of the color.... is it the hex code for the color?
Statistics: Posted by dmitriyc — 09 May 2023, 01:52
]]>2023-05-08T23:13:12+02:002023-05-08T23:13:12+02:00https://brainmodular.com/forums/viewtopic.php?t=7136&p=44777#p44777Statistics: Posted by dmitriyc — 08 May 2023, 23:13
]]>