You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.8 KiB
78 lines
1.8 KiB
void but ()
|
|
{b=0;
|
|
switch( button1.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 1");
|
|
b=1;
|
|
break;
|
|
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 1");
|
|
b=11;
|
|
break;
|
|
}
|
|
switch( button2.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 2");
|
|
b=2;
|
|
break;
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 2");
|
|
b=12;
|
|
break;
|
|
}
|
|
switch( button3.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 3");
|
|
b=3;
|
|
break;
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 3");
|
|
b=13;
|
|
break;
|
|
}
|
|
switch( button4.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 4");
|
|
b=4;
|
|
break;
|
|
case SB_LONG_CLICK:
|
|
Serial.println("Long press button 4");
|
|
break;
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 4");
|
|
b=14;
|
|
break;
|
|
}
|
|
switch( button5.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 5");
|
|
b=5;
|
|
break;
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 5");
|
|
b=15;
|
|
break;
|
|
}
|
|
switch( button6.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 6");
|
|
b=6;
|
|
break;
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 6");
|
|
b=16;
|
|
break;
|
|
}
|
|
switch( button7.Loop() ){
|
|
case SB_CLICK:
|
|
Serial.println("Press button 7");
|
|
b=7;
|
|
break;
|
|
case SB_AUTO_CLICK:
|
|
Serial.println("Auto press button 7");
|
|
b=17;
|
|
break;
|
|
}
|
|
|
|
}
|
|
|