tuvas 发表于 2013-3-1 23:21:57

2560驱动 RGB 32*32,16*32单元板

论坛有朋友有用arduino来驱动RGB32*32,或者16*32单元板的吗?请求指导哦!
为了找1.8TFT的资料进了一个国外的网站,看到有玩RGB的,点亮了很漂亮,然后淘宝看一下Arduino Colorduino好贵呀,而且单个共阳的RGB点阵也好贵最便宜的都十几块,去年做工程用过RGB单元板,就想着这个便宜呀,7千多一个平方,单点一毛多一点,32*32才一百多,刚好那个国外网站有相关的教程和库,就搞了一块32*32的百来块,晚上到了点亮了,因为我用的是2560不是教程上UNO照着改好pin接好线,点亮了,能出来字但是有多出来的像素点显示,自己摸了一个下午还是这样,请问有没有坛友玩过的,可以指导一下吗?不胜感激!

就是下面那样:










国外网站:http://learn.adafruit.com/32x16-32x32-rgb-led-matrix/


// testshapes demo for RGBmatrixPanel library.
// Demonstrates the drawing abilities of the RGBmatrixPanel library.
// For 32x32 RGB LED matrix.

#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library

// If your 32x32 matrix has the SINGLE HEADER input,
// use this pinout:
#define CLK 50// MUST be on PORTB!
#define OE51
#define LAT 52
#define A   A0
#define B   A1
#define C   A2
#define D   A3
// If your matrix has the DOUBLE HEADER input, use:
//#define CLK 8// MUST be on PORTB!
//#define LAT 9
//#define OE10
//#define A   A3
//#define B   A2
//#define C   A1
//#define D   A0
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);

void setup() {

matrix.begin();

// draw a pixel in solid white
matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7));
delay(500);

// fix the screen with green
matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 7, 0));
delay(500);

// draw a box in yellow
matrix.drawRect(0, 0, 32, 32, matrix.Color333(7, 7, 0));
delay(500);

// draw an 'X' in red
matrix.drawLine(0, 0, 31, 31, matrix.Color333(7, 0, 0));
matrix.drawLine(31, 0, 0, 31, matrix.Color333(7, 0, 0));
delay(500);

// draw a blue circle
matrix.drawCircle(10, 10, 10, matrix.Color333(0, 0, 7));
delay(500);

// fill a violet circle
matrix.fillCircle(21, 21, 10, matrix.Color333(7, 0, 7));
delay(500);

// fill the screen with 'black'
matrix.fillScreen(matrix.Color333(0, 0, 0));

// draw some text!
matrix.setCursor(1, 0);    // start at top left, with one pixel of spacing
matrix.setTextSize(1);   // size 1 == 8 pixels high
matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves

matrix.setTextColor(matrix.Color333(7,7,7));
matrix.println(" Ada");
matrix.println("fruit");

// print each letter with a rainbow color
matrix.setTextColor(matrix.Color333(7,0,0));
matrix.print('3');
matrix.setTextColor(matrix.Color333(7,4,0));
matrix.print('2');
matrix.setTextColor(matrix.Color333(7,7,0));
matrix.print('x');
matrix.setTextColor(matrix.Color333(4,7,0));
matrix.print('3');
matrix.setTextColor(matrix.Color333(0,7,0));
matrix.println('2');

matrix.setTextColor(matrix.Color333(0,7,7));
matrix.print('*');
matrix.setTextColor(matrix.Color333(0,4,7));
matrix.print('R');
matrix.setTextColor(matrix.Color333(0,0,7));
matrix.print('G');
matrix.setTextColor(matrix.Color333(4,0,7));
matrix.print("B");
matrix.setTextColor(matrix.Color333(7,0,4));
matrix.print("*");

// whew!
}

void loop() {
// do nothing
}

tuvas 发表于 2013-3-1 23:28:30

还是我接线的问题,现在可以了,PS:这个接5V电源的,我没有接电源,直接arduino驱动

tuvas 发表于 2013-3-1 23:43:36

又发现问题,没有蓝色,正在试:'(

tuvas 发表于 2013-3-1 23:51:43

好了,一定记得外接电源哦,不然电流不够,蓝色驱动不了

Micky 发表于 2013-3-2 00:04:50

16块8x8才100多?哪买的啊,求PM地址

pww999 发表于 2013-3-2 00:09:23

求PM地址+1

tuvas 发表于 2013-3-2 00:11:25

要什么地址?LED?
再上一张图,完美了!准备研究库和程序!

tuvas 发表于 2013-3-2 00:14:38

X宝,搜 ,全彩单元板!我这块是P5的,还要P7.6,P6,P4,P10等,就是led之间的间距多少MM,然后有一种3钟颜色的焊在一起的,那种不要,效果近看不好的,一定要RGB表贴的!企鹅707727664

pww999 发表于 2013-3-2 00:30:51

可以滚动 吗?

pww999 发表于 2013-3-2 00:48:10

本帖最后由 pww999 于 2013-3-2 11:15 编辑

将括号那些数字循环+1 后最归位使其滚动?

tuvas 发表于 2013-3-2 00:57:53

有库文件的,显示外文和一些图型效果很简单的,其他正在研究中

Randy 发表于 2013-3-5 09:54:24

这个很不错!

Randy 发表于 2013-3-5 09:54:27

这个很不错!

soulinah 发表于 2013-3-5 16:41:12

求笔记本支架...

tuvas 发表于 2013-3-7 21:20:50

HP扩展坞 100多块 X宝有
页: [1] 2
查看完整版本: 2560驱动 RGB 32*32,16*32单元板