1 Star 0 Fork 0

DFRobot/DFRobot_RGBMatrix

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

DFRobot_RGBMatrix

这是一个Arduino IDE库,简化RGB灯板的使用,方便使用控制RGB灯板。

Product Image

产品链接 (https://www.dfrobot.com.cn/goods-1504.html)

SKU: DFR0499

目录

概述

这是一个Arduino IDE库,简化RGB灯板的使用,方便使用控制RGB灯板。

库安装

使用此库前,请首先下载库文件,将其粘贴到\Arduino\libraries目录中,然后打开examples文件夹并在该文件夹中运行演示。

方法

  /**
   * @fn customizeZH
   * @brief 汉字显示输出
   * @param arr 显示控制
   * @param fontSize 字体大小(只有16、32和64三个选项)  
   * @param x x轴
   * @param y  y轴
   * @param color  颜色
   */ 	
  void customizeZH(const uint8_t *arr, uint8_t fontSize, uint8_t x, uint8_t y, uint16_t color);

  /**
   * @fn begin
   * @brief init function
   * @return None
   */ 
  void  begin(void);
	
  /**
   * @fn drawPixel
   * @brief 像素点绘制
   * @param x 像素X坐标
   * @param y 像素Y坐标
   * @param c 像素颜色
   */ 
  void drawPixel(int16_t x, int16_t y, uint16_t c);

  /**
   * @fn fillScreen
   * @brief 屏幕颜色填充
   * @param c 填充得颜色
   * @return None 
   */
  void fillScreen(uint16_t c);

  /**
   * @brief 
   * @param copy
   * @return None 
   */
  void swapBuffers(boolean copy);

  /**
   * @fn dumpMatrix
   * @brief 将显示的数据转到串口数据
   * @return None
   */
  void dumpMatrix(void);

  /**
   * @fn backBuffer
   * @brief Return address of back buffer
   * @return Return address of back buffer
   */
  uint8_t* backBuffer(void);

  /**
   * @fn Color333
   * @brief 将RGB333转换为RGB565
   * @param r 红色
   * @param g 绿色
   * @param b 蓝色
   * @return 返回转换后颜色
   */
  uint16_t  Color333(uint8_t r, uint8_t g, uint8_t b);

  /**
   * @fn Color444
   * @brief 将RGB444转换为RGB565
   * @param r 红色
   * @param g 绿色
   * @param b 蓝色
   * @return 返回转换后颜色
   */
  uint16_t  Color444(uint8_t r, uint8_t g, uint8_t b);

  /**
   * @fn Color888
   * @brief 将RGB888转换为RGB565
   * @param r 红色
   * @param g 绿色
   * @param b 蓝色
   * @return 返回转换后颜色
   */
  uint16_t  Color888(uint8_t r, uint8_t g, uint8_t b);

  /**
   * @fn Color888
   * @brief 将RGB888转换为RGB565
   * @param r 红色
   * @param g 绿色
   * @param b 蓝色
   * @param gflag 是否颜色矫正
   * @return 返回转换后颜色
   */
  uint16_t  Color888(uint8_t r, uint8_t g, uint8_t b, boolean gflag);

  /**
   * @fn ColorHSV
   * @brief 设置颜色饱和度
   * @param hue 色调
   * @param sat 饱和度
   * @param val 亮度值
   * @param gflag 是否颜色矫正
   * @return 返回转换后颜色
   */
  uint16_t  ColorHSV(long hue, uint8_t sat, uint8_t val, boolean gflag);

  /**
   * @fn updateDisplay
   * @brief 显示计算
   * @return None
   */
  void updateDisplay(void);

兼容性

MCU Work Well Work Wrong Untested Remarks
Mega2560

版本

  • 2017/03/22 - V1.0.0版本
  • 2022/03/23 - V1.0.1版本

创作者

Written by Tangjie (jie.tang@dfrobot.com), 2022. (Welcome to our website)

Copyright 2010 DFRobot Co.Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dfrobot/DFRobot_RGBMatrix.git
git@gitee.com:dfrobot/DFRobot_RGBMatrix.git
dfrobot
DFRobot_RGBMatrix
DFRobot_RGBMatrix
master

搜索帮助