Page 205 - MDP2020-1
P. 205
················································································ 명장양성프로젝트 【MDP】 과제발표회 자료집 Ⅰ | 199
8. 소프트웨어 작성하기
가. 프로그램 흐름도
나. 노크 감지와 소리 출력을 하기 위한 프로그램 소스
#include <SPI.h>
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
int people = 7;
int knock = 4;
// 시리얼 통신용 Rx, Tx 설정
SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
// DFPlayer 라이브러리
DFRobotDFPlayerMini myDFPlayer;
// 상태 정보를 위한 함수