16x32 LED Matrix Display Module with Arduino



DIY 16x32 LED Matrix Display Module
https://bit.ly/2VNbR5z

Led Matrix connect to Arduino



LED Matrix library
https://openhardware.ro/mymatrix/


Arduino Sketch


#include "myMATRIX.h"

#define RowA_Pin 2
#define RowB_Pin 3
#define RowC_Pin 4
#define RowD_Pin 5
#define OE_Pin 6 
#define Red_Pin 7 
#define Green_Pin 8 
#define CLK_Pin 9 
#define STB_Pin 10
 
void setup ()
{
     myMatrix.Init(Red_Pin,Green_Pin,CLK_Pin,RowA_Pin,RowB_Pin,RowC_Pin,RowD_Pin,OE_Pin,STB_Pin);
     myMatrix.clearScreen();
 
}   
 
void loop()
{

 myMatrix.clearScreen();

 char scrolltext_1[]="     * HELLO MAKER TUTOR :)";
 char scrolltext_2[]="     * Numbers * 1234567890      ";
 char scrolltext_3[]="     * Capital Letters * ABCDEFGHIJKLMNOPQRSTUVXYZ      ";
 char scrolltext_4[]="     * Small Letters * abcdefghijklmnopqrstuvxyz      ";

 myMatrix.fillRectangle(0,0,31,15,red); delay(1000);
 myMatrix.fillRectangle(0,0,31,15,green); delay(1000);
 myMatrix.fillRectangle(0,0,31,15,yellow); delay(1000);
 myMatrix.drawRectangle(0,0,31,15,red); delay(1000);
 myMatrix.fillRectangle(10,3,21,12,green); delay(1000);
 myMatrix.clearScreen();
 myMatrix.drawHLine(0,31,7,green);
 myMatrix.drawHLine(0,31,15,green);
 myMatrix.drawVLine(0,0,15,yellow);
 myMatrix.drawVLine(31,0,15,yellow);
 myMatrix.printString(2,0,yellow,black,"Maker");
 myMatrix.hScroll(8,red,black,scrolltext_1);
 myMatrix.hScroll(8,black,green,scrolltext_1);
 myMatrix.hScroll(8,red,black,scrolltext_2);
 myMatrix.hScroll(8,red,black,scrolltext_3);
 myMatrix.hScroll(8,red,black,scrolltext_4);
}

ความคิดเห็น