Project:USB Disco Dance Floor/v1/firmware: Difference between revisions
From London Hackspace Wiki
416 bytes removed
, 4 April 2011
|
|
Line 62: |
Line 62: |
| |1.2? | | |1.2? |
| |- | | |- |
| |colspan="2"|??? | | |colspan="2"|Asks the board to search for its immediate neighbours. The board will respond with 8 bytes representing the two-byte IDs of its neighbours, starting with its "top" connection and proceeding clockwise. If no neighbour is found in a given position, 0x0000 is returned. If a neighbour is found but it has not been given an identifier for this session, it will return 0xFFFF. |
| | |
| | This should allow the controller software to automatically detect the layout of the floor. |
| |- | | |- |
| !rowspan="2"|0E | | !rowspan="2"|0E |
Line 269: |
Line 271: |
| | (0,1), (1,0)) | | | (0,1), (1,0)) |
|
| |
|
|
| |
| Co-ordinates
| |
| ------------
| |
|
| |
| Co-ordinates are specified as four two-bit values packed into a single byte:
| |
| xxyywwhh
| |
|
| |
| Scroll spec
| |
| -----------
| |
|
| |
| A scroll spec is specified as two two-bit values plus two one-bit values
| |
| packed into a single byte: xxyy0w0h. The scroll amount in the X and Y axes is
| |
| set by xx and yy, and if w/h are one the direction is reversed.
| |
|
| |
| Colour specification
| |
| --------------------
| |
|
| |
| The board will report how many colours it supports at reset time. One colour
| |
| will be referred to here as "R", three as "RGB" and four as "RGBU". The board
| |
| also sends the number of bits that it can use for setting each colour
| |
| brightness (n). Combining these parameters gives us a colour specification.
| |
|
| |
| The colour spec consists of n bits of R, followed by n bits of G, B and U (as
| |
| appropriate). If the number of bits is not a multiple of 8, it will be
| |
| right-padded with zeroes.
| |
| --> | | --> |