8x8 dot matrix(MAX7219): 두 판 사이의 차이
(Created page with "{{#seo:|title=아두위키 : 아두이노 8x8 도트매트릭스(8x8 dot matrix, MAX7219)|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 8x8 도트매트릭스, 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 8x8 도트매트릭스를 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다. 8x8 도트매트릭스...") |
잔글편집 요약 없음 |
||
| (같은 사용자의 중간 판 2개는 보이지 않습니다) | |||
| 1번째 줄: | 1번째 줄: | ||
{{#seo:|title= | {{#seo:|title=ArduWiki: Arduino 8x8 Dot Matrix (8x8 dot matrix, MAX7219)|title_mode=append|keywords=Arduino, Information Science, Maker Learning, Performance Evaluation, 8x8 Dot Matrix, Arduino Projects, Capstone Projects, Arduino Example Code|description=Introduces how to control an 8x8 dot matrix with Arduino (basic information, circuit, example code). Can be used in Information Science and Maker classes. 8x8 dot matrix (8x8 dot matrix, MAX7219)}} | ||
[[File:도트매트릭스대표이미지.jpg|center|class=coders100]] | [[File:도트매트릭스대표이미지.jpg|center|class=coders100]] | ||
This is a component composed of an 8x8 grid of LEDs. | This is a component composed of an 8x8 grid of LEDs. | ||
| 6번째 줄: | 6번째 줄: | ||
Multiple dot matrix modules can be daisy-chained together. | Multiple dot matrix modules can be daisy-chained together. | ||
== '''Specifications''' == | == '''Specifications''' == | ||
| 11번째 줄: | 12번째 줄: | ||
* Operating Voltage: 5V | * Operating Voltage: 5V | ||
* Operating Current: 320mA ~ 2A | * Operating Current: 320mA ~ 2A | ||
== '''Required Hardware''' == | == '''Required Hardware''' == | ||
| 16번째 줄: | 18번째 줄: | ||
* Dot Matrix Module | * Dot Matrix Module | ||
* Arduino | * Arduino | ||
== '''Connections''' == | == '''Connections''' == | ||
| 69번째 줄: | 72번째 줄: | ||
* LedControl | * LedControl | ||
* [[Arduino Libraries]] | * [[Arduino Libraries]] | ||
== '''Example Code''' == | == '''Example Code''' == | ||
2025년 3월 20일 (목) 20:40 기준 최신판

This is a component composed of an 8x8 grid of LEDs.
It utilizes the MAX7219, allowing control with just 3 pins besides the power pin.
Multiple dot matrix modules can be daisy-chained together.
Specifications
- Operating Voltage: 5V
- Operating Current: 320mA ~ 2A
Required Hardware
- Dot Matrix Module
- Arduino
Connections
- Connections required to run the example code
| Dot matrix | Arduino |
| VCC | 5V |
| GND | GND |
| DIN | D12 |
| CS | D11 |
| CLK | D10 |

- Connecting more than one dot matrix
| Left Dot Matrix | Right Dot Matrix |
| VCC | VCC |
| GND | GND |
| DOUT | DIN |
| CLK | CLK |
| CS | CS |

Library
- LedControl
- Arduino Libraries
Example Code
#include "LedControl.h" // Library call for using the dot matrix
#define dataIn 12 // Use pin 12 for DIN
#define cs 11 // Use pin 11 for CS
#define clk 10 // Use pin 10 for CLK
LedControl lc = LedControl(dataIn, clk, cs, 1); // LedControl('DIN pin number', 'CLK pin number', 'CS pin number', 'number of dot matrices')
void setup() {
lc.shutdown(0, false); // Code to wake up the dot matrix. shutdown('address of the dot matrix to specify', 'false: wake up')
lc.setIntensity(0, 8); // Set brightness. setIntensity('address of the dot matrix to specify','brightness value (0~15)')
lc.clearDisplay(0); // Initialization before use. clearDisplay('address of the dot matrix to specify')
}
void loop() // Blink the dot matrix for 1 second.
{
// Turn on the LEDs of the dot matrix.
for (int row = 0; row < 8; row++)
{
for (int col = 0; col < 8; col++)
{
lc.setLed(0, col, row, true);
}
}
delay(1000);
// Turn off the LEDs of the dot matrix.
for (int row = 0; row < 8; row++)
{
for (int col = 0; col < 8; col++)
{
lc.setLed(0, col, row, false);
}
}
delay(1000);
}