Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: I don't know how to write code and could really use a hand with wifi

  1. #1
    Join Date
    Sep 2019
    Posts
    7
    Post Thanks / Like

    Default I don't know how to write code and could really use a hand with wifi

    I have been putting on a show for about 4 years now. I don't know how to write code but am good at putting a lot of other peoples ideas into a really beautiful show. I use both Arduinos and E682B's. This year I would like to build glow suits for my granddaughter and her cheer group. My problem is I can't find code for Arduinos running vixen controlling 5VDC RGB pixels transmitted wirelessly. I have Arduino UNO's, 5 volt pixel lights, NRF24L01 wifi modules and a new laptop. I have found code to operate the pixels with the Uno's and I found code to have 2 NRF24L01's talk to each other. I have no idea how to combine the two. Does anyone have a code that can do it all? Any help will be greatly appreciated. Dee

  2. #2
    Join Date
    Oct 2009
    Posts
    14
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    If Vixen can stream E1.31 wouldn't be possible to use ESPixelSticks (or one of the variants like ESPixelPOPs) to control the Pixels on the performers and send data to them over Wi-Fi?

  3. #3
    Join Date
    Dec 2011
    Posts
    6,371
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    You might want to consider Wled firmware and esp8266 as wireless controller .
    The Wled supports E131 and Serial mode builtin effects .
    A real plus is while using the builtin effects you can sync all the controllers
    without ever needing a sequencer .

  4. #4
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    1,283
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    If the effects you want are not too memory constrained, you could use the NRF24L01 to do a master/slave thing. https://forum.arduino.cc/index.php?topic=421081.0

    What code did you find to operate the pixels? Maybe we can work it up from there.

    Otherwise, a good alternative is to use the ESPixelStick software and broadcast the show.

  5. #5
    Join Date
    Sep 2019
    Posts
    7
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    Try as I might I can't figure out how to post the code here. I would appreciate a quick lesson on how to put it in the box like all the other posters. I understand it's because it's computer language but I can't figure out how to bring up the box to put it in. I'm a newbee.
    Last edited by dwzhigg; 03-28-2020 at 02:25 PM. Reason: not enough information

  6. #6
    Join Date
    Dec 2011
    Posts
    6,371
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    [code] <--- This needs to be before your code .

    or use quotes and change the wording to code .
    Last edited by angus40; 03-28-2020 at 02:52 PM.

  7. #7
    Join Date
    Dec 2011
    Posts
    6,371
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    [/code] <---- this goes a line after .

    or use quotes and change the wording to code
    Last edited by angus40; 03-28-2020 at 02:52 PM.

  8. #8
    Join Date
    Sep 2019
    Posts
    7
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    Here is the code to to have vixen control an arduino uno which operates the pixel lights. It seems to work well. Just need to operate it with wifi.
    Code:
    /*
    
    Vixen Lights 3.x - Arduino Generic Serial for Addressable Pixels
    
    Using this code is pretty straight forward, simply hookup your one wire (WS2811 or WS2812) data line to pin 6 of your Arduino
    and upload this code.  Make sure you have properly installed the FastLED library from http://fastled.io Once you are done, simply
    power your Pixel strips from an external power supply.  Next configure a Generic Serial Controller inside of Vixen Lights 3.x and 
    add 3 x pixels for the number of channels.  Configure the Generic Serial Controller to use 115200, 8, none, and 1.  Then create
    your element and add "Multiple Items (1 x number of pixels).  Finally select your pixel elements and set them as RGB pixels before
    patching them to the controler outputs.  You should now be ready to begin testing.
    
    For a complete tutorial check out blog.huntgang.com
    
    Created   November 8th, 2014
    By        Richard Sloan - www.themindfactory.com
    And       David Hunt - blog.huntgang.com
    Version   1.4
    
    */
    
    
    // You must download and install the library from http://fastled.io/ 
    #include <FastLED.h>
    
    // Sets the maximum number of LEDs that this code will handle to avoid running out of memory
    #define NUM_LEDS 50
    
    // Sets the pin which is used to connect to the LED pixel strip
    #define DATA_PIN 6
    
    CRGB leds[NUM_LEDS];
    
    
    void setup() {
      // Define the speed of the serial port
      Serial.begin(115200);
    }
    
    void loop() {
      // Set some counter / temporary storage variables
      int cnt;
      unsigned int num_leds;
      unsigned int d1, d2, d3;
    
      // Begin an endless loop to receive and process serial data
      for(;;) {
        // Set a counter to 0.  This couter keeps track of the pixel colors received.
        cnt = 0;
        //Begin waiting for the header to be received on the serial bus
        //1st character
        while(!Serial.available());
          if(Serial.read() != '>') {
            continue;
            }
        //second character
        while(!Serial.available());
          if(Serial.read() != '>') {
            continue;
            }
        //get the first digit from the serial bus for the number of pixels to be used
        while(!Serial.available());
          d1 = Serial.read();
        //get the second digit from the serial bus for the number of pixels to be used
        while(!Serial.available());
          d2 = Serial.read();
        //get the third digit from the serial bus for the number of pixels to be used
        while(!Serial.available());
          d3 = Serial.read();
        //get the end of the header
        while(!Serial.available());
          if(Serial.read() != '<') {
            continue;
            }
        while(!Serial.available());
          if(Serial.read() != '<') {
            continue;
            }
        // calculate the number of pixels based on the characters provided in the header digits
        num_leds = (d1-'0')*100+(d2-'0')*10+(d3-'0');
        // ensure the number of pixels does not exceed the number allowed
        if(num_leds > NUM_LEDS) {
          continue;
          }
        // Let the FastLED library know how many pixels we will be addressing
        FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, num_leds);
        // Loop through each of the pixels and read the values for each color
        do {
          while(!Serial.available());
            leds[cnt].r = Serial.read();
          while(!Serial.available());
            leds[cnt].g = Serial.read();
          while(!Serial.available());
            leds[cnt++].b = Serial.read();
          } 
        while(--num_leds);
        // Tell the FastLED Library it is time to update the strip of pixels
        FastLED.show();
        // WOO HOO... We are all done and are ready to start over again!
        }
    }

  9. #9
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    1,283
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    How many pixels on each person? How many people? I don't think NRF is the right technology if you doing pixel outfits and sending data from Vixen.

    You should really think about ESP based devices for any significant data transfers.

  10. #10
    Join Date
    Sep 2019
    Posts
    7
    Post Thanks / Like

    Default Re: I don't know how to write code and could really use a hand with wifi

    Quote Originally Posted by MikeKrebs View Post
    How many pixels on each person? How many people? I don't think NRF is the right technology if you doing pixel outfits and sending data from Vixen.

    You should really think about ESP based devices for any significant data transfers.
    No more than 20 on each person. 5 people. I want to base it on a glow show I saw in Cancun. The pixels were placed in each end of hollow opaque tubes which caused the entire tube to glow. The original code for operating the pixels with arduino's ran by vixen called for 300. I changed it to 50 while testing the code. If you don't think the NRF's can handle 5 suits then I will look into ESP devices. Your opinion means a lot to me. As I said before I don't know how to code.

Page 1 of 3 123 LastLast

Tags for this Thread

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
  •