BASIC4MCU | 질문게시판 | 아두이노 컴파일 오류
페이지 정보
작성자 고기민 작성일2019-02-11 13:58 조회1,072회 댓글0건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=7699
본문
int piezo = 7;
int button1 = 12;
int button2 = 3;
int button3 = 4;
#define A 262
#define B 294
#define C 330
#define D 349
#define E 392
#define F 440
#define G 466
#define H 523
int melody1[] = {C,B,A,B,C,C,C,B,B,B,C,E,E,C,B,A,B,C,C,C,B,B,C,B,A};
int tempo1[] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
int button[] = {2,3,12};
void setup() {
pinMode(piezo,OUTPUT);
pinMode(button1,INPUT);
pinMode(button2,INPUT);
pinMode(button3,INPUT);
for (int i = 0; i < 25; i++){
int tempo = 250 *tempo1[i];
button1 = digitalRead(button1);
if(button1==HIGH){
tone(piezo, melody1[i], tempo1);
delay(tempo1[i]);
noTone(piezo);}
}}
이게 코드입니다(미완성)C:\Users\rhrla\AppData\Local\Temp\ccaxtaaP.ltrans0.ltrans.o: In function `main':C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'collect2.exe: error: ld returned 1 exit statusexit status 1보드 Arduino/Genuino Uno 컴파일 에러.이게 오류메세지입니다
댓글 0
조회수 1,072등록된 댓글이 없습니다.