본문내용
'B', 'c', 'd', 'e','f','g','a','b'};
unsigned int frequencies[] = {258, 291, 326, 347, 193, 218, 243, 274, 309, 366, 413, 463};
const byte noteCount = sizeof(noteNames);
char score[] ="CCCCCGGAAA ACBBBAAGGGGABBBBCDDDCBBBDDCCCC GACDCCC CGAAA ACBBBB AAAGGG";
const byte scoreLen = sizeof(score);
void setup()
{
}
void loop()
{
for(int i = 0; i < scoreLen ; i++ )
{
int duration = 500;
playNote(score[i], duration);
}
delay(4000);
}
void playNote(char note, int duration)
{
for(int i=0; i < noteCount; i++)
{
if(noteNames[i] == note)
tone(speakerPin, frequencies[i], duration);
}
delay(duration);
}
unsigned int frequencies[] = {258, 291, 326, 347, 193, 218, 243, 274, 309, 366, 413, 463};
const byte noteCount = sizeof(noteNames);
char score[] ="CCCCCGGAAA ACBBBAAGGGGABBBBCDDDCBBBDDCCCC GACDCCC CGAAA ACBBBB AAAGGG";
const byte scoreLen = sizeof(score);
void setup()
{
}
void loop()
{
for(int i = 0; i < scoreLen ; i++ )
{
int duration = 500;
playNote(score[i], duration);
}
delay(4000);
}
void playNote(char note, int duration)
{
for(int i=0; i < noteCount; i++)
{
if(noteNames[i] == note)
tone(speakerPin, frequencies[i], duration);
}
delay(duration);
}
추천자료
컴퓨터 구조의 개념
문제중심 학습을 적용한 중등 컴퓨터 수업 설계
재비기의 컴퓨터설계
컴퓨터 부품 설계 및 업그레이드
컴퓨터 구조론 프로젝트 CPU 시뮬레이터
[컴퓨터공학의이해] 프로젝트설계서- 홈오토메이션 개발계획서
[하이퍼미디어]하이퍼미디어의 의미, 하이퍼미디어의 이론적 배경, 하이퍼미디어의 구조, 하...
플래쉬 공정의 컴퓨터 설계
마이크로컴퓨터설계 제안서, 8051컨트롤러, 초음파센서이용 거리측정 제안서
컴퓨터 네트워크 및 실습 - RDT 3.0 설계 및 구현 내용 project-2 (Design and Implementatio...
디지털 논리와 컴퓨터 설계 4판 솔루션
전자전기컴퓨터설계실험 - 실험 장비 사용법 및 RLC회로 분석
[조직체행동개발] 조직구조적 행동개발(직무 재설계(job redesign), 목표관리 조직개발, 사회...
컴퓨터 구조와 운영체제 - 컴퓨터 꾸미기
소개글