7x71_Flexible_RGB_LED_Matrix.JPG

简介

新型771RGB软屏,采用7*71颗灯珠组成,主要用于背包、酒瓶、衣服、腰带、表带、帽子、手镯;该LED柔性屏软屏,灯珠紧凑美观,亮度高,性能稳定,板面简洁,美观,生产方便,故障率低,是灯饰亮化的理想设计选择。

技术规格

引脚说明

7x71 Flexible RGB LED Matrix

名称 功能描述
VCC 电源正极
GND 电源负极
RX 串口输入
TX 串口输出

引脚说明

函数库列表

设置显示信息

函数原型:void displayMessage(const char *message_)

例:

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();
    /*Display string "DFRobot"*/
    screen.displayMessage("DFRobot");
}

void loop() {

}

设置信息列表

函数原型:bool setMessageList(uint8_t banN, const char *message_);bool setMessageList(eBanner_t banN, const char *message_);

例:

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);
const char *s = "DFRobot";

const char* M1 = "DFRobot";       //"A"
const char* M2 = "<CRY>DFRobot";  //"B"
const char* M3 = "Hi!";           //"C"
const char* M4 = "<CRY>Hello!";   //"D"
const char* M5 = "World!";        //"E"
const char* M6 = "66";            //"F"
const char* M7 = "77";            //"G"
const char* M8 = "88";            //"H"


void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();
    /*Send 8 information lists to the serial screen*/
    screen.setMessageList(1 << 0, M1);
    screen.setMessageList(1 << 1, M2);
    screen.setMessageList(1 << 2, M3);
    screen.setMessageList(1 << 3, M4);
    screen.setMessageList(1 << 4, M5);
    screen.setMessageList(1 << 5, M6);
    screen.setMessageList(1 << 6, M7);
    screen.setMessageList(1 << 7, M8);
    /* Prints a list of "DFRobot" in the message list, and the data of the M0 message list*/
    screen.displayBanner(1 << 0);
    /*Print data of M8 information list*/
    //screen.displayBanner(1 << 7);
    /*Print data for M1 and M8 information lists*/
    //screen.displayBanner(1 << 0 | 1 << 7);
    /*Display all information lists for M1~M8*/
    //screen.displayBanner(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7);
}

void loop() {

}

设置移动方式

函数原型:bool setMoveMode(eMoveMode_t m_);

例:

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();

    delay(5);
    /*Display string "DFRobot"*/
    screen.displayMessage("DFRobot");
    /*Set the move mode to hold*/
    /*eMoveMode_t: eMoveLeft = left
                   eMoveRight = right
                   eMoveHold = hold
                   eMoveDown = down
                   eMoveUp = up
                   eMoveFlash = flash
    */
    screen.setMoveMode(screen.eMoveHold);
}

void loop() {
    /*Switch a mobile display mode every 5s*/
    DFRobot_SerialScreen771::eMoveMode_t buf[]= {screen.eMoveLeft,screen.eMoveRight,screen.eMoveHold,screen.eMoveDown,screen.eMoveUp,screen.eMoveFlash};
    for(int i = 0; i < sizeof(buf)/sizeof(DFRobot_SerialScreen771::eMoveMode_t); i++){
        screen.setMoveMode(buf[i]);
        delay(5000);
    }
}

设置移动速度

函数原型:bool setMoveSpeed(eSpeedLevel_t s_)

例:

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();

    delay(5);
    /*Display string "DFRobot"*/
    screen.displayMessage("DFRobot");
    /*Set the display's movement mode to shift left*/
    screen.setMoveMode(screen.eMoveLeft);
    /*Set the displayed moving speed level*/
    /*eBrightLevel_t: eSpeedLevel_1 = Speed class 1
                      eSpeedLevel_2 = Speed class 2
                      eSpeedLevel_3 = Speed class 3
                      eSpeedLevel_4 = Speed class 4
                      eSpeedLevel_5 = Speed class 5
                      eSpeedLevel_6 = Speed class 6
                      eSpeedLevel_7 = Speed class 7
                      eSpeedLevel_8 = Speed class 8
    */
    screen.setMoveSpeed(screen.eSpeedLevel_1);
}

void loop() {

}

设置显示亮度

函数原型:bool setBrightness(eBrightLevel_t b_)

例:

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    // Initialize communication interface (Serial1) and debug interface (Serial)
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();

    // Display string "DFRobot"
    screen.displayMessage("DFRobot");
    // Set the brightness level of the display
    /*eBrightLevel_t: eBrightLevel_1 = Brightness level 1
                      eBrightLevel_2 = Brightness level 2
                      eBrightLevel_3 = Brightness level 3
                      eBrightLevel_4 = Brightness level 4
                      eBrightLevel_5 = Brightness level 5
                      eBrightLevel_6 = Brightness level 6
                      eBrightLevel_7 = Brightness level 7
                      eBrightLevel_8 = Brightness level 8
    */
    screen.setBrightness(screen.eBrightLevel_1);
}

void loop() {
}

设置显示颜色

函数原型:bool setDispalyColor(eColorMode_t font, eColorMode_t shading);

例:

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();

    delay(5);
    /*Display string "DFRobot"*/
    screen.displayMessage("DFRobot");
    /*Set the string to display the background and font color, set it to red on the black background*/
    screen.setDispalyColor(screen.eColorRed, screen.eColorBlack);
}

void loop() {
    /*Switch one font color every 5s*/
    DFRobot_SerialScreen771::eColorMode_t backgroud,font;
    backgroud = screen.eColorBlack;
    DFRobot_SerialScreen771::eColorMode_t buf[]= {screen.eColorRed, screen.eColorYellow, screen.eColorGreen, screen.eColorCyan, screen.eColorBlue, screen.eColorPurple, screen.eColorWhite};
    for(int i = 0; i < sizeof(buf)/sizeof(DFRobot_SerialScreen771::eColorMode_t); i++){
        font = buf[i];
        screen.setDispalyColor(font, backgroud);
        delay(5000);
} 
}

设置全屏颜色

函数原型:bool setFullScreenColor(eColorMode_t color_);

例:

#include <Arduino.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();
    /*Set screen color*/
    /*eColorMode_t: eColorRed = red
                    eColorYellow = yellow
                    eColorGreen = green
                    eColorCyan = cyan
                    eColorBlue = blue
                    eColorPurple = purple
                    eColorWhite = white
                    eColorBlack = black
    */
    screen.setFullScreenColor(screen.eColorBlack);
}

void loop() {
    /*Switch one screen color every 5s*/
    DFRobot_SerialScreen771::eColorMode_t buf[]= {screen.eColorRed, screen.eColorYellow, screen.eColorGreen, screen.eColorCyan, screen.eColorBlue, screen.eColorPurple, screen.eColorWhite,screen.eColorBlack};
    for(int i=0; i < sizeof(buf)/sizeof(DFRobot_SerialScreen771::eColorMode_t); i++){
        screen.setFullScreenColor(buf[i]);
        delay(5000);
} 
}

Arduino平台应用

按照引脚说明连接好硬件,并下载样例代码到UNO中,上传成功,即可看到软屏的彩色显示效果。

准备

接线图

样例代码

点击下载库文件库和例程下载库安装参考

/*!
  * file SerialScreen771.ino
  *
  * Copyright   [DFRobot](https://www.dfrobot.com), 2016
  * Copyright   GNU Lesser General Public License
  *
  * version  V1.1
  * date  2022-1-24
  */

#include <Arduino.h>
#include <HardwareSerial.h>
#include <SoftwareSerial.h>
#include "DFRobot_SerialScreen771.h"

#ifdef ARDUINO_AVR_UNO
SoftwareSerial Serial1(2, 3); //RX, TX
#endif

DFRobot_SerialScreen771 screen(Serial1);

void setup() {
    /*Initialize communication interface (Serial1) and debug interface (Serial)*/
    Serial.begin(115200);
    Serial1.begin(19200);
    screen.begin();
    /*Set the brightness level of the display*/
    screen.setBrightness(screen.eBrightLevel_8);
    /*Set the move mode to hold*/
    screen.setMoveMode(screen.eMoveHold);
    /*Display string "DFRobot"*/
    screen.displayMessage("DFRobot");
    /*Set the string to display the background and font color, set it to red on the black background*/
    screen.setDispalyColor(screen.eColorRed, screen.eColorBlack);
}

void loop() {

}

显示效果

Mind+(基于Scratch3.0)图形化编程

1、下载及安装软件。下载地址:https://mindplus.cc 详细教程:Mind+基础wiki教程-软件下载安装

2、软件右上角切换开关,切换到“上传模式”。 详细教程:Mind+基础wiki教程-上传模式编程流程

3、“扩展”中选择“主控板”中的“Arduino Uno”。“用户库”中搜索柔性屏并加载。 详细教程:Mind+基础wiki教程-加载扩展库流程

4、进行编程,程序如下图:

5、菜单“连接设备”,“上传到设备”

常见问题

还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们! 更多问题及有趣的应用,可以 访问论坛 进行查阅或发帖。

DFshopping_car1.png DFRobot商城购买链接