Keyestudio 4DOF Manual page 221

Robot mechanical arm kit for arduino diy
Hide thumbs Also See for 4DOF:
Table of Contents

Advertisement

type = ps2x.readType();
switch(type) {
case 0:
Serial.print("Unknown Controller type found ");
break;
case 1:
Serial.print("DualShock Controller found ");
break;
case 2:
Serial.print("GuitarHero Controller found ");
break;
case 3:
Serial.print("Wireless Sony DualShock Controller found ");
break;
}
}
void loop() {
/* You must Read Gamepad to get new values and set vibration values
ps2x.read_gamepad(small motor on/off, larger motor strenght from 0-255)
if you don't enable the rumble, use ps2x.read_gamepad(); with no values
You should call this at least once a second
*/
if(error == 1) //skip loop if no controller found
return;
218

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 4DOF and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF