//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Test P10 /* * Original source code : https://github.com/busel7/DMDESP/blob/master/examples/TeksDiamdanJalan/TeksDiamdanJalan.ino by busel7 * Links to download libraries : https://github.com/busel7/DMDESP */ //----------------------------------------Include Library //----------------------------------------see here: https://www.youtube.com/watch?v=8jMr94B8iN0 to add NodeMCU ESP8266 library and board #include #include #include //---------------------------------------- //----------------------------------------DMD Configuration (P10 Panel) #define DISPLAYS_WIDE 1 //--> Panel Columns #define DISPLAYS_HIGH 1 //--> Panel Rows DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); //--> Number of Panels P10 used (Column, Row) //---------------------------------------- //========================================================================VOID SETUP() void setup() { //----------------------------------------DMDESP Setup Disp.start(); //--> Run the DMDESP library Disp.setBrightness(50); //--> Brightness level Disp.setFont(Mono5x7); //--> Determine the font used //---------------------------------------- } //======================================================================== //========================================================================VOID LOOP() void loop() { Disp.loop(); //--> Run "Disp.loop" to refresh the LED Disp.drawText(4, 0, "UTEH"); //--> Display text "Disp.drawText(x position, y position, text)" Scrolling_Text(9, 50); //--> Show running text "Scrolling_Text(y position, speed);" } //======================================================================== //========================================================================Subroutines for scrolling Text static char *Text[] = {"NodeMCU ESP8266 P10 LED Panel with DMDESP"}; void Scrolling_Text(int y, uint8_t scrolling_speed) { static uint32_t pM; static uint32_t x; int width = Disp.width(); Disp.setFont(Mono5x7); int fullScroll = Disp.textWidth(Text[0]) + width; if((millis() - pM) > scrolling_speed) { pM = millis(); if (x < fullScroll) { ++x; } else { x = 0; return; } Disp.drawText(width - x, y, Text[0]); } } //======================================================================== //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<