We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
새로운 기능 추가
전역변수 영역
#define Motion_button 12 #define ZoomIn_button 11 #define Drawing_button 10 #define Next_Page_button 9 #define Back_Page_button 8 #define Speaker 7 // <------------------- 스피커 출력 핀 번호 #define Lazer_button 6 #define key_press_delay 30 #define mouse_press_delay 50 #define Hardware_delay 10 #define SPEAKER_DURATION 100 //<------------------------- 음 길이 #define LOCK_DRURATION 200
tone API 사용 tone(핀번호, 주파수[Hz단위], 음 길이)
if(digitalRead(Next_Page_button) == LOW && lock == 0){ packet = packet + "*"; packet = packet + DATA_PASSPAGE; packet = packet + "/"; packet = packet + X ; packet = packet + "/"; packet = packet + Y; packet = packet + "/"; packet = packet + "*"; Serial1.println(packet); lock_check = true; lock++; tone(Speaker, 2000, SPEAKER_DURATION); //<-------- tone API 사용 }
줌인아웃/ 도로잉 기능은 구분하기 위해서 소리 변화를 줌
else if(digitalRead(ZoomIn_button) == LOW && lock == 0){ //ZoomIn Function packet = packet + "*"; packet = packet + DATA_ZOOMIN; packet = packet + "/"; packet = packet + X ; packet = packet + "/"; packet = packet + Y; packet = packet + "/"; packet = packet + "*"; Serial1.println(packet); lock++; zoomin_flag = ~zoomin_flag + 2; lock_check = true; if(sound_effect == true){ tone(Speaker, 1000, SPEAKER_DURATION); sound_effect = false; } else{ tone(Speaker, 2000, SPEAKER_DURATION); sound_effect = true; } }
#define DATA_PASSPAGE 4 #define DATA_BACKPAGE 5
구현
airpointer.ino
if(digitalRead(Next_Page_button) == LOW && lock == 0){ //Click Function packet = packet + "*"; packet = packet + DATA_PASSPAGE; packet = packet + "/"; packet = packet + X ; packet = packet + "/"; packet = packet + Y; packet = packet + "/"; packet = packet + "*"; Serial1.println(packet); lock_check = true; lock++; tone(Speaker, 2000, SPEAKER_DURATION); } else if(digitalRead(Back_Page_button) == LOW && lock == 0){ //Click Function packet = packet + "*"; packet = packet + DATA_BACKPAGE; packet = packet + "/"; packet = packet + X ; packet = packet + "/"; packet = packet + Y; packet = packet + "/"; packet = packet + "*"; Serial1.println(packet); lock_check = true; lock++; tone(Speaker, 1000, SPEAKER_DURATION); }
bridge.ino
case DATA_PASSPAGE: Mouse.click(MOUSE_LEFT); delay(500); break; case DATA_BACKPAGE: Keyboard.press('p'); delay(key_press_delay); Keyboard.release('p'); delay(500); break;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
새로운 기능 추가
전역변수 영역
tone API 사용 tone(핀번호, 주파수[Hz단위], 음 길이)
줌인아웃/ 도로잉 기능은 구분하기 위해서 소리 변화를 줌
구현
airpointer.ino
bridge.ino
The text was updated successfully, but these errors were encountered: