작은항해자의 항해

8 Digit 7-Segment Display Module - MAX7219 본문

IT 이야기/IOT 센서

8 Digit 7-Segment Display Module - MAX7219

작은항해자 2019. 1. 23. 17:05

8 Digit 7-Segment Display Module - MAX7219


8자리의 숫자를 표시할 수 있는 디스플레이.

MAX7219 시리얼 드라이버가 장착.

MAX7219 드라이버의 SPI 인터페이스를 이용하여 디스플레이의 제어가 가능.

3.3V나 5V 사용가능.


Size : 82 * 15 * 12 mm(L*W*H)




Schematics Diagram





Doc



Wiring Guide


Code



/*
 
14CORE TEST CODE 8BIT LED TUBE
http://www.14core.com
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
 
*/
 
#include "LedControl.h"
LedControl lc=LedControl(12,11,10,1);
 
void setup()
{
Serial1.begin(9600);
// Initialize the MAX7219
 
Serial.write("14CORE TEST CODE FOR LED MAX7219 LED TUBE");
lc.shutdown(0,false); // To Enable the Display
lc.setIntensity(0,15); // To set the brightness level (0 is min, 15 is max)
lc.clearDisplay(0); // To Clear the display register
//}
}
 
void loop()
{
 
// test afisare un anumit text
lc.clearDisplay(0); // To Clear the display register
 
lc.setDigit(0,7,2, false); // To display the 2 first column on the left (column 7)
lc.setDigit(0,6,5, true); // To display a 5 column 6 and decimal point
lc.setDigit(0,5,4, false); // To display a 4 column 5
lc.setRow(0,4,B1001110);
lc.setDigit(0,2,3, false); // To show the 5 on 2nd
lc.setDigit(0,1,7, false); // To Place a 0 in the column 1
lc.setRow(0,0,B0110111);
 
delay(3000);
 
// fac alt text
lc.clearDisplay(0); // Clear display register
lc.setDigit(0,7,1, false); // To display a 1 at the first column on the left (column 7)
lc.setDigit(0,6,2, false); // To display a 2 column 6 and decimal point
lc.setRow(0,5,B00000001);
lc.setDigit(0,4,4, false); // display a "4" in column 4
lc.setDigit(0,3,2, false); // display a "2" in column 3
lc.setRow(0,2,B00000001);
lc.setDigit(0,1,3, false); // To display a 3 column 1
lc.setDigit(0,0,6, false); // 6 show a first hand column, column 0
 
delay(3000);
 
// fac inca un text
lc.clearDisplay(0); // To Clear the display register
lc.setRow(0,6,B01100010); // "n"
lc.setRow(0,5,B00100000); // "i"
lc.setRow(0,4,B01110011); // "q"
lc.setRow(0,3,B00000001);  
lc.setRow(0,2,B01000010); // "r"
lc.setRow(0,1,B01100011); // "o"  
 
delay(3000); // Delay 3 Seconds
}

 


LedControl.h Code Library : GetHub

LedControl-Max72XX-Code-Library.zip


'IT 이야기 > IOT 센서' 카테고리의 다른 글

HS1101 습도센서  (0) 2019.01.24
Light Intensity Sensor - BH1750FVI, GY-30  (0) 2019.01.24
MH-Z14A CO2 Sensor  (0) 2019.01.21
MH-Z19 CO2 Sensor  (4) 2019.01.21
MH-Z16 적외선 CO2 Sensor  (0) 2019.01.21