BASIC4MCU | 질문게시판 | 답변 : 아두이노 if문 관련 질문 드립니다 ㅜㅜ
페이지 정보
작성자 master 작성일2019-06-10 10:07 조회3,361회 댓글0건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=9292
본문
// MCU BASIC: https://www.basic4mcu.com// DateTime : 2019-06-10 오전 10:14:33// by Ok-Hyun Park//int ret,voice=0,old=0;//void setup(){}//void loop(){if(millis()-t>=100){ t=millis();ret=myVR.recognize(buf,50);if((ret>0)&&(buf[1]>0)){voice=buf[1];if(old!=voice){ old=voice;if (voice== 4){ digitalWrite(LED_Y,LOW); } // Turn OFF Ledelse if(voice== 3){ digitalWrite(LED_Y,HIGH); } // Turn ON Ledelse if(voice==17){ digitalWrite(LED_Y,HIGH); } // Turn ON Ledelse if(voice==18){ digitalWrite(LED_Y,HIGH); } // Turn ON LedSerial.println(voice);}}}}
댓글 0
조회수 3,361등록된 댓글이 없습니다.