3000浏览
楼主: 驴友花雕

【花雕动手做】有趣好玩的音乐可视化(30)--P6 LED单元板

[复制链接]

驴友花雕  中级技神
 楼主|

发表于 2022-11-15 15:10:39

实验接线图

【花雕动手做】有趣好玩的音乐可视化(30)--P6 LED单元板图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-11-15 15:31:07

HUB75接口,是个兼容大部分市面LED单元板的通用型接口,具体接线定义有些不同,比如HUB75B\HUB75E等。

这次自制的扩展板,只是专门匹配Arduino UNO开发板的专用板,由于性能限制,最多只能使用32x16,或者32x32的简单控制。

下一张扩展板,准备尝试搭配ESP32开发板,以适应大部分P5\P4\P3的单元板模组,主要规格可能有32x32\64x32\64x64,还有128x64等。




【花雕动手做】有趣好玩的音乐可视化(30)--P6 LED单元板图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-11-15 15:39:52

  【花雕动手做】有趣好玩的音乐可视化系列项目(30)--P6LED单元板
  项目程序之二:点亮P6单元板——显示图形与文字

  1. /*
  2.   【花雕动手做】有趣好玩的音乐可视化系列项目(30)--P6LED单元板
  3.   项目程序之二:点亮P6单元板——显示图形与文字
  4. */
  5. #include <Adafruit_GFX.h>   
  6. #include <RGBmatrixPanel.h>
  7. #define CLK 8  
  8. #define LAT A3
  9. #define OE  9
  10. #define A   A0
  11. #define B   A1
  12. #define C   A2
  13. RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);
  14. void setup() {
  15.   matrix.begin();
  16. }
  17. void loop() {
  18.   // draw a pixel in solid white
  19.   matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7));
  20.   delay(500);
  21.   // fix the screen with green
  22.   matrix.fillRect(0, 0, 32, 16, matrix.Color333(0, 7, 0));
  23.   delay(500);
  24.   // draw a box in yellow
  25.   matrix.drawRect(0, 0, 32, 16, matrix.Color333(7, 7, 0));
  26.   delay(500);
  27.   // draw an 'X' in red
  28.   matrix.drawLine(0, 0, 31, 15, matrix.Color333(7, 0, 0));
  29.   matrix.drawLine(31, 0, 0, 15, matrix.Color333(7, 0, 0));
  30.   delay(500);
  31.   // draw a blue circle
  32.   matrix.drawCircle(7, 7, 7, matrix.Color333(0, 0, 7));
  33.   delay(500);
  34.   // fill a violet circle
  35.   matrix.fillCircle(23, 7, 7, matrix.Color333(7, 0, 7));
  36.   delay(500);
  37.   // fill the screen with 'black'
  38.   matrix.fillScreen(matrix.Color333(0, 0, 0));
  39.   // draw some text!
  40.   matrix.setCursor(1, 0);   
  41.   matrix.setTextSize(1);   
  42.   // print each letter with a rainbow color
  43.   matrix.setTextColor(matrix.Color333(7, 0, 0));
  44.   matrix.print('1');
  45.   matrix.setTextColor(matrix.Color333(7, 4, 0));
  46.   matrix.print('6');
  47.   matrix.setTextColor(matrix.Color333(7, 7, 0));
  48.   matrix.print('x');
  49.   matrix.setTextColor(matrix.Color333(4, 7, 0));
  50.   matrix.print('3');
  51.   matrix.setTextColor(matrix.Color333(0, 7, 0));
  52.   matrix.print('2');
  53.   matrix.setCursor(1, 9);   // next line
  54.   matrix.setTextColor(matrix.Color333(0, 7, 7));
  55.   matrix.print('*');
  56.   matrix.setTextColor(matrix.Color333(0, 4, 7));
  57.   matrix.print('R');
  58.   matrix.setTextColor(matrix.Color333(0, 0, 7));
  59.   matrix.print('G');
  60.   matrix.setTextColor(matrix.Color333(4, 0, 7));
  61.   matrix.print('B');
  62.   matrix.setTextColor(matrix.Color333(7, 0, 4));
  63.   matrix.print("*");
  64.   delay(5000);
  65. }
复制代码


回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-11-15 15:51:14

实验场景图

【花雕动手做】有趣好玩的音乐可视化(30)--P6 LED单元板图1

回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-11-15 15:54:33

本帖最后由 驴友花雕 于 2022-11-15 15:58 编辑

实验场景图  动态图

【花雕动手做】有趣好玩的音乐可视化(30)--P6 LED单元板图1
LED模组会轮流显示:一个白点、全屏绿色、全屏黄色、一个黄色的矩形框、一个红色的X、一个蓝色的圆、一个填充紫圆、英文字。


回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2022-11-15 17:24:19

【花雕动手做】有趣好玩的音乐可视化(30)--P6 LED单元板图1
回复

使用道具 举报

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

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail