Example Code for Arduino-Basic Display

Please connect the circuit as shown in the Connection Diagram, then download the sample code to UNO, once uploaded successfully, the flexible display would show.

Hardware Preparation

  • DFRduino UNO R3 (or similar) x 1
  • 7 * 71 Flexible RGB LED Matrix x 1
  • Lightboard Transfer-line x 1

Software Preparation

Wiring Diagram

DFR0597 Flexible RGB LED Matrix 7x71 Connection Diagram

Sample Code

/*!
  * file SerialScreen771.ino
  *
  * Copyright   [DFRobot](http://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() {

}

Result

DFR0597 Flexible RGB LED Matrix 7x71 Expected Results

Was this article helpful?

TOP