Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 45

Thread: SparkFun EL Wire Sequencer Shield on Wemos D1

  1. #21
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    3,575
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    When using multicast, the WeMos is listening to TWO IP addresses. It should continue to use the unicast address (for access to the web page etc) and it needs to be receiving the multicast traffic from the well known multicast address used by E1.31.

    But to address your question, your sketch needs to assign both the unicast and the multicast addresses that the Wemos is supposed to be monitoring. If you do not assign the unicast address in your sketch, then the WiFi layer in the Wemos will use DHCP to get the address.


    2019 - Just moved into a new home (yet another change of plans). Will be dim but not dark. Too much to do at the new place to leave time for a show.
    https://www.youtube.com/channel/UCyX...ttrsZNARkUce0Q

  2. #22
    Join Date
    Dec 2013
    Location
    Williamsburg, VA
    Posts
    917
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    Quote Originally Posted by MartinMueller2003 View Post
    When using multicast, the WeMos is listening to TWO IP addresses. It should continue to use the unicast address (for access to the web page etc) and it needs to be receiving the multicast traffic from the well known multicast address used by E1.31.
    I understand what you are saying but that is not whats happening. I get that its using a different "known" ip for the multicast data, I'm only referring to the Ip (for access to the web page etc). In other words if I were to ping the Wemos, Its not using the unicast address I set at all when I change the code to use multicast and the "unicast" address below is still setup.
    I setup my "unicast" Ip address here
    Code:
    // ***** USER SETUP STUFF *****
    const char ssid[] = "WIRELESS";  // replace with your SSID.
    const char passphrase[] = "PASSWORD"; // replace with your PASSWORD.
    const int universe = 1; // this sets the universe number you are using.
    
    IPAddress ip (192,168,1,221);  // xx,xx,xx,xx
    IPAddress netmask (255,255,255,0);  //255,255,255,0 is common
    IPAddress gateway (192,168,1,1);  // xx,xx,xx,xx normally your router / access piont IP address
    IPAddress dns (192,168,1,1); //  // xx,xx,xx,xx normally your router / access point IP address
    The above IP is used to connect to router when the code below is set to unicast. In other words when I look at the list of devices connected to my router it will show the ip .221 when the code is set to use unicast, however if I change the below code to multicast then the Ip .221 will not show but it rather uses an Ip assigned by DHCP.
    Code:
    e131.begin(ssid, passphrase, ip, netmask, gateway, dns); /* via Unicast on the default port */
      //e131.beginMulticast(ssid, passphrase, universe); /* via Multicast for Universe  */
    But to address your question, your sketch needs to assign both the unicast and the multicast addresses that the Wemos is supposed to be monitoring. If you do not assign the unicast address in your sketch, then the WiFi layer in the Wemos will use DHCP to get the address.
    I don't really need to assign a multicast address, correct? as there is no setting for one in the controller config in Vixen? I just wanted to know the address of the device so I can identify each wemos on the network. I set the 3 Wemos to Ip's 221, 22, and 223 so that I know who is who on the network. When using multicast they all appear as random IPs on my network, referring to the "unicast" Ip.

  3. Thanks Jrothrock thanked for this post
  4. #23
    Join Date
    Dec 2013
    Location
    Williamsburg, VA
    Posts
    917
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    I figured it out....

    The Wifi connection is initialized by the E131 library therefore the code below has to pass the Ip, netmask etc, although not required for the multicast to work, you need pass this info in order for the device to have a static ip.

    this line
    Code:
    e131.beginMulticast(ssid, passphrase, universe); /* via Multicast for Universe 1 */
    had to be changed to this
    Code:
    e131.beginMulticast(ssid, passphrase, universe, ip, netmask, gateway, dns); /* via Multicast for Universe 1 */
    this is the portion of the E131 library that makes the connection
    Code:
    /****** START - ESP8266 ifdef block ******/
    #if defined (INT_ESP8266)
        /* Multicast WiFi Initializers  -- ESP8266 Only */
        int beginMulticast(const char *ssid, const char *passphrase,
                uint16_t universe, uint8_t n = 1);
        int beginMulticast(const char *ssid, const char *passphrase,
                uint16_t universe, IPAddress ip, IPAddress netmask,
                IPAddress gateway, IPAddress dns, uint8_t n = 1);
    #endif
    /****** END - ESP8266 ifdef block ******/

  5. Thanks Jrothrock thanked for this post
  6. #24
    Join Date
    Sep 2018
    Posts
    1
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    Hi, Guys

    I am doing a project like this as well. Getting 9 dance suits running for my church Christmas show. I am using wemos D1 R2 boards and spark fun El Escudo Dos boards and I am sending streaming ACN multicast from mad mapper over wifi. I noticed that when I am sending data from map mapper and I reboot the D1 boards that they fail to reconnect to the wifi again. When I turn off the data stream in mad mapper and I reboot the D1 board it has no problem connecting to the wifi again.

    Any insight as to why it would be doing this? I need to have the ability to do battery swaps while still sending data down the line as on this same network I have pixel tape on Advatek boards that have to keep running. Below is the code that I am using.


    // Wemos D1 E1.31 - 8 channel sketch for Sparkfun EL Escudo Dos shield
    //Spark Fun link https://www.sparkfun.com/products/10878

    #include <ESP8266WiFi.h>
    #include <E131.h> // Copyright (c) 2015 Shelby Merrick http://www.forkineye.com

    // ***** USER SETUP STUFF *****
    const char ssid[] = "NETGEAR83"; // replace with your SSID.
    const char passphrase[] = "chummygiant294"; // replace with your PASSWORD.
    const int universe = 71; // this sets the universe number you are using.
    IPAddress ip (192,168,1,10); // xx,xx,xx,xx CHANGE TO YOUR DESIRED IP ADDRESS
    IPAddress netmask (255,255,255,0); //255,255,255,0 is common
    IPAddress gateway (192,168,1,1); // xx,xx,xx,xx normally your router / access piont IP address
    IPAddress dns (192,168,1,1); // // xx,xx,xx,xx normally your router / access point IP address

    // this sets the pin numbers to use as outputs.
    //for Wemos D1 R1 pins are 16,5,4,14,12,13,0,2
    //for Wemos D1 R2 pins are 16,5,4,0,2,14,12,13
    const int output_1 = 16; //the pin to use as output 1 (D0)
    const int output_2 = 5; //the pin to use as output 2 (D1)
    const int output_3 = 4; //the pin to use as output 3 (D2)
    const int output_4 = 0; //the pin to use as output 4 (D3)
    const int output_5 = 2; //the pin to use as output 5 (D4)
    const int output_6 = 14; //the pin to use as output 6 (D5)
    const int output_7 = 12; //the pin to use as output 7 (D6)
    const int output_8 = 13; //the pin to use as output 8 (D7)


    E131 e131;

    void setup() {
    Serial.begin(115200);
    // set the pins chosen above as outputs.
    pinMode(output_1, OUTPUT);
    pinMode(output_2, OUTPUT);
    pinMode(output_3, OUTPUT);
    pinMode(output_4, OUTPUT);
    pinMode(output_5, OUTPUT);
    pinMode(output_6, OUTPUT);
    pinMode(output_7, OUTPUT);
    pinMode(output_8, OUTPUT);

    // set the pins chosen above to low / off.
    digitalWrite(output_1, LOW);
    digitalWrite(output_2, LOW);
    digitalWrite(output_3, LOW);
    digitalWrite(output_4, LOW);
    digitalWrite(output_5, LOW);
    digitalWrite(output_6, LOW);
    digitalWrite(output_7, LOW);
    digitalWrite(output_8, LOW);


    /* Choose one to begin listening for E1.31 data */
    //e131.begin(ssid, passphrase); /* via Unicast on the default port */
    //e131.begin(ssid, passphrase, ip, netmask, gateway, dns); /* via Unicast on the default port */
    e131.beginMulticast(ssid, passphrase, universe,ip, netmask, gateway, dns); /* via Multicast for Universe 1 */
    }

    void loop() {
    /* Parse a packet */
    uint16_t num_channels = e131.parsePacket();

    /* Process channel data if we have it */
    if (num_channels) {
    Serial.println("we have data");

    digitalWrite(output_1, (e131.data[0] > 127) ? HIGH : LOW);
    digitalWrite(output_2, (e131.data[1] > 127) ? HIGH : LOW);
    digitalWrite(output_3, (e131.data[2] > 127) ? HIGH : LOW);
    digitalWrite(output_4, (e131.data[3] > 127) ? HIGH : LOW);
    digitalWrite(output_5, (e131.data[4] > 127) ? HIGH : LOW);
    digitalWrite(output_6, (e131.data[5] > 127) ? HIGH : LOW);
    digitalWrite(output_7, (e131.data[6] > 127) ? HIGH : LOW);
    digitalWrite(output_8, (e131.data[7] > 127) ? HIGH : LOW);
    }//end we have data

    } // end void loop

  7. #25
    Join Date
    Dec 2011
    Location
    UK S80 postcode
    Posts
    1,389
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    Hi, your starting to get the hang of this now. Can't wait for the video.

  8. Likes JCook liked this post
  9. #26
    Join Date
    Dec 2013
    Location
    Williamsburg, VA
    Posts
    917
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    Quote Originally Posted by Barnabybear View Post
    Hi, your starting to get the hang of this now. Can't wait for the video.
    Its starting to come together.

    -I have several songs sequenced.
    -I received all of the EL wire, inverters, battery packs
    -tonight my mom helped sew pockets on the back of our sweatshirts to hold the battery, inverter and Wemos boards. We also made show covers to attach the wire oo.

    I can't wait either, i hope to have one of the costumes complete by next weekend and do a complete system check.

    Thanks again for your assistance, I've already paid it forward helping another guy who is doing the same thing as me.

    I'll post of video of my test next weekend (fingers crossed)

    Jay

  10. #27
    Join Date
    Dec 2013
    Location
    Williamsburg, VA
    Posts
    917
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    As I'm building my costumes it be became evident that I needed a good way to test without running a sequence. I created an Access Point sketch that allows me to manually turn the outputs of the El Escudos Dos board on/ff. There is also a button to cycle through all of the outputs. I connect to the Wemos board AP with my phone then pull up web address 192.168.4.1

    This is what the interface looks like. It's simple but works great. I also have a version that connects to my Wifi that runs a Webserver.
    2018-10-14 10.40.47.jpg

  11. #28
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    3,575
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    I use the FPP test page on my raspberry PI or a program called SACNView when my PIs are busy. They both create patterns etc and output E1.31 data to any address you like.


    2019 - Just moved into a new home (yet another change of plans). Will be dim but not dark. Too much to do at the new place to leave time for a show.
    https://www.youtube.com/channel/UCyX...ttrsZNARkUce0Q

  12. #29
    Join Date
    Dec 2013
    Location
    Williamsburg, VA
    Posts
    917
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    Thanks for all of the help guys. Our Costumes were a big hit!

    Here is a video, hope you like it!


  13. Likes critic2 liked this post
  14. #30
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    1,023
    Post Thanks / Like

    Default Re: SparkFun EL Wire Sequencer Shield on Wemos D1

    Suits looked great. loved the outfits.

Page 3 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

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