TungstenVn

Untitled

Jul 8th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. bool temp = ps2x.Button(PSB_PINK);
  2.       Serial.print(temp);
  3.     if(temp != buttons[0]){ //Tay Trái
  4.      if(temp){
  5.        if(!isCloseL){
  6.           Serial.print("Dong");
  7.          digitalWrite(LeftHand,HIGH);
  8.          isCloseL = true;  
  9.        }else{
  10.           Serial.print("Mo");
  11.          digitalWrite(LeftHand,LOW);
  12.          isCloseL = false;
  13.        }
  14.        buttons[0] = temp;
  15.      }else{
  16.       buttons[0] = temp;
  17.      }
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment