Merge branch 'master' into SPI

This commit is contained in:
Kristian Lauszus 2014-08-24 17:31:24 -07:00
commit 36bdfb3a53
3 changed files with 30 additions and 6 deletions

View file

@ -672,10 +672,19 @@ public:
// http://balanduino.net/ // http://balanduino.net/
#define P0 Pd0 /* 0 - PD0 */ #define P0 Pd0 /* 0 - PD0 */
#define P1 Pd1 /* 1 - PD1 */ #define P1 Pd1 /* 1 - PD1 */
#define P2 Pb2 /* 2 - PB2 */
#define P3 Pd6 /* 3 - PD6 */ #if BALANDUINO_REVISION < 13
#define P4 Pd7 /* 4 - PD7 */ #define P2 Pb2 /* 2 - PB2 */
#define P5 Pb3 /* 5 - PB3 */ #define P3 Pd6 /* 3 - PD6 */
#define P4 Pd7 /* 4 - PD7 */
#define P5 Pb3 /* 5 - PB3 */
#else
#define P2 Pd2 /* 2 - PD2 */
#define P3 Pd3 /* 3 - PD3 */
#define P4 Pd6 /* 4 - PD6 */
#define P5 Pd7 /* 5 - PD7 */
#endif
#define P6 Pb4 /* 6 - PB4 */ #define P6 Pb4 /* 6 - PB4 */
#define P7 Pa0 /* 7 - PA0 */ #define P7 Pa0 /* 7 - PA0 */
#define P8 Pa1 /* 8 - PA1 */ #define P8 Pa1 /* 8 - PA1 */
@ -685,8 +694,15 @@ public:
#define P12 Pa5 /* 12 - PA5 */ #define P12 Pa5 /* 12 - PA5 */
#define P13 Pc1 /* 13 - PC1 */ #define P13 Pc1 /* 13 - PC1 */
#define P14 Pc0 /* 14 - PC0 */ #define P14 Pc0 /* 14 - PC0 */
#define P15 Pd2 /* 15 - PD2 */
#define P16 Pd3 /* 16 - PD3 */ #if BALANDUINO_REVISION < 13
#define P15 Pd2 /* 15 - PD2 */
#define P16 Pd3 /* 16 - PD3 */
#else
#define P15 Pb2 /* 15 - PB2 */
#define P16 Pb3 /* 16 - PB2 */
#endif
#define P17 Pd4 /* 17 - PD4 */ #define P17 Pd4 /* 17 - PD4 */
#define P18 Pd5 /* 18 - PD5 */ #define P18 Pd5 /* 18 - PD5 */
#define P19 Pc2 /* 19 - PC2 */ #define P19 Pc2 /* 19 - PC2 */

View file

@ -119,13 +119,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: "));
@ -178,4 +181,5 @@ void loop() {
Serial.print(PS3.getTemperature()); Serial.print(PS3.getTemperature());
} }
} }
#endif
} }

View file

@ -79,6 +79,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());
@ -95,7 +96,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"));
@ -108,4 +111,5 @@ void loop() {
Serial.print(Wii.getAnalogHat(HatY)); Serial.print(Wii.getAnalogHat(HatY));
} }
} }
#endif
} }