2 * LED Matrix library for http://www.seeedstudio.com/depot/ultrathin-16x32-red-led-matrix-panel-p-1582.html
3 * The LED Matrix panel has 32x16 pixels. Several panel can be combined together as a large screen.
5 * Coordinate & Connection (Arduino -> panel 0 -> panel 1 -> ...)
7 * +--------+--------+--------+ +--------+--------+
8 * | 5 | 4 | 3 | | 1 | 0 |
9 * | | | | | | |<----- Arduino
10 * +--------+--------+--------+ +--------+--------+
11 * | 2 | 1 | 0 | (64, 16)
12 * | | | |<----- Arduino
13 * +--------+--------+--------+
15 * Copyright (c) 2013 Seeed Technology Inc.
22 #ifndef __LED_MATRIX_H__
23 #define __LED_MATRIX_H__
29 LEDMatrix(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t oe, uint8_t r1, uint8_t stb, uint8_t clk);
32 * set the display's display buffer and number, the buffer's size must be not less than 512 * number / 8 bytes
33 * @param displaybuf display buffer
34 * @param number panels' number
36 void begin(uint8_t *displaybuf, uint16_t width, uint16_t height);
42 * @param pixel 0: led off, >0: led on
44 void drawPoint(uint16_t x, uint16_t y, uint8_t pixel);
48 * @param (x1, y1) top-left position
49 * @param (x2, y2) bottom-right position, not included in the rect
50 * @param pixel 0: rect off, >0: rect on
52 void drawRect(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t pixel);
56 * @param (xoffset, yoffset) top-left offset of image
57 * @param (width, height) image's width and height
58 * @param pixels contents, 1 bit to 1 led
60 void drawImage(uint16_t xoffset, uint16_t yoffset, uint16_t width, uint16_t height, const uint8_t *image);
63 * Set screen buffer to zero
68 * turn off 1/16 leds and turn on another 1/16 leds
81 uint8_t clk, r1, stb, oe, a, b, c, d;