Forum Rule: Always post complete source code & details to reproduce any issue!
Page 18 of 19 FirstFirst ... 8 16 17 18 19 LastLast
Results 426 to 450 of 472

Thread: Artnet to OctoWS2811?

  1. #426
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    Quote Originally Posted by Cristobal View Post
    Got the extra GPIO to work... the only part I am still stuck with is the multiple universe part any help ANY will be sooooo appreciated
    The maxUniverse is a constant that represents the total amount of universes expected. We're doing this so that we can wait until all universes are received before sending a frame.
    Did you get your system working ?

  2. #427
    Junior Member
    Join Date
    May 2014
    Posts
    18
    Hi friends

    Consult someone how I could add to this library https://github.com/natcl/Artnet software, for example, to find MADRIX device automatically it would be easier for equipment kofiguráciu what you should add the code to make it work ? I know this to be the beginning.

    uint8_t net;
    uint8_t subnet;
    char shortName[18];
    char longName[64];
    uint8_t numPorts;
    Last edited by folny; 08-06-2015 at 02:21 PM.

  3. #428
    Junior Member
    Join Date
    Jan 2015
    Posts
    8
    The artnet standard only defines a maximum of 4 universes per artnet node, so especially the artnet poll reply can handle a maximum of 4 ports per device. So it won't be possible if you want more than 4 universes. Correct me if I'm wrong

  4. #429
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    899
    Quote Originally Posted by folny View Post
    for example, to find MADRIX device automatically
    Are you thinking about the artPoll Reply? This has not been implemented yet for this library. There maybe someone who has adapted the code to do this, but I have not seen it posted.

  5. #430
    Junior Member
    Join Date
    May 2014
    Posts
    18
    Yes I would like to add artPoll Reply and control up to 4 Universe library would like to use the Arduino ESP8266. This library https://github.com/media-architecture/Arduino_ArtNet is implemented but it is quite difficult to modify to ESP8266.

  6. #431
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,309
    Is the ESP8266 fast enough to reasonably handle 4 universes?

  7. #432
    Junior Member
    Join Date
    May 2014
    Posts
    18
    Yes it works well for me at 4 Universe only is there a problem with WDT restarts but it will eventually resolve you can look at this project E1.31 protocol used is similar to ArtNet and which can easily be modified for a protocol ArtNet 4 Universe.Tu you can find the necessary information and sketches for E1.31 4 Universe.

    https://github.com/forkineye?tab=repositories
    http://doityourselfchristmas.com/for...php?93-Arduino

  8. #433
    Junior Member
    Join Date
    Apr 2015
    Posts
    9
    Hi Folny I've downloaded your example code and it looks pretty good so far. I just wondered if it currently working because I can log onto the esp device and setup the defaults but I can't seem to get it to work in madrix. I guess it work in progress or am I doing something wrong? . the unit ping's well in cmd prompt but nothing seems to respond in the E1.31 status. btw I've not fully looked at all the code so im not sure which output pin is the led output pin.
    thanks again for sharing your example it's a great help to all of us...

  9. #434
    Junior Member
    Join Date
    May 2014
    Posts
    18
    Hi Cubyte

    This code https://github.com/forkineye/ESPixelStick you must work correctly unless you correctly set the SSID and passphrase in the two lines which will ESP connect

    const char SSID [] = "........"; / * Replace with your SSID * /
    const char passphrase [] = "........"; / * Replace with your WPA2 passphrase * /

    the output setting is the default gpio0 you can change the file ESPixelStick.h

    #define DATA_PIN 0 / Pixel output - GPIO0 * /

    I'm currently working on ESP for 4 ArtNet Universe and function artPoll Reply with connectivity options OLED display code will be ready soon :-)

  10. #435
    Junior Member
    Join Date
    Nov 2015
    Posts
    4
    Hi Guys!

    Really a great job you did here. I've been looking for this kind of software for long time. I'm pretty happy with the results I'm having and am close to finish a LED installation where I will be controlling LED strips attached to stairs in a club in Amsterdam.

    I have teensy 3.2 running with the OctoWS2811 together with the WIZ820io ethernet adaptor receiving artnet. The sender is a PC with Chamsys software in it.
    The problem is that it doesn't work out of the box. I'm also running Artnetominator software to monitor the artnet network and there I can see how packages are sent from Chamsys correctly.

    I did set-up an arduino with some artnet code in order to test if there was something wrong with teensy but it all worked well. Arduino was sending at about 150 frames/per second and teensy was receiving without any problem.

    First I though that the artnet packages were not getting out of my computer, but then I did set-up wireshark and observed a difference between the chamsys artnet packages and the arduino generated ones. The IP destination was different. while arduino was sending artnet packages with IP destination 255.255.255.255 (broadcast) Chamsys was sending at (2.255.255.255). So I changed the artnet mode within Chamsys, from artnet broadcast to artnet unicast and set the destination IP at 255.255.255.255. Guess what? It started working straight away.

    So the question is now if the problem lies in the TCP-IP code of arduino or is the chamsys not sending the packages correctly?

    Anybody with better network knowleg than me have any guess?
    Last edited by TheDoctorB; 11-17-2015 at 08:12 PM.

  11. #436
    Hi TheDoctorB
    I think that you need to look at the link in this thread page 15 message 357
    This is the link from that message protocol description
    Last edited by GeckospotNixie; 11-22-2015 at 02:51 AM.

  12. #437
    Junior Member
    Join Date
    Nov 2015
    Posts
    4
    Quote Originally Posted by GeckospotNixie View Post
    Hi TheDoctorB
    I think that you need to look at the link in this thread page 15 message 357
    This is the link from that message protocol description
    Precisely. What I understand from that document is that ip should be in 2.?.?.? range. So if chamsys is sending to 2.255.255.255 (which should be correct) why teensy is not picking up the artnet packets? Teensy does pick only the packets with broadcast address 225.225.255.255, It shouldn't be like that, right?

  13. #438
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    899
    TheDoctorB, you are quite right, and this was mentioned on page16 message #374 to #376 of this artnet thread. I hope that any further dev of the artnet lib should take this into account.

  14. #439
    Has anyone managed more than 4 universes with this yet? I can get 4 fine, but as soon as I go over that, it stops working entirely, I'm sending via vvvv, and I've used more than 4 universes on 1 device before with it, so I presume its in the code here, but so far I haven't figured out why.

  15. #440
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    Can you post your code ?
    Did you try the simple receive examples ?

  16. #441
    Senior Member
    Join Date
    Jan 2013
    Posts
    181
    Quote Originally Posted by cat View Post
    Has anyone managed more than 4 universes with this yet? I can get 4 fine, but as soon as I go over that, it stops working entirely, I'm sending via vvvv, and I've used more than 4 universes on 1 device before with it, so I presume its in the code here, but so far I haven't figured out why.
    This is my understanding from the ArtNet 3 spec:

    A single Node can have up to 4 Input and up to 4 Output Ports. Each Port has a 4-bit field (SwIn and SwOut) that corresponds to the lower 4-bits of what ArtNet calls the Port Address. The full Port Address is a combination of NetSwitch, SubSwitch, and the corresponding SwIn or SwOut value. The Port Address is the Universe that the Port will respond to.

    Note some consequences of this scheme:

    A Node can have only up to 4 of each kind - input and output. But each port uses 1 of 16 possible addresses within the range defined by the NetSwitch and SubSwitch fields of the Node.

    In summary, the fields of the ArtPollReply message can only report up to 4 each of Output Port and Input Port.

    It took quite a some time for me to realize what the spec was implying. If anyone out there has a better understanding, please let us know.

  17. #442
    Senior Member
    Join Date
    Jan 2013
    Posts
    181
    If you are curious about what your ArtNet Controller software is sending (and receiving), use Wireshark.

  18. #443
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    This is indeed how the spec is designed, however many software don't respect that topology and send more universes.
    There is nothing in the Art-Net library for Teensy that prevents it from receiving more than 4 universes, however, it is possible that the client only sends a maximum of 4 universes.

  19. #444
    I'm using vvvv to send the artnet, and can send artnet of multiple universes between different machines running vvvv without limits as far as I'm aware. I think it just send raw UDP, its certainly not using RDM or listening for polling
    When I printed to serial monitor, I could see the other universes being received, as i can with wireshark. I was hoping someone else had tried! /?
    I did look through the artnet library and couldn't see anything that should limit the number received. I did wonder whether it simply fails to receive whole universes after 4, my monitoring didn't go much further than saying which universe and how many values were in it. OR whether it takes too long to receive them so set pixel never gets called?
    Unfortunately my coding isn't that great!

    Code:
    // Receive multiple universes via Artnet and control a strip of ws2811 leds via OctoWS2811
    //
    // This example may be copied under the terms of the MIT license, see the LICENSE file for details
    //  https://github.com/natcl/Artnet
    // 
    // http://forum.pjrc.com/threads/24688-Artnet-to-OctoWS2811?p=55589&viewfull=1#post55589
    
    #include <Artnet.h>
    #include <Ethernet.h>
    #include <EthernetUdp.h>
    #include <SPI.h>
    #include <OctoWS2811.h>
    
    // OctoWS2811 settings
    const int ledsPerStrip = 170; // change for your setup
    const byte numStrips= 4; // change for your setup
    DMAMEM int displayMemory[ledsPerStrip*6];
    int drawingMemory[ledsPerStrip*6];
    const int config = WS2811_GRB | WS2811_800kHz;
    OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
    
    // 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 zero.
    const int numberOfChannels = ledsPerStrip * numStrips * 3; // Total number of channels you want to receive (1 led = 3 channels)
    byte channelBuffer[numberOfChannels]; // Combined universes into a single array
    
    // Check if we got all universes
    const int maxUniverses = numberOfChannels / 512 + ((numberOfChannels % 512) ? 1 : 0);
    bool universesReceived[maxUniverses];
    bool sendFrame = 1;
    
    // Change ip and mac address for your setup
    byte ip[] = {192, 168, 0, 7};
    byte mac[] = {0x04, 0xE9, 0xE6, 0x07, 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;
    //Serial.println(universe);
    //Serial.println(byte(data[1]));
    
      // Store which universe has got in
      if (universe-startUniverse < maxUniverses)
        universesReceived[universe-startUniverse] = 1;
    
      for (int i = 0 ; i < maxUniverses ; i++)
      {
        if (universesReceived[i] == 0)
        {
      //    Serial.println("Broke");
      
          sendFrame = 1;
          break;
        }
      }
    
      // read universe and put into the right part of the display buffer
      for (int i = 0 ; i < length ; i++)
      {
      //  Serial.println("Insert");
        int bufferIndex = i + ((universe - startUniverse) * length);
        if (bufferIndex < numberOfChannels) // to verify
          channelBuffer[bufferIndex] = byte(data[i]);
      }      
    
      // send to leds
      for (int i = 0; i < ledsPerStrip * numStrips; i++)
      {
        leds.setPixel(i, channelBuffer[(i) * 3], channelBuffer[(i * 3) + 1], channelBuffer[(i * 3) + 2]);
       // Serial.println(channelBuffer[i]);
      }      
      
      if (sendFrame)
      {
        leds.show();
         Serial.println("Show");
        // Reset universeReceived to 0
        memset(universesReceived, 0, maxUniverses);
      }
    }
    
    void initTest()
    {
      for (int i = 0 ; i < ledsPerStrip * numStrips ; i++)
        leds.setPixel(i, 127, 0, 0);
      leds.show();
      delay(500);
      for (int i = 0 ; i < ledsPerStrip * numStrips  ; i++)
        leds.setPixel(i, 0, 127, 0);
      leds.show();
      delay(500);
      for (int i = 0 ; i < ledsPerStrip * numStrips  ; i++)
        leds.setPixel(i, 0, 0, 127);
      leds.show();
      delay(500);
      for (int i = 0 ; i < ledsPerStrip * numStrips  ; i++)
        leds.setPixel(i, 0, 0, 0);
      leds.show();
    }

  20. #445
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    What hardware are you using ?

  21. #446
    Junior Member
    Join Date
    Feb 2014
    Posts
    2
    Hi everyone, I've soldered up a wee stack with the octows2811 adapter board, the wiznet adapter, a teensy 3.2 and the wiznet module and i've been testing it out to see how many pixels I can run off this.
    So far I've never gotten it to do more than 170*7 - so essentially 7 full universes. I've been testing with the demo code from the octows2811 examples - the artnet one - and only altering the amounts of pixels.

    Someone here mentioned that they were getting better performance with using 10base-t instead of 100base-t ethernet speed on the transmitting computer so I've tried this too and it actually works! I got at least 2000 pixels worth of data over TWELVE universes. Does anyone have any clue how to achieve better performance without turning down the transmit speed? I'm completely stumped on why this even happens, It seems counter intuitive that I can send more packets succesfully when slower!

  22. #447
    I'm using the wiz820 + adapter, teensy 3.1's and making my own boards for splitting to the pixels. 7 Universes you say, now that is interesting, I'm going to have to go and retest everything here then I guess!

  23. #448
    Junior Member
    Join Date
    Jan 2015
    Posts
    8
    Is there some kind of FPS limit with Artnet? When I go over 20 FPS with 7 full universes the last pixels seem to hang. Anyone experienced that too? Is there a way go go around this?

  24. #449
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    899
    Quote Originally Posted by Janson View Post
    Is there some kind of FPS limit with Artnet? When I go over 20 FPS with 7 full universes the last pixels seem to hang. Anyone experienced that too? Is there a way go go around this?
    I did some tests regarding limits, when this was being sorted out, post #213 quoted my transfer rate then:
    "So, have run some data transfer tests with different permutations. Using my old macbook connected directly to the ethernet module i can transfer up to about 16,000 led data sets a sec. Above this, the frames are incomplete. This test was done with these scenario:
    90*8 leds @ 20fps
    80*8 leds @ 25fps
    50*8 leds @ 40fps
    There was a difference in success when using different universe numbers. I found that using larger universe size and fewer universe was more successful than using lots of smaller universe ( i guess that this is to do with the packet overhead building up). An example was that 50*8leds @ 40fps worked well with universe size of 50, but not with universe of 25 (i.e 16 universe rather than 8). This test was carried out using the Pixelcontroller software for artnet output and the wiznet 820 with teensy 3.1."

  25. #450
    Junior Member
    Join Date
    Jan 2015
    Posts
    8
    For me 200*7 LEDs work bareley at 20fps. What do you think is the bottleneck here?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •