README.md
changeset 99 b1f2b34d4f8c
parent 47 7f930a94ee1e
equal deleted inserted replaced
98:e743c905cbf5 99:b1f2b34d4f8c
    10 
    10 
    11 ### /etc/udev/rules.d/09-arduino.rules
    11 ### /etc/udev/rules.d/09-arduino.rules
    12     # /dev/arduino
    12     # /dev/arduino
    13     SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_$attr{serial}"
    13     SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_$attr{serial}"
    14 
    14 
       
    15 ## Protocol
       
    16 
       
    17 The protocol used is ASCII with decimal.
       
    18 Commands are given as a command character, followed by command-specific arguments, and terminated by a newline character.
       
    19 The implementation supports up to 8 arguments.
       
    20 
       
    21 ### Syntax (EBNF)
       
    22 
       
    23     dmx-command:
       
    24 
       
    25         cmd { sep arg  } eol
       
    26 
       
    27     cmd:
       
    28         'a'..'z' | 'A'..'Z'
       
    29 
       
    30     arg:
       
    31         '0'..'9' [ arg ]
       
    32 
       
    33     sep:
       
    34         '\t' | ' ' | ','
       
    35 
       
    36     eol:
       
    37         '\r' | '\n'
       
    38 
       
    39 ### Commands
       
    40 
       
    41 The output state keeps track of both channel values, as well as the number of active channels. Only the channels up to
       
    42 the highest active channel are output. Up to 255 channels are supported.
       
    43 
       
    44 All commands ensure that any modified channels will become active.
       
    45 
       
    46 #### *c*lear
       
    47 
       
    48     c
       
    49 
       
    50 Reset to initial state, with all channels inactive.
       
    51 
       
    52 #### *o*ut
       
    53     o <value0> ... <valueN>
       
    54 
       
    55 Set active channels 0..N to given $value0..$valueN. All remaining channels will be marked inactive.
       
    56 
       
    57 #### *f*ill
       
    58     f <start> <end> <value0> ... <valueN>
       
    59 
       
    60 Set channel $start+0 = $value0, ... $start+N = $valueN, up to $end, repeating $value0..N as needed.
       
    61 
       
    62 #### *r*ange
       
    63     r <start> <stop> <step> <value>
       
    64 
       
    65 Set channels $start, $start + $step, ..., $end (inclusive) to the given $value.
       
    66 
       
    67 #### *s*et
       
    68     s <start> <value0> ... <valueN>
       
    69 
       
    70 Set channels start..start+N to the given $value0..$valueN. Ensures channels up to N are valid.
       
    71 
       
    72 #### *z*ero
       
    73     z [<count>]
       
    74 
       
    75 Set channels 1..$count to zero, and null all following channels.