Artnet to OctoWS2811?

Status
Not open for further replies.
at the risk of spamming this thread, sorted out missing universe and sequences (wrong number referenced in array for loop):
output can confirm all being received and read:
Code:
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. = 95
universe number = 1  sequence n0. = 96
universe number = 2  sequence n0. = 97
universe number = 3  sequence n0. = 98
universe number = 4  sequence n0. = 99
universe number = 5  sequence n0. = 100
universe number = 6  sequence n0. = 101
universe number = 7  sequence n0. = 102
universe number = 8  sequence n0. = 103
universe number = 9  sequence n0. = 104
universe number = 10  sequence n0. = 105
universe number = 11  sequence n0. = 106
universe number = 12  sequence n0. = 107
universe number = 13  sequence n0. = 108
universe number = 14  sequence n0. = 109
universe number = 15  sequence n0. = 110
universe number = 16  sequence n0. = 111

BUT!! need to resolve flicker before posting code
 
Thanks for all the testing, if it works out it will open some nice opportunities to work with pro lighting desks !
 
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?

That's kool at lest I no where to look now. But I will need to get the basics working 1st!

And mortonkopf thanks for all ur work and spare time on this project!!

I feel it's really going forwords really well
 
That's kool at lest I no where to look now. But I will need to get the basics working 1st!

And mortonkopf thanks for all ur work and spare time on this project!!

I feel it's really going forwords really well

I'm not too sure about how useful it will be though, as I can't test against the ethernet stuff. Using the CC3000 wifi is all well and good but there are some other tricks that need to be played to get around buffer issues which I have not resolved yet, and as such have only tested it with 16 universes of 15leds each. I will see about ordering an ethernet module at some stage soon, but will post the code up with two files, one untested for ethernet that hopefully you can get running. Will try to sort this flickering out first.
 
Last edited:
mortonkopf, are you outputting the two universes on the same LED strip? I've experienced flicker issues on Teensy 3.1 when driving more than about 250 x WS2812B on a single strip (even with the recent update to the OctoWS2811 lib for T3.1). Somehow the timing gets out of alignment but I haven't been able to determine the cause yet.

Some of the OctoWS2811 output pins (7 and 8) clash with the SPI used for the WIZ820 (and CC3000?). I assume that would reduce the number of possible channels from 8 to 6. Unless there's a way to remap those pins, or remap the SPI?

Nick1802, you could probably have the Teensy listen on multiple ports (if the Ethernet lib supports it). You could listen for incoming ArtNet UDP packets and then at the same time listen for config packets. Alternatively you could just use a different Opcode in the ArtNet header for config messages and filter that on the Teensy. Not sure why you would even need to change the universe assignment on the Teensy side because your DMX software sends DMX data for specified universes to a specified IP. No other device would receive that data because the IP is unique in your network so you should be able to do any necessary remapping in the DMX software.
 
What a Great work :) i´m very happy to see how good its going!!
i would really like to order a teensy so i have it at home when the software finishes can someone tell me what i will need??

i have some meter of 60led/m Strip at home and a working matrix for testing ^^

@Mortonkopf
about the flickering, at the arduino its recommended to use shielded cable and to put a resistor (between 10 Ohm to 50 Ohm) in series into DATA line (close to controller). and at the arduino some people noticed flickering when using wifi, and no flickering when connected over ethernetcable.


i know some Java,C/C++ and Arduino programming (of course not as good as you) if there is anyway to help you please tell me ;)



and maybe this project can help, here hunter builded a really big LED screen with teensys 3.0:
http://forum.pjrc.com/threads/23756-first-small-scale-test-of-our-160x80-Video-wall
 
Last edited:
Some of the OctoWS2811 output pins (7 and 8) clash with the SPI used for the WIZ820 (and CC3000?). I assume that would reduce the number of possible channels from 8 to 6. Unless there's a way to remap those pins, or remap the SPI?

@madsley, there is no clash with SPI, Teensy 3 SPI pins = 10,11,12,13 (although there is more than one option for SPI), and OCtows2811 was designed to avoid this issue by using pins:
2 LED Strip #1
14 LED Strip #2
7 LED Strip #3
8 LED Strip #4
6 LED Strip #5
20 LED Strip #6
21 LED Strip #7
5 LED Strip #8
15 & 16 Connect together
4 Do not use
3 Do not use as PWM
12 Frame Sync (Video)
For the CC3000, the IRQ and VBEN can be reassigned. I'm not in front of my sketch right now, but I think they went to pin1 and pin9, and declared as such in the sketch. I have not used the WIZ820, but its only SPI and v and gnd, so again, wont be any conflicts.

Regarding the flicker, I have set up a small test rig of 34*8 which works perfectly well with serial updating (it has the resistors, short wires of appropriate guage, shared ground, etc) at a rate of 50 fps using octows2811 1.1. The current set up is to send 16 universe of 15 leds, so that the test array is 30*8. All data is received correctly, but there is flicker on all universe except the first, which makes me suspect that it might be a buffer issue, or a loop size issue.

@Xaver2k, i think that you will be correct with the wifi verses ethernet issue. I have ordered the ethernet module to test this out, but i will continue to look at the reasons for all universe other than the first to flicker…

EDIT: oh yes, the frame sync pin 12. doh! missed it as have not been using more than the one teensy. sorry! - BUT - this can be edited to use another pin (video_display.ino I believe).

UPDATE (21/02/2014)::: flicker seems to have been related to call to leds.show() being inside the loop rather than called just the once after updating buffer for all universe.
 
Last edited:
hey guys most of the gear i need has finely arrived and i have put it all to gether i can get the octows to get the leds to work. yay step 1 done
the bit im stuck on now is the wiz820io part! how do i find its mac address??
 
hey guys most of the gear i need has finely arrived and i have put it all to gether i can get the octows to get the leds to work. yay step 1 done
the bit im stuck on now is the wiz820io part! how do i find its mac address??

Nick, funny, I have just posted a question on this very theme... I have managed to get the teensy receiving 16 universe Artnet packets via wifi (CC3000), and to display to the octows2811 array and solved the flicker problem, but it started to drop packets. I think that it might be related to the CC3000 processor speed. So, I am now getting it connected to the wiznet 820i module, but the MAC accress threw me. See the thread, and the pointers posted. I hope to have a go at this later tonight, but if you can get there sonner, that would be great...
 
Last edited:
Nick, funny, I have just posted a question on this very theme... I have managed to get the teensy receiving 16 universe Artnet packets via wifi (CC3000), and to display to the octows2811 array and solved the flicker problem, but it started to drop packets. I think that it might be related to the CC3000 processor speed. So, I am now getting it connected to the wiznet 820i module, but the MAC accress threw me. See the thread, and the pointers posted. I hope to heave a go at this later tonight, but if you can get there sonner, that would be great...

witch thread am i looking at to get pointers?
 
Xaver2k, I can't get my Ethernet wiznet 820i module working, so can not test the code for ethernet yet. If you have your ethernet working and an artnet output working I can post some test code later today for you, to test for incoming universe?
 
i didn´t purchased a teensy, because i´m not sure what will need?
teensy 3.1... and which adaptors or moduls(ethernet)??
 
Care to share some details of what's not working ?

Headroom, not at home right now, but will post up image of module and teensy 3.0 breadboarded and test code at end of day. The SPI functions seem to work (used manitou's test code) but test sketched for ethernet connections fail. will post later. Simply trying to receive at given IP on artnet port (6454). I know that the macbook is sending out on this port to this address as the CC3000 wifi works with combo.
Thanks.
 
Headroom, not at home right now, but will post up image of module and teensy 3.0 breadboarded and test code at end of day. The SPI functions seem to work (used manitou's test code) but test sketched for ethernet connections fail. will post later. Simply trying to receive at given IP on artnet port (6454). I know that the macbook is sending out on this port to this address as the CC3000 wifi works with combo.
Thanks.
Make sure the PDWN pin is connected to GND.
 
Make sure the PDWN pin is connected to GND.

Headroom, it really doesn't matter how often i read it, i only do it when i think i've done it already, and check for the third time… breadboard issues with ground. Have simple packet receive functioning now, I think, thanks.
 
So, I have Teensy receiving 16 Artnet universe over ethernet using the wiznet 820i. If you want to check your setup to see what your software is pushing out (I use pixelcontroller) you can use the following sketch:

Code:
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// libraries
#include <SPI.h>
#include <stdlib.h>      
#include <Ethernet.h>
#include <EthernetUdp.h>
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//this sketch is a cut down test for receiving Art-net packages via ethernet
#define bytes_to_short(h,l) ( ((h << 8) & 0xff00) | (l & 0x00FF) );

byte mac[] = {
  0x90, 0xA2, 0xDA, 0x0D, 0x4C, 0x8C} 
; //the mac adress in HEX of ethernet shield or uno shield board
byte ip[] = {
  192, 168, 1, 10}; // the IP adress of your device, that should be in same universe of the network you are using

unsigned int localPort = 6454;      // artnet UDP port is by default 6454

//buffers
const int MAX_BUFFER_UDP = 768;
char packetBuffer[MAX_BUFFER_UDP]; //buffer to store incoming data
short incoming_universe=0;
EthernetUDP Udp;


void setup() {
  Serial.begin(115200);
  //setup ethernet and udp socket
  Ethernet.begin(mac,ip);
  Udp.begin(localPort);
  delay(250);
    Serial.println("end of setup");
    Serial.println("waiting for incoming Artnet to start");
    //if nothing appears after this, then the loop is not receiving your
    //artnet package
}

void loop() {
  int packetSize = Udp.parsePacket();
  if(packetSize)
  { Serial.print("Received packet of size ");
    Serial.println(packetSize);
    
  Udp.read(packetBuffer,MAX_BUFFER_UDP);
  Serial.print(packetBuffer);
  Serial.print("  ");
   //-------read incoming universe and sequence number to check for data series-------------//
        incoming_universe=bytes_to_short(packetBuffer[15],packetBuffer[14])
        Serial.print("universe number = ");
        Serial.print(incoming_universe);
        byte sequence = packetBuffer[12];
        Serial.print("  ");
        Serial.print("sequence n0. = ");
        Serial.println(sequence);
  }
}

this should give you a printout over the serial monitor such as:
end of setup
waiting for incoming Artnet to start
Received packet of size 64
Art-Net universe number = 16 sequence n0. = 15
Received packet of size 64
Art-Net universe number = 1 sequence n0. = 16
Received packet of size 64
Art-Net universe number = 2 sequence n0. = 17
Received packet of size 64
Art-Net universe number = 3 sequence n0. = 18
Received packet of size 64
Art-Net universe number = 4 sequence n0. = 19
Received packet of size 64
Art-Net universe number = 5 sequence n0. = 20
Received packet of size 64
Art-Net universe number = 6 sequence n0. = 21
Received packet of size 64
Art-Net universe number = 7 sequence n0. = 22
Received packet of size 64
Art-Net universe number = 8 sequence n0. = 23
Received packet of size 64
Art-Net universe number = 9 sequence n0. = 24
Received packet of size 64
Art-Net universe number = 10 sequence n0. = 25
Received packet of size 64
Art-Net universe number = 11 sequence n0. = 26
Received packet of size 64
Art-Net universe number = 12 sequence n0. = 27
Received packet of size 64
Art-Net universe number = 13 sequence n0. = 28
Received packet of size 64
Art-Net universe number = 14 sequence n0. = 29
Received packet of size 64
Art-Net universe number = 15 sequence n0. = 30
Received packet of size 64
Art-Net universe number = 16 sequence n0. = 31
Received packet of size 64
Art-Net universe number = 1 sequence n0. = 32
Received packet of size 64
Art-Net universe number = 2 sequence n0. = 33

I will post up the sketch for Octows2811 and multiple universe artnet over ethernet once I can confirm no glitching, but in the meantime you might want to run the sketch and see if it prints to serial what you expect to come in
EDIT:: missing ref to #include <SPI.h> added in
 
Last edited:
I just tried your test sketch but I get this error:

In file included from /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/Dhcp.cpp:4:0:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/utility/w5100.h:14:17: fatal error: SPI.h: No such file or directory
compilation terminated.

This is with teensyduino 1.18 and arduino 1.05 any ideas ?

Thanks.
 
View attachment artnet_octows2811.ino
Didn't try the full 16 universes but with one universe it seems to work fine !
So, attached is a sketch for running Octows2811 via artnet over ethernet. I have a test of 60*8 array but can't get it over 15fps, but I have not looked at the wiznet 820i SPI settings to see if this can be faster. Anyhow, I have tested at 16 universe, and it works. If some one else wants to have a play, here you go:
 
I just tried with a single strip of 60 and the framerate seems quite slow also (tried from Max/MSP) not sure where the bottleneck is...
 
Status
Not open for further replies.
Back
Top