Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: software for static control over individual pixels

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

    Default Re: software for static control over individual pixels

    Arduino code untested but compiles. Uses FastLed and 3 buttons. This is not for ESP8266-01 but should work with Uno, Mega, Nano, etc.
    Code:
    #include <FastLED.h>
    
    // How many leds are in the strip?
    const int NUM_LEDS = 100;
    
    // Data pin that led data will be written out over
    const int DATA_PIN = 3;
    const int BUTTON_PIN_1 = 4;     // pushbutton pin #1
    const int BUTTON_PIN_2 = 5;     // pushbutton pin #2
    const int BUTTON_PIN_3 = 6;     // pushbutton pin #3
    
    int buttonState = 0;          // is button pushed?
    CRGB leds[NUM_LEDS];          // This is an array of leds
    
    void setup() {
      // sanity check delay - allows reprogramming if accidently blowing power w/leds
      delay(2000);
      FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
      // initialize the pushbutton pins as an input:
      pinMode(BUTTON_PIN_1, INPUT);
      pinMode(BUTTON_PIN_2, INPUT);
      pinMode(BUTTON_PIN_3, INPUT);
    }
    
    // This function runs over and over, and is where you do the magic to light
    // your leds.
    void loop() {
      // read the state of the pushbutton value:
      buttonState = digitalRead(BUTTON_PIN_1);
      if (buttonState == HIGH) {
        // turn LED 1 blue
        leds[0] = CRGB::Blue;
      } else {
        leds[0] = CRGB::Black;
      }
      buttonState = digitalRead(BUTTON_PIN_2);
      if (buttonState == HIGH) {
        // turn LED 15 red
        leds[14] = CRGB::Red;
      } else {
        leds[14] = CRGB::Black;
      }
    
      buttonState = digitalRead(BUTTON_PIN_3);
      if (buttonState == HIGH) {
        // turn LED 46 green
        leds[45] = CRGB::Green;
      } else {
        leds[45] = CRGB::Black;
      }
      FastLED.show();
    
      // Wait a little bit
      delay(50);
    
    }

  2. #12
    Join Date
    May 2020
    Posts
    14
    Post Thanks / Like

    Default Re: software for static control over individual pixels

    Thank you for the info. Wled is loaded and works great with the ucs1903. The sequences are fun but was looking for more of a setting for accent lighitng. When the house is complete i'll have some peaks in the front roof line that i want to have a symetrical light pattern. Not just a 2 on 2 off pattern. 2 in peak and 2 on each side. So if I could just pick particular lights as I'm looking at it with my tablet, that would be ideal.

  3. #13
    Join Date
    May 2020
    Posts
    14
    Post Thanks / Like

    Default Re: software for static control over individual pixels

    thank you Angus, I just got a second pixel stick in the mail so I'll try and figure out how to load this code next week and see if I can get something happening.

  4. #14
    Join Date
    Dec 2011
    Posts
    7,002
    Post Thanks / Like

    Default Re: software for static control over individual pixels

    Hi jasonlynn

    That is great you verified the ucs1903 pixels work with WLED . More good news is WLED supports e1.31 so you would be able to simply load Artnet/Artnet lite App on your phone which has features that enable you to turn on/off each pixel independently to any color you like .

  5. #15
    Join Date
    Nov 2016
    Posts
    20
    Post Thanks / Like

    Default Re: software for static control over individual pixels

    My OpenRGB software can do what you want. It's mainly designed for RGB computer hardware (keyboards, mice, parts, etc) but it can output E1.31 to control other devices like pixel controllers and smart bulbs. The latest release 0.4 adds a graphical view of the LEDs where you can click on one or more LEDs and apply a color. You can save profiles as well. It also has an SDK where you can control it from other software and is capable of receiving E1.31 via an SDK app I wrote for it. This allows it to act as an E1.31 router of sorts where you can send E1.31 from your sequencer into OpenRGB and then out to devices. This allows you to monitor the current colors in the OpenRGB UI as well as controll non-E1.31 devices with E1.31 software. It supports both Windows and Linux.

    https://gitlab.com/CalcProgrammer1/OpenRGB

    https://gitlab.com/CalcProgrammer1/OpenRGBE131Receiver

    You can see how to set up E1.31 outputs here:

    https://gitlab.com/CalcProgrammer1/O.../-/wikis/E1.31

  6. #16
    Join Date
    Jun 2020
    Posts
    3
    Post Thanks / Like

    Default Re: software for static control over individual pixels

    Quote Originally Posted by jasonlynn View Post
    ... Wled is loaded and works great ... i want to have a symetrical light pattern. Not just a 2 on 2 off pattern. 2 in peak and 2 on each side. So if I could just pick particular lights as I'm looking at it with my tablet, that would be ideal.
    If I understand correctly, you have 50 LEDs on one side, 50 LEDs on the other, and you want them to stay mirrored.

    Presuming you are loading WLED UI in normal (not PC) mode:
    1. From default page, select "Segments" tab on bottom of UI
    2. Expand "Segment 0" in the UI
    3. If you've already configured it for 100 LEDs, the values should already be mostly correct, but ...
    4. Set "START LED" to zero, "STOP LED" to 100
    5. Set "GROUPING" to one, "SPACING" to zero
    6. Enable the checkbox for "Mirror effect" ... this will give you the symmetry you desire
    7. Now, at the bottom of the UI, select the "Effects" tab
    8. Choose any effect, and watch it automatically get mirror'd across your LEDs!

    Enjoy!


    WLED also has a decent REST API, and very exhaustive JSON API, if you want more granular control.

    And as others have mentioned, you can always switch to using E.131, if the above isn't enough.

Page 2 of 2 FirstFirst 12

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
  •