Project:USB Disco Dance Floor/v1/firmware: Difference between revisions

From London Hackspace Wiki

Added basic status/diagnostic commands
(Formatting updates)
(Added basic status/diagnostic commands)
Line 13: Line 13:
!Action
!Action
!width="100"|Min version
!width="100"|Min version
|-
!colspan="3" style="background: #ddd"|Status/Diagnostic Commands
|-
|-
!rowspan="2"|00
!rowspan="2"|00
|'''Reset display'''
|'''Reset'''
|1.0
|1.0
|-
|-
|colspan="2"|Resets the display, initialising all pixels to black.
|colspan="2"|Resets the board to an initial state, with all pixels off. The board sends four bytes representing its hardware and firmware versions (2 bytes each), followed by 2 bytes for hardware details. This command also resets the board ID to 0xFFFF (i.e. unset).
 
The high nybble of the first hardware info byte is the number of different colours supported (0x1, 0x3, or 0x4) and the low nybble is whether sensors are supported (0x1 for yes). The high nybble of the second byete specifies the number of bits needed to specify LED brightness. If this is different for different colours, the firmware will handle scaling. The low nybble does the same for sensor resolution. Note that, for the time being, resolutions should be a power of 2 (0x1, 0x2, 0x4, 0x8).
|-
|-
!rowspan="2"|01
!rowspan="2"|01
Line 24: Line 28:
|1.0
|1.0
|-
|-
|colspan="2"|Asks the device to identify itself. The controller sends its version number as two data bytes: major and minor version. The device will respond with a two-byte code containing its major and minor version. <!-- position? neighbours? -->
|colspan="2"|Informs the board of its two-byte board ID for this session. Note that board IDs 0x0000 and 0xFFFF are reserved. The board will respond with 0x00 (success).
|-
|-
!rowspan="2"|11
!rowspan="2"|02
|'''Update floor'''
|'''Ping'''
|1.0
|1.0
|-
|-
|colspan="2"|Update the entire floor with the given pattern.
|colspan="2"|Checks connectivity with the board. The board will respond with 0x00 (success)
|}
|}
<!--
10: Clear floor
12: Update floor RLE
13: Update row
14: Update row RLE
-->