This wiki has been archived and made read-only.
For up-to-date information about TkkrLab and it's projects please visit our main website at tkkrlab.nl.

Ledboard

From

Revision as of 17:02, 30 May 2016 by Renze (Talk | contribs) (Protocol)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Project: Ledboard
360x360px
Name Ledboard
Initiator jawsper
Status {{{Status}}}
Skills Arduino, soldering, ethernet
Summary {{{Summary}}}

http://spritesmods.com/?art=ledmatrix&page=1

Hardware

Protocol

Protocol is called LMCP (LedMatrixControlProtocol) Works via UDP port 1337

Command format:
	uint8_t command:	the command
	[uint8_t data ...]:	the data (can be non-existant)
	
Multiple commands can be sent in 1 datagram (optional).
Commands:
	0x01: write buffer, writes the current framebuffer to the screen
		no arguments
	0x02: clear, clears the matrix and writes the current framebuffer to the screen
		no arguments
	0x10: draw rows
		* uint y:
			y position of the row to draw (0-5)
		* uint8_t data[96*8]:
			send the data for 8 rows at a time, position is y * 8
	0x11: draw image rectangle
		* uint8_t x:
			top left x position of pixel data
		* uint8_t y:
			top left y position of pixel data
		* uint8_t width:
			width of pixel data
		* uint8_t height:
			height of pixel data
		* uint8_t data[width * height]:
			pixel data
	0x20: write text line based
		chars are 5x7 -> 6x8 including space and line separation
		* uint8_t x:
			top left x position in chars (0-15)
		* uint8_t y:
			top left y position in chars (0-5)
		* uint8_t brightness:
			brightness of text (0x00-0xFF)
		* [uint8_t text[...]]:
			text (ascii)
		* 0x00:
			terminator
	0x21: write text absolute
		* uint8_t x:
			top left x position in pixels (0-95)
		* uint8_t y:
			top left y position in pixels (0-47)
		* uint8_t brightness:
			brightness of text (0x00-0xFF)
		* [uint8_t text[...]]:
			text (ascii)
		* 0x00:
			terminator
	0x30: draw rows RGB
		* uint y:
			y position of the row to draw (0-5)
		* uint8_t data[MATRIX_WIDTH*8*3]:
 			send the data for 8 rows at a time, position is y * 8
	0x31: draw image rectangle RGB
 		* uint8_t x:
			top left x position of pixel data
		* uint8_t y:
			top left y position of pixel data
		* uint8_t width:
			width of pixel data
		* uint8_t height:
			height of pixel data
		* uint8_t data[MATRIX_WIDTH * MATRIX_HEIGHT * 3]:
			pixel data (RGB24)
	0x32: set compatibility color
		* uint8_t r
		* uint8_t g
		* uint8_t b

Sauce

https://github.com/jawsper/ledboard