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

Thread: Single cheap relay with Uno

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

    Default Re: Single cheap relay with Uno

    In Vixen controller setup, add a Generic Serial. Right click and configure:
    Capture.PNG
    There is a spot to set the header. Click the box and type in the header. The button to set com port and speed is right above on that screen as well. You will want to set that to the speed in the Arduino code.

    The data packet for on will look like this (without the spaces and | ):
    | ! | " | # | x'FF'
    the data packet for off will look like this:
    | ! | " | # | x'0'
    the x'FF' is the hex representation of the full on byte. This byte comes from the "ON" or "OFF" setting you use in the sequencer. The Arduino code as currently set will interpret any value greater than decimal 48 as on and any value below 49 as off. So, say you put a really slow ramp on the relay circuit. Vixen will send
    !"#x'0' and your lights will be off because the value of the data byte is 0 - which is not greater than decimal 48.
    !"#x'1'
    !"#x'2'
    etc all the way to
    !"#x'FF'
    After 49 packets (0-48) are sent, the controller will receive from Vixen
    !"#x'31'
    x'31' is the UINT number 49 or the ascii character value 1. This will turn the lights on and they will stay on all the way until end of the slow ramp.
    Hex/Dec/Glyph are what the Wikipedia call them https://en.wikipedia.org/wiki/ASCII

    You know what, with one channel you don't really care about syncing. So you could just rip out all the header code and just run in the loop...
    readSequenceData();
    outputToLights();
    If you decide to do this...do not add a header to the Vixen controller setup.

  2. #12
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    1,206
    Post Thanks / Like

    Default Re: Single cheap relay with Uno

    We cross posted but congratulations! You got the blinky to work!

  3. #13
    Join Date
    Oct 2018
    Posts
    20
    Post Thanks / Like

    Default Re: Single cheap relay with Uno

    Quote Originally Posted by MikeKrebs View Post
    In Vixen controller setup, add a Generic Serial. Right click and configure:
    Capture.PNG
    There is a spot to set the header. Click the box and type in the header. The button to set com port and speed is right above on that screen as well. You will want to set that to the speed in the Arduino code.

    The data packet for on will look like this (without the spaces and | ):
    | ! | " | # | x'FF'
    the data packet for off will look like this:
    | ! | " | # | x'0'
    the x'FF' is the hex representation of the full on byte. This byte comes from the "ON" or "OFF" setting you use in the sequencer. The Arduino code as currently set will interpret any value greater than decimal 48 as on and any value below 49 as off. So, say you put a really slow ramp on the relay circuit. Vixen will send
    !"#x'0' and your lights will be off because the value of the data byte is 0 - which is not greater than decimal 48.
    !"#x'1'
    !"#x'2'
    etc all the way to
    !"#x'FF'
    After 49 packets (0-48) are sent, the controller will receive from Vixen
    !"#x'31'
    x'31' is the UINT number 49 or the ascii character value 1. This will turn the lights on and they will stay on all the way until end of the slow ramp.
    Hex/Dec/Glyph are what the Wikipedia call them https://en.wikipedia.org/wiki/ASCII

    You know what, with one channel you don't really care about syncing. So you could just rip out all the header code and just run in the loop...
    readSequenceData();
    outputToLights();
    If you decide to do this...do not add a header to the Vixen controller setup.
    Thanks Mike. I'll need to chew on this some to see if I can comprehend it fully. I do only have a single channel, but I intend to have many more in the future, so I would rather learn the nuts and bolts so I can reassemble the program myself if needed.
    I appreciate you taking the time to explain. My apologies for the extended response time. We moved that weekend, which, as it always is, was a complete fiasco.

    Mac

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
  •