Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool temp = ps2x.Button(PSB_PINK);
- Serial.print(temp);
- if(temp != buttons[0]){ //Tay Trái
- if(temp){
- if(!isCloseL){
- Serial.print("Dong");
- digitalWrite(LeftHand,HIGH);
- isCloseL = true;
- }else{
- Serial.print("Mo");
- digitalWrite(LeftHand,LOW);
- isCloseL = false;
- }
- buttons[0] = temp;
- }else{
- buttons[0] = temp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment