피에조스피커 썸네일형 리스트형 미니 디지털 피아노 준비물 - piezo 스피커 1개 - 버튼스위치 3개 - 10㏀ 저항 3개 코드 //input Pin 배열 int inputArr[] = {2, 3, 4}; int inputArrSize = sizeof(inputArr)/sizeof(int); //음 배열 int soundArr[] = {262, 294, 330}; int soundArrSize = sizeof(soundArr)/sizeof(int); //piezo 출력 핀 const int outputPiezoPin = 8; void setup() { for(int i=0 ; i< inputArrSize ; i++) { pinMode(inputArr[i], INPUT); } } void loop() { for(int i=0 ; i< soundArrSi.. 더보기 이전 1 다음