https://leetsacademy.blogspot.com/2017/02/32x8-led-dot-matrix-with-max7219-using.html
댓글 1
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
47 | 포르테 네비 먹통 되면... | 씬영! | 2017.08.10 | 1791 |
46 |
아빠
![]() | 아빠 | 2017.11.29 | 1645 |
45 | 교회에 중고등부실, 청년부실에 앰프 스피커 기증 | 아빠 | 2018.03.11 | 1958 |
44 |
(MCU)인터넷 에서 재미 있는것을 배웠다.
![]() | 아빠 | 2018.03.29 | 1617 |
43 |
아빠는 이런거 공부한다~
![]() | 아빠 | 2018.05.03 | 1509 |
42 |
교회 유치부실 스크린 위치 이동
![]() | 아빠 | 2018.05.03 | 1518 |
41 |
울림교회(2018.5.26)
![]() | 아빠 | 2018.05.26 | 1482 |
40 |
rpi rgb matrix
![]() | 아빠 | 2018.06.08 | 1504 |
39 |
드디어! LED SCREEN에 화면이 들어 온다
![]() | 아빠 | 2018.06.28 | 1445 |
38 |
울림교회 내역
![]() | 아빠 | 2018.07.10 | 1424 |
37 | 라즈베리파이로 온습도계 사용하기 | 아빠 | 2018.07.11 | 1503 |
» | 아두이노 Scroll LED BAR 만들기 [1] | 아빠 | 2018.07.11 | 1698 |
35 |
Counter UP program(Arduino)
![]() | 아빠 | 2018.07.23 | 13662 |
34 |
2018.8.1~8.2 만리포 휴가
![]() | 아빠 | 2018.08.03 | 1521 |
33 | PC의 DNS 주소 갱신 | 아빠 | 2018.08.05 | 1512 |
32 |
freq
![]() | 아빠 | 2018.08.18 | 1563 |
31 | 이 산을... | 아빠 | 2018.09.02 | 1537 |
30 | 항상 가장으로서 수고가 많은 아들에게 | 할머니 | 2018.09.15 | 1614 |
29 | kubuntu 18.04 lirc tric | 아빠 | 2018.10.18 | 2102 |
28 | kubuntu 18.04 lirc serial_ir configure [2] | 아빠 | 2018.11.06 | 4766 |
#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.");
}