README.md
author Tero Marttila <terom@paivola.fi>
Thu, 29 Jan 2015 23:11:44 +0200
changeset 107 05707929ff6f
parent 99 b1f2b34d4f8c
permissions -rw-r--r--
qmsk.web.async: handle HTTPExceptions
## Dependencies
* avrdude
* avra
* picocom
* gcc-avr
* avr-libc

## USB
Configure udev for the `/dev/arduino` symlink.

### /etc/udev/rules.d/09-arduino.rules
    # /dev/arduino
    SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_$attr{serial}"

## Protocol

The protocol used is ASCII with decimal.
Commands are given as a command character, followed by command-specific arguments, and terminated by a newline character.
The implementation supports up to 8 arguments.

### Syntax (EBNF)

    dmx-command:

        cmd { sep arg  } eol

    cmd:
        'a'..'z' | 'A'..'Z'

    arg:
        '0'..'9' [ arg ]

    sep:
        '\t' | ' ' | ','

    eol:
        '\r' | '\n'

### Commands

The output state keeps track of both channel values, as well as the number of active channels. Only the channels up to
the highest active channel are output. Up to 255 channels are supported.

All commands ensure that any modified channels will become active.

#### *c*lear

    c

Reset to initial state, with all channels inactive.

#### *o*ut
    o <value0> ... <valueN>

Set active channels 0..N to given $value0..$valueN. All remaining channels will be marked inactive.

#### *f*ill
    f <start> <end> <value0> ... <valueN>

Set channel $start+0 = $value0, ... $start+N = $valueN, up to $end, repeating $value0..N as needed.

#### *r*ange
    r <start> <stop> <step> <value>

Set channels $start, $start + $step, ..., $end (inclusive) to the given $value.

#### *s*et
    s <start> <value0> ... <valueN>

Set channels start..start+N to the given $value0..$valueN. Ensures channels up to N are valid.

#### *z*ero
    z [<count>]

Set channels 1..$count to zero, and null all following channels.