https://leetsacademy.blogspot.com/2017/02/32x8-led-dot-matrix-with-max7219-using.html
댓글 1
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
47 | 더뉴카니발 LED 헤드램프 제습제 품번 | 아빠 | 2025.01.23 | 27 |
46 |
연합 수련회
![]() | 아빠 | 2024.07.30 | 272 |
45 | 더뉴카니발 사이드미러 품번 | 아빠 | 2024.06.17 | 411 |
44 |
그대 아무 걱정 하지 말아요(캘리연습)
![]() | 아빠 | 2022.09.04 | 584 |
43 |
raspberry pi zero를 이용한 Home Switch 프로그램
![]() | 아빠 | 2022.01.05 | 1007 |
42 | python2에서 python3으로 바뀌면서 pi relay board 코드 수정 | 아빠 | 2021.05.03 | 1382 |
41 |
봄이 지나 철쭉이 피지만
![]() | 아빠 | 2021.04.22 | 1250 |
40 | 네트워크 기능이 없는 프린터 raspberry pi + cups + xinetd를 이용하여 9100 포트 생성하기 | 아빠 | 2021.04.22 | 20770 |
39 |
더뉴카니발 와이퍼 리필 고무 품번
![]() | 아빠 | 2021.01.05 | 1447 |
38 | 서버 오류 수리 완료 | 아빠 | 2020.12.01 | 1384 |
37 | 삼식이가 하늘로 가다 | 아빠 | 2020.09.10 | 1345 |
36 |
카니발 주행거리
![]() | 아빠 | 2020.07.06 | 1375 |
35 | 더뉴카니발 YP2020 트위터 케이블 [1] | 아빠 | 2020.07.06 | 1497 |
34 | 라즈베리 파이를 이용한 경고등 켜지게 하는 프로그램 [3] | 아빠 | 2020.06.15 | 1493 |
33 | 전화(노트8) 통화 먹통 | 아빠 | 2020.05.08 | 1377 |
32 |
카봇퍼즐
![]() | 아빠 | 2019.12.15 | 1504 |
31 | 서버 하드가 망가졌어요 | 아빠 | 2019.12.15 | 1481 |
30 | 세탁기 소스 | 아빠 | 2019.11.27 | 16874 |
29 |
Adios! Amigo! Bonjour enchate!
[1] ![]() | 아빠 | 2019.09.20 | 25310 |
28 |
싱크대 조명
![]() | 아빠 | 2019.08.28 | 1686 |
#include "dht.h"
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>
//pin 11 is connected to the DataIn
//pin 13 is connected to the CLK
//pin 10 is connected to SC
//pin 7 is connected to DHT11 Data
dht DHT;
//LED Define.
int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK
int numberOfHorizontalDisplays = 1;
int numberOfVerticalDisplays = 4;
Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays);
int spacer = 1;
int width = 5 + spacer; // The font width is 5 pixels
void setup()
{
//LED Setup
matrix.setIntensity(0.5); // Use a value between 0 and 15 for brightness
// Adjust to your own needs
// matrix.setPosition(0, 0, 0); // The first display is at <0, 0>
// matrix.setPosition(1, 1, 0); // The second display is at <1, 0>
// matrix.setPosition(2, 2, 0); // The third display is at <2, 0>
// matrix.setPosition(3, 3, 0); // And the last display is at <3, 0>
// ...
// matrix.setRotation(0, 2); // The first display is position upside down
matrix.setRotation(1); // The same hold for the last display
}
void print_led(String tape)
{
// Print LED
for ( int i = 0 ; i < width * tape.length() + matrix.width() - 1 - spacer; i++ ) {
matrix.fillScreen(LOW);
int letter = i / width;
int x = (matrix.width() - 1) - i % width;
int y = (matrix.height() - 8) / 2; // center the text vertically
while ( x + width - spacer >= 0 && letter >= 0 ) {
if ( letter < tape.length() ) {
matrix.drawChar(x, y, tape[letter], HIGH, LOW, 1);
}
letter--;
x -= width;
}
matrix.write(); // Send bitmap to display
delay(100);
}
}
void loop()
{
String tape = "Ready.";
DHT.read11(7);
int humidity = int(DHT.humidity); /* Get humidity value */
int temperature = int(DHT.temperature); /* Get temperature value */
print_led("Temperature:" + String(temperature) + "℃ Humidity:" + String(humidity) + "%");
print_led("Today is Beautiful. Have a NiceDay.");
}