DMXing WS2812 13*13 pixel display from Nano (as an openEnttec device) [editted]

So have you figured out about writing a driver for the CH340 (or CP2102 or ...)?

Paul__B: So have you figured out about writing a driver for the CH340 (or CP2102 or ...)?

Not yet Paul, its more a case of getting a CH/CP driver that will emulate a FD232 so it will appear as an openEnttec device which is what these PC DMX applications are expecting to see

For now, the only solution I have is the one I have been working on I did get an email back from the guy who wrote JINX, he didnt really know of the CH/CP so couldnt really comment

mcnobby: I did get an email back from the guy who wrote JINX, he didn't really know of the CH/CP so couldn't really comment

Implies he has orphaned the project ...

I made a slight improvement to my code which will allow a single byte to be used to control the overall brightness of ALL the WS2812b LEDs. This is done between reading the DMX byte and bitBashing the data out to the LEDs.

I basically used MUL byte, brightness MOV byte, high byte of result

3 cycles in total, and just managed to slip this in before every bitBashOut loop

This code is incredibly tight now !!!

After a bit of time tweaking and tuning, I have managed to get this project running pretty well !! At the moment I am running a short string of 30 LEDs from Jinx, via my Nano

Today I am expanding this to 13 strips of 13 WS2812B LEDS, so thats 169 !!

I shall share a video of this soon

Video Here

This is the complete prototype device, The Nano with Cable attached
I am just using this to power a small string of LEDs

If this is to be used in a large pixel array then you should NOT take the +5v power from the board

I am making a second one where the +5v can be supplied separately and NOT back-feeding the Nano

Started work on the 13*13 panel

PART 1 : https://youtu.be/8COJugCniTw

PART 2 : https://youtu.be/No3DBbGEPt8

and testing...

PART 3 : https://youtu.be/uisSr0QDCw0

Greeting

Is it possible to share your code?

I am looking at sharing a simpler version, although I now have some serious commercial interest in the code

Okay,

I would be glad if you could help me on this code, the problem is, 3-channel x 170 = 510 DMX channels in this software. 2x512 how I can do this by modifying the software. I want to use to connect more LEDs. So how do I edit 2 as Artnet.

In short, if you want to edit 2 universe as ArtNet

Meanwhile sorry for my bad english.

Thank you.

/*
This example will receive multiple universes via Artnet and control a strip of ws2811 leds via
Adafruit’s NeoPixel library: GitHub - adafruit/Adafruit_NeoPixel: Arduino library for controlling single-wire LED pixels (NeoPixel, WS2812, etc.)
This example may be copied under the terms of the MIT license, see the LICENSE file for details
*/

#include <Artnet.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <SPI.h>
#include <Adafruit_NeoPixel.h>

// Neopixel settings
const int numLeds = 240; // change for your setup
const int numberOfChannels = numLeds * 3; // Total number of channels you want to receive (1 led = 3 channels)
const byte dataPin = 2;
Adafruit_NeoPixel leds = Adafruit_NeoPixel(numLeds, dataPin, NEO_GRB + NEO_KHZ800);

// Artnet settings
Artnet artnet;
const int startUniverse = 0; // CHANGE FOR YOUR SETUP most software this is 1, some software send out artnet first universe as 0.

// Check if we got all universes
const int maxUniverses = numberOfChannels / 512 + ((numberOfChannels % 512) ? 1 : 0);
bool universesReceived[maxUniverses];
bool sendFrame = 1;
int previousDataLength = 0;

// Change ip and mac address for your setup
byte ip = {192, 168, 2, 2};
byte mac = {0x04, 0xE9, 0xE5, 0x00, 0x69, 0xEC};

void setup()
{
//Serial.begin(115200);
artnet.begin(mac, ip);
leds.begin();
initTest();

// this will be called for each packet received
artnet.setArtDmxCallback(onDmxFrame);
}

void loop()
{
// we call the read function inside the loop
artnet.read();
}

void onDmxFrame(uint16_t universe, uint16_t length, uint8_t sequence, uint8_t* data)
{
sendFrame = 1;
// set brightness of the whole strip
if (universe == 15)
{
leds.setBrightness(data[0]);
leds.show();
}

// Store which universe has got in
if ((universe - startUniverse) < maxUniverses)
universesReceived[universe - startUniverse] = 1;

for (int i = 0 ; i < maxUniverses ; i++)
{
if (universesReceived == 0)

  • {*

  • //Serial.println(“Broke”);*

  • sendFrame = 0;*

  • break;*

  • }*

  • }*

  • // read universe and put into the right part of the display buffer*

  • for (int i = 0; i < length / 3; i++)*

  • {*
    _ int led = i + (universe - startUniverse) * (previousDataLength / 3);_

  • if (led < numLeds)*
    _ leds.setPixelColor(led, data[i * 3], data[i * 3 + 1], data[i * 3 + 2]);_

  • }*

  • previousDataLength = length; *

  • if (sendFrame)*

  • {*

  • leds.show();*

  • // Reset universeReceived to 0*

  • memset(universesReceived, 0, maxUniverses);*

  • }*
    }
    void initTest()
    {

  • for (int i = 0 ; i < numLeds ; i++)*

  • leds.setPixelColor(i, 127, 0, 0);*

  • leds.show();*

  • delay(500);*

  • for (int i = 0 ; i < numLeds ; i++)*

  • leds.setPixelColor(i, 0, 127, 0);*

  • leds.show();*

  • delay(500);*

  • for (int i = 0 ; i < numLeds ; i++)*

  • leds.setPixelColor(i, 0, 0, 127);*

  • leds.show();*

  • delay(500);*

  • for (int i = 0 ; i < numLeds ; i++)*

  • leds.setPixelColor(i, 0, 0, 0);*

  • leds.show();*
    }

Thats a bit off the topic..

I presented a USB/openEnttec/DMX option to drive WS2812 (neo) LEDs and you are asking for an ArtNet (Ethernet) version driving Neopixel library

I dont use these libraries, I hand code in assembler & C, you really need to discuss this an ArtNet specialist, as I have NO experience with it

and could you please edit and encapsulate your code inside Code/Code tags, it makes it more readable and doesnt take up loads of space

Thanks

Led can last for many in total with entec open Dmx you have done?

Okaliptus:
Led can last for many in total with entec open Dmx you have done?

Im sorry, I dont understand this

I'm sorry, you can check how many LED strip with a virtual device that you entec programs.

Okaliptus, I have done some ArtNet/sACN now, see this post

I also have a completed ‘product’ version of the USB to WS2812 (single universe) openEnttec-type controller (see pic)