View Single Post
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#27
Originally Posted by munky261 View Post
Are you sure that that portion is color only, cause it sounds to me that the "30;1;0" portion has nothing to do with the actual timing if I understand it correctly.
Yeah, the Priority;ScreenOnVariable;TimeOut are to do with the pattern as a whole.

Originally Posted by codeMonkey View Post
The basic structure is:
PatternName=Priority;ScreenOnVariable;TimeOut;Red channel pattern;Green channel pattern;Blue channel pattern
PatternCommunicationCall=30;1;0;0000;0000;40007f00017f017f050001ff01ff0000
The timing is set by the coloured sections.
Breaking the blue channel pattern there down further we have 8 instructions for the blue channel pattern, and one instruction for each of the red and green (to do nothing).
4000 7f00 017f 017f 0500 01ff 01ff 0000

What these instructions do is defined in Corwin's post - repasted here for clarity.
Code:
# 0000 -- Jump to the start of the pattern for the channel
# 40xx -- Set channel brightness
# xxyy -- Increment/decrement
#      xx determines the speed;
#         01-3f -- short step time (granularity 0.49ms)
#         41-7f -- long step time (granularity 15.6ms)
#      yy determines the increment/decrement steps
#         00-7f -- increment steps 00 = 0 steps, 7f = 127 steps
#         80-ff -- decrement steps 80 = 0 steps, ff = 127 steps
#
#         Use 0 steps to create pauses
#         Two consecutive increment/decrement sequences are needed
#         to cover the entire range from 0-255
# c000 -- End pattern execution
# e002 -- Send red trigger
# e004 -- Send green trigger
# e008 -- Send blue trigger
# e080 -- Wait for red trigger
# e100 -- Wait for green trigger
# e200 -- Wait for blue trigger
Instruction 1 (4000) Set the channel brightness to 00
Instruction 2 (7f00) Long step time, 00 increment steps

And etc.

Last edited by codeMonkey; 2009-12-22 at 15:54.
 

The Following 3 Users Say Thank You to codeMonkey For This Useful Post: