极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 23673|回复: 15

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

[复制链接]
发表于 2013-3-1 23:21:57 | 显示全部楼层 |阅读模式
论坛有朋友有用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/


[pre lang="arduino" line="1" file="32*32"]// 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 OE  51
#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 OE  10
//#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
}[/code]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复

使用道具 举报

 楼主| 发表于 2013-3-1 23:28:30 | 显示全部楼层
还是我接线的问题,现在可以了,PS:这个接5V电源的,我没有接电源,直接arduino驱动
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-1 23:43:36 | 显示全部楼层
又发现问题,没有蓝色,正在试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-1 23:51:43 | 显示全部楼层
好了,一定记得外接电源哦,不然电流不够,蓝色驱动不了
回复 支持 反对

使用道具 举报

发表于 2013-3-2 00:04:50 | 显示全部楼层
16块8x8才100多?哪买的啊,求PM地址
回复 支持 反对

使用道具 举报

发表于 2013-3-2 00:09:23 | 显示全部楼层
求PM地址+1
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-2 00:11:25 | 显示全部楼层
要什么地址?LED?
再上一张图,完美了!准备研究库和程序!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-2 00:14:38 | 显示全部楼层
X宝,搜 ,全彩单元板!我这块是P5的,还要P7.6,P6,P4,P10等,就是led之间的间距多少MM,然后有一种3钟颜色的焊在一起的,那种不要,效果近看不好的,一定要RGB表贴的!企鹅707727664
回复 支持 反对

使用道具 举报

发表于 2013-3-2 00:30:51 | 显示全部楼层
可以滚动 吗?
回复 支持 反对

使用道具 举报

发表于 2013-3-2 00:48:10 | 显示全部楼层
本帖最后由 pww999 于 2013-3-2 11:15 编辑

将括号那些数字循环+1 后最归位使其滚动?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-2 00:57:53 | 显示全部楼层
有库文件的,显示外文和一些图型效果很简单的,其他正在研究中
回复 支持 反对

使用道具 举报

发表于 2013-3-5 09:54:24 | 显示全部楼层
这个很不错!
回复 支持 反对

使用道具 举报

发表于 2013-3-5 09:54:27 | 显示全部楼层
这个很不错!
回复 支持 反对

使用道具 举报

发表于 2013-3-5 16:41:12 | 显示全部楼层
求笔记本支架...
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-7 21:20:50 | 显示全部楼层
HP扩展坞 100多块 X宝有
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-10 04:34 , Processed in 0.083614 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表