Disable some of the functions in PS3BT and Wii library examples so it always compile on Arduino Uno

This commit is contained in:
Kristian Lauszus 2014-08-24 17:26:49 -07:00
parent 8cf054cd61
commit 980109f756
2 changed files with 8 additions and 0 deletions

View file

@ -118,13 +118,16 @@ void loop() {
printAngle = !printAngle; printAngle = !printAngle;
} }
} }
#if 0 // Set this to 1 in order to see the angle of the controller
if (printAngle) { if (printAngle) {
Serial.print(F("\r\nPitch: ")); Serial.print(F("\r\nPitch: "));
Serial.print(PS3.getAngle(Pitch)); Serial.print(PS3.getAngle(Pitch));
Serial.print(F("\tRoll: ")); Serial.print(F("\tRoll: "));
Serial.print(PS3.getAngle(Roll)); Serial.print(PS3.getAngle(Roll));
} }
#endif
} }
#if 0 // Set this to 1 in order to enable support for the Playstation Move controller
else if (PS3.PS3MoveConnected) { else if (PS3.PS3MoveConnected) {
if (PS3.getAnalogButton(T)) { if (PS3.getAnalogButton(T)) {
Serial.print(F("\r\nT: ")); Serial.print(F("\r\nT: "));
@ -177,4 +180,5 @@ void loop() {
Serial.print(PS3.getTemperature()); Serial.print(PS3.getTemperature());
} }
} }
#endif
} }

View file

@ -78,6 +78,7 @@ void loop() {
Serial.print(F("\r\nB")); Serial.print(F("\r\nB"));
} }
} }
#if 0 // Set this to 1 in order to see the angle of the controllers
if (printAngle) { if (printAngle) {
Serial.print(F("\r\nPitch: ")); Serial.print(F("\r\nPitch: "));
Serial.print(Wii.getPitch()); Serial.print(Wii.getPitch());
@ -94,7 +95,9 @@ void loop() {
Serial.print(Wii.getNunchuckRoll()); Serial.print(Wii.getNunchuckRoll());
} }
} }
#endif
} }
#if 0 // Set this to 1 if you are using a Nunchuck controller
if (Wii.nunchuckConnected) { if (Wii.nunchuckConnected) {
if (Wii.getButtonClick(Z)) if (Wii.getButtonClick(Z))
Serial.print(F("\r\nZ")); Serial.print(F("\r\nZ"));
@ -107,4 +110,5 @@ void loop() {
Serial.print(Wii.getAnalogHat(HatY)); Serial.print(Wii.getAnalogHat(HatY));
} }
} }
#endif
} }