A compilation of code from different sources to provide support for a Playstation 3 controller via bluetooth on the m3pi.

Dependencies:   TextLCD mbed

Fork of mbed_TANK_PS3 by Yasuhiko YAMAMOTO

Committer:
srsmitherman
Date:
Sun Dec 30 05:16:28 2012 +0000
Revision:
1:ae49669c5e92
Bluetooth PS3 interface for m3pi. User must pair bluetooth dongle address to PS3 controller with other program. Works but needs tweaking.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
srsmitherman 1:ae49669c5e92 1 #include "ps3BT.h"
srsmitherman 1:ae49669c5e92 2
srsmitherman 1:ae49669c5e92 3
srsmitherman 1:ae49669c5e92 4 void PS3BT::decode(const u8* data){
srsmitherman 1:ae49669c5e92 5 ps3report* _ps3report = (ps3report*)data;
srsmitherman 1:ae49669c5e92 6 }
srsmitherman 1:ae49669c5e92 7
srsmitherman 1:ae49669c5e92 8 void PS3BT::dump(const u8* data){
srsmitherman 1:ae49669c5e92 9 ps3report* _ps3report = (ps3report*)data;
srsmitherman 1:ae49669c5e92 10 printf("%3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %4d %4d %4d %4d \r\n",
srsmitherman 1:ae49669c5e92 11 _ps3report->LeftStickX,
srsmitherman 1:ae49669c5e92 12 _ps3report->LeftStickY,
srsmitherman 1:ae49669c5e92 13 _ps3report->RightStickX,
srsmitherman 1:ae49669c5e92 14 _ps3report->RightStickY,
srsmitherman 1:ae49669c5e92 15 _ps3report->PressureUp,
srsmitherman 1:ae49669c5e92 16 _ps3report->PressureRight,
srsmitherman 1:ae49669c5e92 17 _ps3report->PressureDown,
srsmitherman 1:ae49669c5e92 18 _ps3report->PressureLeft,
srsmitherman 1:ae49669c5e92 19 _ps3report->PressureL2,
srsmitherman 1:ae49669c5e92 20 _ps3report->PressureR2,
srsmitherman 1:ae49669c5e92 21 _ps3report->PressureL1,
srsmitherman 1:ae49669c5e92 22 _ps3report->PressureR1,
srsmitherman 1:ae49669c5e92 23 _ps3report->PressureTriangle,
srsmitherman 1:ae49669c5e92 24 _ps3report->PressureCircle,
srsmitherman 1:ae49669c5e92 25 _ps3report->PressureCross,
srsmitherman 1:ae49669c5e92 26 _ps3report->PressureSquare,
srsmitherman 1:ae49669c5e92 27 (_ps3report->AccelX),
srsmitherman 1:ae49669c5e92 28 (_ps3report->AccelY),
srsmitherman 1:ae49669c5e92 29 (_ps3report->AccelZ),
srsmitherman 1:ae49669c5e92 30 (_ps3report->GyroZ));
srsmitherman 1:ae49669c5e92 31 }