Artnet to OctoWS2811?

Status
Not open for further replies.
Your reference to broadcast vs. unicast have per se not much to do with the Teensy but are related to what network hardware is being used.
 
most of my reading has been done around this page > http://www.deskontrol.net/blog/arduino-based-artnet-node-for-led-pixels/#comment
but there where a few ppl who made and tested the arduino 1 said it would hang in videos when the data got to much and when they went to a still image it would return to normal.
i haven't got any parts yet as im still cheeking every where that i can find on google or forums. but at the moment this looks like it should work as its got a 32 bit @ 48mhz core over the 8 bit @ 16 mhz that arduino has
so far the bits list to get is
5m @ 60leds/m
teensy 3.1
wiz820 +
2 x 5v 12a 60w power supply
+ cabling


if universe == 0, set start pixel to 0
if universe == 1, set start pixel to 170
if universe == 2, set start pixel to 340

set colors
display colors

and virtualdavid did u ever get this to work????????
if u did that would be soooo good!!!!!
 
if universe == 0, set start pixel to 0
if universe == 1, set start pixel to 170
if universe == 2, set start pixel to 340

set colors
display colors

and virtualdavid did u ever get this to work????????
if u did that would be soooo good!!!!!

I didn't make a set-up for it, but there really isn't a reason why it shouldn't work. If I have time this weekend I'll do a quick test, but no reason why you couldn't do it either if you have a couple short ws2811/2 strips...just tell the teensy that the strips are longer than they actually are :)

The problem I foresee is parsing 16+ universes via artnet. That's 8000+ bytes/frame. Can a single wiz820io+t3 parse that much data within 30ms or so?

David
 
As you mention the WIZ820io since Teensyduino 1.18 Release Candidate 2 the Ethernet library uses SPIFIFO which should be a good bit faster than the standard Arduino Ethernet library.
The Adapter that was mentioned before is HERE
 
I'm waiting for my wiz820 to arrive and I'm planning on doing some tests. Anyone knows a free software that can send more than one universe of dmx ?
 
That would be so good if it could do 16+ and work!!!! But I was hoping for at lest 2 universes but I would probs only use 4 off each teensy so if 1 goes down for any problem I don't loss the whole screen.

I'm going to buy every thing in the morning
 
nlecaude, did you look at the possibility of multiple universe on the pixelcontroller software output?
 
Hey guys, first thx for that great work!
i was using "Arduino based ArtNet-Node for led pixels" from deskontrol.net...
but now i have a matrix with the size 34x20pixels (it´s still growing!), so i need new Artnet-Nodes ^^
my matrix is still working, can make some tests if needed?

what are the possibilities in amount of Pixels with normal fps (25fps was working good for me) with a teensy 3.1?
what do i need? teensy 3.1, WIZ820io & Micro SD Card Adaptor, extra pins??, WIZ820io, anymore?
software for the teensy??(libaries?)

the Software i´m using for Matrix is Jinx! http://www.live-leds.de/
it supports many different protocols like Artnet, tm2, mini dmx and more
Jinx! supports matrix with a total pixel count of up to 16384.
for DMX lightshows i´m using DMXControl 2 it supports up to 2 universes (DMXControl 3 supports more but still in Beta!)

i hope me and the software could help you
and some of you can help me with my bigger matrix ^^

Thanks!
 
Hi, I moved over to updating pixel array over wifi using UDP, so did not follow up any further with Art-Net.
 
wich software do you use to send the data over wifi?
I'm using the pixelcontroller software at the moment, as I am after some nice ambient graphics at a good refresh rate.

I had a go at setting up the Art-Net configuration, and I have it working but for only the one universe at the moment. I will have a look at it over the next few days for frame/universe numbering if I can get some time.
 
art-net multiple universe

I can confirm that I have teensy 3.1 and octows2811 working with art-net to receive and display multiple universe. As virtualdave suggested, reading a universe signifier works. I have only tested this with the pixelcontroller software with two universe at the moment.
 
Ooooooh yay!!!! Now I wish my orders would hurry up and get here so I can start to play and learn how to do all this stuff on teensy!
 
Sorry for all these questions!! But I am wondering now is there anyway to change what universe the teensy is looking out for via HTML instead of doing it with usb?
 
Sorry for all these questions!! But I am wondering now is there anyway to change what universe the teensy is looking out for via HTML instead of doing it with usb?
not sure about html, but if you are sending info via art-net, the universe number is within the code, theres a little table here:
http://en.wikipedia.org/wiki/Art-Net

With Art-Net, when you gather the sent data into the receiving buffer, you can grab the universe number and check it, and then do something. As an example, you can grab the universe number by accessing array values 14 and 15:

Code:
 //-------read incoming universe number-------------//
        short incoming_universe=bytes_to_short(buff[15],buff[14])
        Serial.print("universe number = ");
        Serial.println(incoming_universe);
virtualdave pointed this out in an earlier post

The idea might then be:
int in = incoming_universe;
int offset = in*universe_size;
leds.setPixel(i+offset, etc…);

i am just trying to put a small example code together for teensy to look at this value and then use this value to determine which leds to sent the info to.
 
Last edited:
Nice, could you post a code example ?
Thanks !
just trying to clean it up, but it is heavily embedded within the UDP CC3000 code.

BUT, i get flicker on the second universe. Have not tried more than two universe, but the sketch checks for universe numbers in incoming packets, and it is counting up to 16 coming from pixelController.
 
Last edited:
not sure about html, but if you are sending info via art-net, the universe number is within the code, theres a little table here:
http://en.wikipedia.org/wiki/Art-Net

With Art-Net, when you gather the sent data into the receiving buffer, you can grab the universe number and check it, and then do something. As an example, you can grab the universe number by accessing array values 14 and 15:

Code:
 //-------read incoming universe number-------------//
        short incoming_universe=bytes_to_short(buff[15],buff[14])
        Serial.print("universe number = ");
        Serial.println(incoming_universe);

The idea might then be:
int in = incoming_universe;
int offset = in*universe_size;
leds.setPixel(i+offset, etc…);

i am just trying to put a small example code together for teensy to look at this value and then use this value to determine which leds to sent the info to.

Sorry I will explain abit more into what I mean.

Let's say the teensy is set to universe 5 and 6 and it's 10m up in the air with no way of getting to the usb of it but now I need it to be set to universe 8 and 9. Is there anyway to access it via a web browser on a computer and change it like so?? The same way u can change the settings on most routers.
 
oh, a bit beyond me, but you could always have the teensy as receive only, rather than polling, and depending on how much additional time lag you can allow for processing, you could send an occasional packet with a signifier at the front end of the data that the code on the teensy checks for, and then decides that this packet contains a value to change the universe variable to.

perhaps something like: If incoming packet data starts with xxx, go to packet bytes numbers x and y, change variable universe to value of x and y?

I think, though, that this would slow things down a lot as the if function would run all the time, so probably a dumb idea. Someone on this forum with web server knowledge should be able to help, maybe a new thread for remote changing of variables?
 
Nice, could you post a code example ?
Thanks !

So, whether using ethernet or wifi, or whathaveyou, you will collect the incoming data into a buffer. You then remove the art-net header (you can run some error checks on this header if you wish. Also, in the code below, I run a simple universe number check by printing it to serial monitor.


Code:
void grabInput(){ 
  //-------------put the incoming data into a buffer----------//
//here, I am using a buffer called buff to receive via CC3000 UDP packet 
 sockLen = sizeof(sockaddr_in);
 recvfrom(sockfd, buff, sizeof(buff), 0, (sockaddr*)&from, &sockLen);

//there is an equivalent read into buffer using the ethernet lib

 //-------read incoming universe number-------------//
        incoming_universe=bytes_to_short(buff[15],buff[14])
        Serial.print("universe number = ");
        Serial.println(incoming_universe);
        int in = incoming_universe;
        int offset = (in-1)*(universeSize);

 //-------remove the header info from the data-----//
           for(int h=start_address;h< number_of_channels;h++) {
            buff2[h-start_address]= byte(buff[h+art_net_header_size+1]); }
  
  //-------and send to leds with the correct offset for each universe-----//         
  for (byte i = 0; i < (universeSize*3); i++) {
 leds.setPixel(i+offset, buff2[(i)*3], buff2[(i*3)+1], buff2[(i*3)+2]);
     }
      leds.show();  
 }

header size is:
const int art_net_header_size = 17;
I still get flicker on the second universe though. hmm…

EDIT: need to add a couple of lines of code that the above uses, and correct the for loop size to (universeSize*3):
#define bytes_to_short(h,l) ( ((h << 8) & 0xff00) | (l & 0x00FF) );
const int number_of_channels= (ledsPerStrip*8*3);//channel number
const int start_address=0;
short incoming_universe=0;
 
Last edited:
Follow up - check on 16 universe.
So I thought that I would use the art-net features of including universe number and packet sequence within the packet to check how many universe the teensy was receiving in pushing to octows2811 leds. I used the serial monitor to capture serial.print for bytes 15 and 14 for the universe number and byte 12 for the sequence number using:

Code:
 //-------read incoming universe number-------------//
        incoming_universe=bytes_to_short(buff[15],buff[14])
        Serial.print("universe number = ");
        Serial.print(incoming_universe);
        byte sequence = buff[12];
        Serial.print("  ");
        Serial.print("sequence n0. = ");
        Serial.println(sequence);

Sequence number cycles to 254 and then zeros again and starts all over.
The output was:
Started AP/SSID scan

Connecting to ross...Waiting to connect...Connected to WiFi network!
Requesting address from DHCP server...OK

IP Addr: 192.168.1.10
Netmask: 255.255.255.0
Gateway: 192.168.1.255
DHCPsrv: 0.0.0.0
DNSserv: 192.168.1.255
Connect to 192.168.1.10:6454
connected to UDP port 6454
universe number = 16 sequence n0. = 15
universe number = 1 sequence n0. = 16
universe number = 2 sequence n0. = 17
universe number = 3 sequence n0. = 18
universe number = 5 sequence n0. = 20
universe number = 6 sequence n0. = 21
universe number = 8 sequence n0. = 23
universe number = 10 sequence n0. = 25
universe number = 12 sequence n0. = 27
universe number = 14 sequence n0. = 29
universe number = 16 sequence n0. = 31
universe number = 1 sequence n0. = 32
universe number = 2 sequence n0. = 33
universe number = 3 sequence n0. = 34
universe number = 4 sequence n0. = 35
universe number = 6 sequence n0. = 37
universe number = 8 sequence n0. = 39
universe number = 10 sequence n0. = 41
universe number = 12 sequence n0. = 43
universe number = 14 sequence n0. = 45
universe number = 16 sequence n0. = 47
universe number = 1 sequence n0. = 48
universe number = 2 sequence n0. = 49
universe number = 3 sequence n0. = 50

there are a few outputs missing, but this matches the sequence number misses, so I assume that it is to do with the time delay of the serial monitor?

BUT!!!!! still really bad flicker!!
 
Last edited:
Status
Not open for further replies.
Back
Top