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__
32 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);
35 * set the display's display buffer and number, the buffer's size must be not less than 512 * number / 8 bytes
36 * @param displaybuf display buffer
37 * @param number panels' number
39 void begin(uint8_t *displaybuf, uint16_t width, uint16_t height);
45 * @param pixel 0: led off, >0: led on
47 void drawPoint(uint16_t x, uint16_t y, uint8_t pixel);
51 * @param (x1, y1) top-left position
52 * @param (x2, y2) bottom-right position, not included in the rect
53 * @param pixel 0: rect off, >0: rect on
55 void drawRect(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t pixel);
59 * @param (xoffset, yoffset) top-left offset of image
60 * @param (width, height) image's width and height
61 * @param pixels contents, 1 bit to 1 led
63 void drawImage(uint16_t xoffset, uint16_t yoffset, uint16_t width, uint16_t height, const uint8_t *image);
66 * Set screen buffer to zero
71 * turn off 1/16 leds and turn on another 1/16 leds
77 uint8_t *offscreen_buffer();
88 uint8_t clk, r1, stb, oe, a, b, c, d;