Jump to content

Arduino, Artnet and Chamsys


cedd

Recommended Posts

There was me thinking I'd got my head around this thing. Turns out I'm in way over my head!

 

So, we're using some of the WS2811 addressable LED strings in panto. They're small LED's that you provide with 5V, Gnd and a data line that allows you to control each LED in the string.

You can get DMX controllers for these things, and I've got a couple on order, so if the worst comes to the worst we can hire an Ethernet node and just run them via DMX. They're very channel hungry though. We're hoping to be able to do some basic pixel mapping on to them (they're being built in to the pros arch so it can twinkle), so we'd like each LED to be controllable individually. Each LED is RGB and there are 50 per string. We're hoping to use 3 strings, though I'd like my controller to be able to handle more in the future. We've already nearly filled our 2 hardware DMX outputs on the PC wing. For this reason I'm wanting to use Artnet.

 

I've downloaded a sketch for Arduino which is supposed to just work, but I think I'm missing something! I haven't got the strings yet, so I'm just playing with serial printing DMX values, or PWM dimming LED's. The problem is it isn't working.

 

I'm using Chamsys for testing. I've set Universe 1 to Artnet universe 0 and enabled it. I've not changed any other settings in Chamsys. I've set the PC IP address to match the one in the Chamsys settings - 2.0.0.20. Subnet Mask 255.0.0.0.

 

The code I'm using is pasted below. I've set the IP address to 2.0.0.10. Universe 0. The bit I don't completely understand is the Artnet subnet field. I can't see anywhere to configure this in Chamsys. The default value in the Sketch is 0, which is how I've left this. It suggests that the value to go in there isn't the PC subnet. I don't fully understand it though if I'm honest.

 

I can ping the Arduino and it replies, and the LED's light on the Ethernet shield. The sketch though is designed to just serial print some data on serial monitor. I'm seeing nothing though. The sketch also includes some code to PWM drive an LED connected to the Arduino. There's a slight quirk in that it would appear you have to subtract 1 from the DMX channel you're wanting to receive, so you'll see that it's pushing out PWM derived from channel 0, on pin 3. Again though, it doesn't work.

 

 

 

 

I think the place I'm going wrong is in my Artnet setup somewhere, as the ping works and others have had success with the Artnet sketch. I've described every step I've taken, so if it looks like I've missed something - I probably have! Artnet isn't my thing, I've never used it or configured it before. I'm in the slightly difficult position where I havent's got a known "good" artnet device to test this setup with though. I'm jut trusting that the Arduino is behaving.

 

I've tried some other Arduino Artnet sketches and libraries. None of them behave as they should.

 

 

 

 

If anybody out there can help then it'd be really appreciated!

 

 

 

Here's the code;

 

/*

ARTNET RECEIVER v3.1

 

This SCRIPT allows you to use arduino with ethernet shield or wifi shield and recieve artnet data. Up to you to use channels as you want.

 

Tested with Arduino 1.0.5, so this code should work with the new EthernetUdp library (instead of the depricated Udp library)

 

If you have implemented improvements to this sketch, please contribute by sending back the modified sketch. It will be a pleasure to let them accessible to community

 

Original code by ©Christoph Guillermet, designed to be used with the free open source lighting software WhiteCat: http://www.le-chat-noir-numerique.fr

karistouf@yahoo.fr

 

v3, modifications by David van Schoorisse <d.schoorisse@gmail.com>

Ported code to make use of the new EthernetUdp library used by Arduino 1.0 and higher.

 

V3.1 by MSBERGER 130801

- performance gain by shrinking buffer sizes from "UDP_TX_PACKET_MAX_SIZE" to 768

- implementation of selction / filtering SubnetID and UniverseID (was already prepared by karistouf)

- channel count starts at 0 instead of 1 (the digital and vvvv way)

- artnet start_address+n is now mapped to "arduino-channel" 0+n (was also start_address+n bevore), now it is similar to lighting fixtures

 

 

 

 

 

*/

 

 

#include <SPI.h>

#include <Ethernet.h>

#include <EthernetUdp.h> // UDP library from: bjoern@cs.stanford.edu 12/30/2008

#define short_get_high_byte(x) ((HIGH_BYTE & x) >> 8)

#define short_get_low_byte(x) (LOW_BYTE & x)

#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[] = {2, 0, 0, 10}; // the IP adress of your device, that should be in same universe of the network you are using

 

// the next two variables are set when a packet is received

byte remoteIp[4]; // holds received packet's originating IP

unsigned int remotePort; // holds received packet's originating port

 

//customisation: Artnet SubnetID + UniverseID

//edit this with SubnetID + UniverseID you want to receive

byte SubnetID = {0};

byte UniverseID = {0};

short select_universe= ((SubnetID*16)+UniverseID);

 

//customisation: edit this if you want for example read and copy only 4 or 6 channels from channel 12 or 48 or whatever.

const int number_of_channels=512; //512 for 512 channels

const int start_address=0; // 0 if you want to read from channel 1

 

//buffers

const int MAX_BUFFER_UDP=768;

char packetBuffer[MAX_BUFFER_UDP]; //buffer to store incoming data

byte buffer_channel_arduino[number_of_channels]; //buffer to store filetered DMX data

 

// art net parameters

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

const int art_net_header_size=17;

const int max_packet_size=576;

char ArtNetHead[8]="Art-Net";

char OpHbyteReceive=0;

char OpLbyteReceive=0;

//short is_artnet_version_1=0;

//short is_artnet_version_2=0;

//short seq_artnet=0;

//short artnet_physical=0;

short incoming_universe=0;

boolean is_opcode_is_dmx=0;

boolean is_opcode_is_artpoll=0;

boolean match_artnet=1;

short Opcode=0;

EthernetUDP Udp;

 

void setup() {

//setup pins as PWM output

pinMode(3, OUTPUT); //check with leds + resistance in pwm, this will not work with pins 10 and 11, used by RJ45 shield

pinMode(5, OUTPUT); //check with leds + resistance in pwm, this will not work with pins 10 and 11, used by RJ45 shield

pinMode(6, OUTPUT); //check with leds + resistance in pwm, this will not work with pins 10 and 11, used by RJ45 shield

 

//setup ethernet and udp socket

Ethernet.begin(mac,ip);

Udp.begin(localPort);

}

 

void loop() {

int packetSize = Udp.parsePacket();

 

//FIXME: test/debug check

if(packetSize>art_net_header_size && packetSize<=max_packet_size) {//check size to avoid unneeded checks

//if(packetSize) {

 

IPAddress remote = Udp.remoteIP();

remotePort = Udp.remotePort();

Udp.read(packetBuffer,MAX_BUFFER_UDP);

 

//read header

match_artnet=1;

for (int I=0;I<7;I++) {

//if not corresponding, this is not an artnet packet, so we stop reading

if(char(packetBuffer)!=ArtNetHead) {

match_artnet=0;break;

}

}

 

//if its an artnet header

if(match_artnet==1) {

//artnet protocole revision, not really needed

//is_artnet_version_1=packetBuffer[10];

//is_artnet_version_2=packetBuffer[11];*/

 

//sequence of data, to avoid lost packets on routeurs

//seq_artnet=packetBuffer[12];*/

 

//physical port of DMX N°

//artnet_physical=packetBuffer[13];*/

 

//operator code enables to know wich type of message Art-Net it is

Opcode=bytes_to_short(packetBuffer[9],packetBuffer[8]);

 

//if opcode is DMX type

if(Opcode==0x5000) {

is_opcode_is_dmx=1;is_opcode_is_artpoll=0;

}

 

//if opcode is artpoll

else if(Opcode==0x2000) {

is_opcode_is_artpoll=1;is_opcode_is_dmx=0;

//( we should normally reply to it, giving ip adress of the device)

}

 

//if its DMX data we will read it now

if(is_opcode_is_dmx=1) {

 

//read incoming universe

incoming_universe= bytes_to_short(packetBuffer[15],packetBuffer[14])

//if it is selected universe DMX will be read

if(incoming_universe==select_universe) {

 

//getting data from a channel position, on a precise amount of channels, this to avoid to much operation if you need only 4 channels for example

//channel position

for(int I=start_address;I< number_of_channels;I++) {

buffer_channel_arduino[I-start_address]= byte(packetBuffer[I+art_net_header_size+1]);

}

}

}

}//end of sniffing

 

//stuff to do on PWM or whatever

analogWrite(3,buffer_channel_arduino[0]);

analogWrite(5,buffer_channel_arduino[1]);

analogWrite(6,buffer_channel_arduino[2]);

}

}

 

 

 

 

 

 

Link to comment
Share on other sites

Can't really help much, but in MQ the format to set a subnet is to go into the DMX output setup, and in the ArtNet universe out field type x - y , where x is the subnet number and y is the universe number. If you don't type a subnet number it will default to 0, but it will also compute larger numbers for you, so for instance if you type just 18 it will convert that to 1-2 (subnet 1, universe 2). Basically, it should be outputing the first 16 universes on subnet 0 anyway.

 

I don't have an ethernet shield for my Arduino so I'm afraid I can't test the code - there must be some code floating around that would compile on a RPi, if you've got one handy, which could probably handle the PWM outputs too. If you want to test the ArtNet output you could always get a second computer and hook it up, and put a simple ArtNet monitor application on it, which would tell you if that was getting through.

Link to comment
Share on other sites

The subnet mask isn't used by a receiving device, it is only used by transmitters. In a little more detail; if the destination IP address is on the same "network" (for those that know better - not in this thread!) as the transmitting device, then the stack sends the packet directly to that address. (Theres a little more detail than that, but we dont need to go there) If the device is not on the transmitters "network", then it is sent to the appropriate gateway or router, depending on your choice of terminology. A touch of bitwise logic between the destination address, the source address, and the subnet mask is what the stack uses to determine if the receiving device is on the transmitters subnet or not.

 

As a first step insolving this, you need to go old school. Minimise your setup to just the artnet PC and the Arduino. Start with MQ unloaded (or Artnet off) Look at the blinkenlitz on the arduino ethernet port. Now get some Artnet action going from MQ. Is there more light activity on the Arduino when Artnet is running? If not, then you have a transmission problem. If there is, then it is either an addressing issue or a reception problem, because something Artnet-ty is on the wire.

 

If that isn't enough to get you going, come back, and we'll delve deeper, with knowledge gained from the flashing lights :)

 

Edited for spelling.

Link to comment
Share on other sites

The good news is that this is possible as I've done some basic pixel mapping with MagicQ, Artnet and an Arduino. I'm no expert on these things but didn't find it too difficult so it's probably something simple that needs fixing. When I'm back home I'll dig out the code and the show file and see how I set it up. If you've not already found it, Artnetominator is a really useful bit of software for seeing what's going on with Artnet.
Link to comment
Share on other sites

I have a few arduino's for various things and I did actually play about with this for curiosity's sake...

 

I did get that sketch to work but in the end I just left it alone.. I never tried it on a single job or anything.

 

I had problems moving it to another universe and various other things.. Most were down to the uno just not having the grunt.. It worked far better on the mega.

If my memory serves me well. the DMX output from the uno was at half rate or something...

 

 

Long story short, yes you pay more.. but have patience on ebay and you will get a far more reliable factory made node without the stress (and with far better isolation).

 

I did actually look into and prototype a mega, with isolated outputs for 2 universes.... But it just was becoming so time consuming (money) and needing repeated orders to RS (more money) for something that I really didnt feel confident on using in big jobs....(try explaining a mid show signal loss to a client who knows you made it by hand....)...

So in the end I just relegated it to "hobby project" with arduino and ended up spending (adding in my time) far less on 2 POE (2 universe) pathport nodes (new but sold as used on ebay), racked with ethernet switch and xlr patchbay.

Link to comment
Share on other sites

This might seem like a daft question, so forgive me if so, but the MAC address array does contain the MAC address of your own shield and not a value that was pasted in from example code, doesn't it?

My understanding is that I was setting the MAC address in code, rather than it being something set in hardware that I'm setting the Arduino to match. There are no labels on the shield to show its' MAC address, and looking at other forum posts about the same shield, others suggest that you set the MAC by programming it in the sketch.

 

In terms of LED activity, it's looking like there's nothing getting to the shield. When I send a ping I see activity on the TX and RX LED's on the shield. When I start up MagicQ and move some faders, I see no corresponding blinking lights. To me it looks like I've not actually got Artnet leaving the laptop.

 

I need to take a good long look at my laptop setup and see if I can work out what's going on. Might involve a trip down to my local friendly hire firm after Christmas to see if I can borrow a node or something else that'll take Artnet. At least then I can test that something's actually getting out of the laptop.

 

Thanks for all the support so far!

 

 

 

 

Link to comment
Share on other sites

In terms of LED activity, it's looking like there's nothing getting to the shield. When I send a ping I see activity on the TX and RX LED's on the shield. When I start up MagicQ and move some faders, I see no corresponding blinking lights. To me it looks like I've not actually got Artnet leaving the laptop.

 

I just tried the blinkenlights test and it worked for me but I did it the other way around - took a laptop which is already successfully connected to a network (192.168.0.101) and configured Chamsys to match it. Universe 1 set to Artnet 0. Wiggled a fader up and down and the network activity lights on the laptop and on the switch it's connected to flickered in response. I haven't got anything to receive Artnet connected but, as it's being broadcast that doesn't matter. It's certainly a valid test, you're right, it would seem nothing is leaving the laptop

Dave

Link to comment
Share on other sites

My understanding is that I was setting the MAC address in code, rather than it being something set in hardware that I'm setting the Arduino to match.

Thats correct; network hardware is never "born" with a MAC address, it is (in commercial products) held in a read only memory, whihb is loaded into registers in the hardware at startup. Political issues prevent hobbyist devices having pukka MAC addresses, so they get hardcoded in code. The usual problem is two or more devices having the same MAC address through running more than one instance of the code!

 

In terms of LED activity, it's looking like there's nothing getting to the shield. When I send a ping I see activity on the TX and RX LED's on the shield. When I start up MagicQ and move some faders, I see no corresponding blinking lights. To me it looks like I've not actually got Artnet leaving the laptop.

Thats the first problem to solve then. The blinkenlitz test is a really easy eliminator for broadcast type protocols.

Link to comment
Share on other sites

Political issues prevent hobbyist devices having pukka MAC addresses, so they get hardcoded in code

 

Bit 2 in the upper byte of the MAC address (http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/MAC-48_Address.svg/640px-MAC-48_Address.svg.png) allows you to configure a Locally Administered Address. As long as you're aware of the MAC addresses you're using locally on a network, then it's perfectly fine to use these.

 

To me it looks like I've not actually got Artnet leaving the laptop.

Make sure that the primary IP address in MagicQ is set to that of the interface on your laptop which you're using. Make sure that the universe is also enabled in MagicQ. If you set the "test" column to "Ramp" in DMX IO then it'll throw data out at 33Hz with values going from 0>255 over and over, and network activity lights should blink happily as it's stopping the bit in the spec where it drops back to 1Hz if no data is changing. Saves having to wiggle faders.

 

If you use a network monitoring tool like WireShark on the interface you're using, does that capture the outgoing artnet packets?

Link to comment
Share on other sites

This may be less helpful than I had hoped... I've had a look at what I did on this front; file dates suggest it was about 18 months ago, hence my hazy recollections. I actually did it with sACN - I think the code was a lot simpler than for Artnet which I originally tried. I'll paste it below if it's of any use. I've used Artnet to control media servers from the same MagicQ PC before though which also worked OK. My money is on a MagicQ/PC/network setting rather than anything code though. I do recall having a pig of a time getting Artnet in / out of a Win7 PC the first time I tried it - firewall / untrusted network or something similar. I think it was easier in XP. Check your network settings to make sure nothing is blocking the Artnet traffic - might mean temporarily disabling firewall etc.

 

Things I noticed whilst setting this up - if the MagicQ PC is outputting Artnet / sACN, you'll see continuous fast blinking on the ports lights on your router as well as the link LED on the ethernet shield. "SACNview" is the software for checking SACN network traffic. I can't get pixel mapping to work right now for some reason but the test function that Wol mentions works fine. In terms of settings, in the network tab I have MagicQ's IP address at 2.0.0.2 (same as the host PC) and its subnet at 255.0.0.0 (I think there may be some confusion further up the thread about network subnet vs Artnet subnet?). In the DMX IO setup for universe 2 - status: enabled, out type: ACN, out uni: ACN 1. The only difference when I was outputting Artnet was to change the out type to Artnet.

 

My shield has a MAC on a sticker on its underside - I tried changing it in the code to something different and it still worked so it seems that that value isn't critical.

 

 

sacn-node.ino:


/***************************************************************************
*
* Title          : Arduino based sACN (E1.31) -> LED Pixel, Digital LED Strip gateway for WS2801
* Version        : v 0.4 beta
* Last updated   : 21.08.2013
* Target         : Arduino Mega 2560
* Author         : David Stone - david <at> uberatomic <dot> com
*
*
***************************************************************************
This program is free software; you can redistribute it and/or 
modify it under the terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 of 
the License, or (at your option) any later version. 

This program is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PsacnICULAR PURPOSE. See the GNU 
General Public License for more details. 

If you have no copy of the GNU General Public License, write to the 
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 

For other license models, please contact the author.

;***************************************************************************/

#include <Wire.h>
#include <Ethernet.h>
#include <SPI.h>
#include <EthernetUdp.h>
#include "sacn_packet.h"
// #include "Adafruit_WS2801.h"
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"


uint8_t factory_mac          [6] = {   144,   162,   218,   13,   250,  246}; // the mac address of node
uint8_t factory_localIp      [4] = {   2,   0,   0,  20};           // the IP address of node
//uint8_t factory_broadcastIp  [4] = {   2, 255, 255, 255};           // broadcast IP address
uint8_t factory_gateway      [4] = {   2,   0,   0,   2};           // gateway IP address (use ip address of controller)
uint8_t factory_subnetMask   [4] = { 255,   255,   255,   0};           // network mask (sacn-net use 'A' network type)



uint8_t  factory_longname     [sOURCE_NAME_ADDR];

uint8_t factory_subnet = 0;

sacn_node_s *sacnNode;

int     packet_type;

const int MAX_BUFFER_UDP = 680;
volatile uint8_t packetBuffer[MAX_BUFFER_UDP]; //buffer to store incoming data

EthernetUDP Udp; //Set up UDP Receiving
int dataPin  = 2;   
int clockPin = 3;    
// Adafruit_WS2801 strip = Adafruit_WS2801(170,dataPin,clockPin); //declare strip
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();

void setup() 
{
 sprintf((char *)factory_longname, "SACN NODE\0");
 Ethernet.begin(factory_mac, factory_localIp); 
 Udp.begin(STREAM_IP_PORT);
 // strip.begin();
 matrix.begin(0x70);  // pass in the address
}

void loop() 
{

 if( Udp.parsePacket() > 600){ 
  
   handle_packet();
 }
 else{
  
 };
 
}

void handle_packet()
{ 
 Udp.read((uint8_t *)packetBuffer, MAX_BUFFER_UDP);  //Read Packet into buffer
 sacnNode = (sacn_node_s *)packetBuffer;  //Make a structure pointer to buffer
 packet_type = get_packet_type();
 
 if(packet_type == 0)  // bad packet
 {
   return;
 }  
 if(packet_type == 1)
 {
     handle_dmx();
 }   
}

uint8_t get_packet_type() //this gets sacn packet type
{
 if (!memcmp(sacnNode->packetId, ACN_IDENTIFIER, ACN_IDENTIFIER_SIZE)) //Compare Packet to known identifier
 {
   return 1; 
 } 
 return 0;
}

int handle_dmx()
{
 if((uint8_t)( ((sacnNode->universeNo[2] << 8) & 0xff00) | (sacnNode->universeNo[1] & 0x00FF) ) == 1) //Turn 2 bytes into full universe number and check
 {
   // memcpy((uint8_t *)strip.pixels, sacnNode->dataValues+1, 512); //Copy DMX Data skipping the first data start byte
   
   matrix.clear();      // clear display - always necessary??
   uint16_t pixelValue = 0;
   uint8_t half = 128;
   for(int Vcounter = 0; Vcounter<8; Vcounter++)
       {
         for(int Hcounter = 0; Hcounter<8; Hcounter++)
         {
           if(sacnNode->dataValues[1+Hcounter+Vcounter*8] > half)
             {
             pixelValue = 1;
             }
           else
             {
               pixelValue = 0;
             }
           matrix.drawPixel(Hcounter, Vcounter, pixelValue);
         }
       }
       
   matrix.writeDisplay();  // write the changes we just made to the display
   
 }
//  strip.show(); //LX1 - GO!!
}

 

sacn_packet.h:


/***************************************************************************
*
* Title          : Arduino based sACN (E1.31) -> LED Pixel, Digital LED Strip gateway for WS2801
* Version        : v 0.4 beta
* Last updated   : 21.08.2013
* Target         : Arduino Mega 2560
* Author         : David Stone - david <at> uberatomic <dot> com
*
*
***************************************************************************
This program is free software; you can redistribute it and/or 
modify it under the terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 of 
the License, or (at your option) any later version. 

This program is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PsacnICULAR PURPOSE. See the GNU 
General Public License for more details. 

If you have no copy of the GNU General Public License, write to the 
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 

For other license models, please contact the author.

;***************************************************************************/

#define SOURCE_NAME_ADDR 44

#define ACN_IDENTIFIER_SIZE 12



#define ACN_IDENTIFIER "ASC-E1.17\0\0\0"

//The well-known streaming ACN port (currently the ACN port)
#define STREAM_IP_PORT 5568

#define short_get_high_byte(x)((HIGH_BYTE & x) >> 8)
#define short_get_low_byte(x)(LOW_BYTE & x)
#define bytes_to_short(h,l)( ((h << 8) & 0xff00) | (l & 0x00FF) );

struct sacn_node_s {
 
 //Root Layer
 uint16_t preamble;
 uint16_t postamble;
 uint8_t  packetId		[12];
 uint16_t flagsLength;
 uint8_t  vector		[4];
 uint8_t  CID			[16];
 //Framing Layer
 uint16_t frmFlagsLength;
 uint8_t  frmVector	[4];
 uint8_t  sourceName	[64];
 uint8_t  priority;
 uint8_t  reservedIgnore	[2];
 uint8_t  seqNo;
 uint8_t  options;
 uint8_t  universeNo      [2];
 //DMP Layer
 uint16_t dmpFlagsLength;
 uint8_t  dmpVector;
 uint8_t  addrType;
 uint16_t firstPropertyAddr;
 uint16_t addrIncrement;
 uint16_t propValCount;
 uint8_t  dataValues	[513];
 
} __attribute__((packed));

typedef struct sacn_node_s sacn_node_t;



Link to comment
Share on other sites

sACN is indeed much easier to get working than Art-Net.

 

However, that's really fragile code.

There are a few things that really should be added to make it more robust:


  •  
  • Check all of the "vector" values in turn to make sure it's the right type of ACN packet and the right version of sACN.
    (Watch your endian-ness)
    • Root Layer = 0x0000004
    • Framing Layer = 0x0000002
    • DMP Layer = 0x02

    There's a few others that the standard says should be checked but they are less likely to cause issues as they would only be sent by a broken transmitter.

     

    [*] Check the start code, alternate start codes are in use by several manufacturers' consoles.

    - Many "Disco DMX" fixtures fail miserably when on a line with RDM because they don't do this.

     

    [*] Check the CID, and discard if it's not the CID you want.

    This is how you handle "more than one console on the network".

     

    [*] Use the propValueCount to ensure you don't read garbage values out or crash* due to short packets.

For the CID check I'd just choose the CID of first valid and complete packet seen.

If you don't then then your panel will flash between the levels sent by each if somebody else starts sending - eg one of those wifi focus remote apps.

 

In theory you ought to check priority and ensure you're always picking the highest active source, along with timeouts if your chosen source goes away without announcing it's ending, but that probably doesn't really matter for this situation.

 

Finally, it should also join the multicast group for the chosen Universe, though this can often be skipped with 'dumb' switches. Not sure if Arduino's networking support does this right yet.

 

* I don't know what Arduino does if you read unallocated memory, but it's probably bad.

Link to comment
Share on other sites

Thank you all for your time on this one.

 

I'm going to spend some time over Christmas putting Chamsys on my old XP laptop as I'm much more familiar with the network settings and, as has been mentioned, it's easier to get Artnet out of. I get no activity lights at all when (apparently) sending Artnet, so it's not leaving the laptop. As soon as I ping the shield I get activity lights and get good responses.

 

 

 

I'm not actually using a router at the minute, I'm using a crossover cable. Shouldn't be a problem should it?

 

I might nip down to the local hire firm and see if I can borrow either an Artnet node or something with known good Artnet outputs. The node should let me check my existing laptop, whilst a known good artnet output should let me test the shield. I do at some point need to work out how to get this working on a W7 machine from scratch though as that's what we'll be using to run the show.

 

Once again, thanks all!

 

 

 

Link to comment
Share on other sites

Thanks for all the extra details, Tomo - I'm afraid a lot of that is a little over my head as I just used code that someone else had posted without looking in much detail at the full standard. Perhaps a project for the new year will be to expand on that a bit, learn more about sACN and write some more robust code. I was actually looking at doing pixel mapping around the pros for this year's panto, much like Cedd, but couldn't find the time to get it off the ground. Next year, however ;)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.