Author Topic: ps3 controller  (Read 7034 times)

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
ps3 controller
« on: March 27, 2014, 04:25:20 AM »
This discussion started on kickstarter but is probably should be in this forum . Basically I can not connect a new PS3 dual shock controller to the Balanduino . The process is turn the Balanduino on and insert the Bluetooth dongle
wait a bit the remove the dongle and connect the PS3 using a usb cable wait a bit remove the usb cable and reinsert the dongle and wait. Then I press the PS button to start  the  controller the 4 leds flash and then turn off but nothing else happens.The other buttons do not function . The Balanduino otherwise works but he PS3 controller is the best
interface for a class room.
Any help appreciated. Yours Fred

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 132
    • View Profile
Re: ps3 controller
« Reply #1 on: March 27, 2014, 01:30:55 PM »
Hi Fred,

It's good to hear that you and your students enjoy the Balanduino :)

Are you able to compile the code? Please follow these instructions: http://balanduino.net/get-started.
After that you need to enable debugging in the USB Host library: https://github.com/felis/USB_Host_Shield_2.0#enable-debugging.
This will allow me to see what is going on.

Regards
Lauszus

Ahmed

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: ps3 controller
« Reply #2 on: March 27, 2014, 08:02:50 PM »
here are the steps i used to get mine working:
  • turn on the balanduino with the Bluetooth dongle connected.
  • wait for a few seconds till the leds on the balanduino start flashing on and off steadily
  • remove the dongle from the balanduino (while power is still on)
  • connect the PS3 controller TO THE SAME USB PORT that the dongle was connected to using a USB to USB Mini cable. (while power is still on)
  • wait for a few seconds, you'll notice the LEDs on the controller will start flashing rapidly.
  • remove the PS3 controller.
  • reconnect the Bluetooth dongle.
  • turn off balanduino

now the controller should be paired to the balanduino usb dongle and you shouldn't have to repeat those steps again unless you sync the controller back to a PS3. If you press the PS home button on the controller after you turn on the balanduino it should sync and the controller will vibrate for a second to confirm that syncing is successful. By the way it sometimes takes a couple of tries to sync.
« Last Edit: March 27, 2014, 08:07:38 PM by Ahmed »

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ps3 controller
« Reply #3 on: March 28, 2014, 06:12:17 AM »

  Thanks for the replies . When I turn on the balanduino with the dongle in place  the green led turns on and stays on. The yellow led flashes twice then stays off  and there is one beep . I did not notice the blinking yellow led until Ahmed's comment. This sequence does not change if the dongle is removed.
  The yellow light is clearly flashing at the end of the construction video .
 Lauszus if you could give me a bit of help with directory  placement I would be happy to do a recompile with debug.The last paragraph of the getting started link does not make sense to me .What does  the -- 'firmware' folder-- refer to? The Readme.md file in the Firmware directory of the Balanduino_latest.zip shows a file structure for the sketchbook directory which does not work . Specifically the balanduino is not listed in the choice of boards . I have tried the arduino-1.0.5-r2 and arduino-1.5.6-r2 with the same results.
 I must be missing something simple, generally I am not so clueless.
Thanks Fred

Ahmed

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: ps3 controller
« Reply #4 on: March 28, 2014, 01:10:23 PM »
note that the balanduino should be turned on while laying down flat on either of its sides. and you're correct it should then turn on the green LED, beep once (short beep) and then the orange LED should keep blinking on and off if the dongle is connected to indicate that its waiting for bluetooth connection.

to turn on USB debugging, edit this file inside your arduino sketchbook "\libraries\USB_Host_Shield_20\settings.h" and change

Code: [Select]
#define ENABLE_UHS_DEBUGGING 0
to

Code: [Select]
#define ENABLE_UHS_DEBUGGING 1
save it, and then recompile and upload.
« Last Edit: March 28, 2014, 05:23:32 PM by Ahmed »

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ps3 controller
« Reply #5 on: March 28, 2014, 11:59:27 PM »
 Lauszus and Ahmed,

Thanks again . After deleting an old forgotten version of the arduino ide  , and a clean install of
1.5.6 the instructions in the"getting started link" work fine.
First I uploaded the  precompiled Balanduino.hex file from the Balanduino_latest zip. There was no change.
Next the \libraries\USB_Host_Shield_20\settings.h file was modified to enable debugging.
Then a recompile and upload.
The initial output from the serial monitor was a multi line menu print out . When I removed the dongle
and plugged in the ps3 controller the output was

ADK Init
Got 1st bad code for Proto: 04
getproto : Usb fail

with endless repeats.

The  yellow led does not blink like on the construction video.I have tried 3 USB to USB Mini cables
with out change . My clueless  newbie guess is a hardware fail.

Any help appreciated

Thanks
Fred

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 132
    • View Profile
Re: ps3 controller
« Reply #6 on: March 29, 2014, 01:04:32 AM »
Please try to run the following example in the USB Host library: https://github.com/felis/USB_Host_Shield_2.0/tree/master/examples/board_qc. This should tell if it's a hardware fault or not.

Regards
Lauszus

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ps3 controller
« Reply #7 on: March 29, 2014, 08:47:29 PM »
Lauszus,
 The results of running-- board_qc.ino -- are as follows:


Circuits at home 2011
Reading Revision
SpI long test...................spi long test passed
GPIO test
Test Failed
press any key to continue
---  Key Press ---
GPIO test passed
PLL Test......
Resetting oscillator
Reset Number 0
.
.
.
Reset Number 99

Checking USB device communication.

Waiting for device...
.
.

Nothing after this.Which is line number 151 in of board_qc.ino . For completeness the test was tried
twice with the Blue tooth  dongle in place and twice without the dongle.


Yours Fred
       

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 132
    • View Profile
Re: ps3 controller
« Reply #8 on: March 30, 2014, 03:11:07 AM »
Could you try to plug any other device into the USB Host port than the dongle - for instance the PS3 controller?
I need to see if it actually detects a device or it just stays at "Waiting for device".

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ps3 controller
« Reply #9 on: March 30, 2014, 05:29:04 AM »
Plugged in PS3 controller . It detects the controller. The last line  is

All tests passed . Press RESET to re start test.

Yours Fred

Sarawuth

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ps3 controller
« Reply #10 on: March 30, 2014, 04:50:16 PM »
I can use PS3 controller. First turn on USB debug and follow with Ahmed instructions and I saw the balanduino board register Bluetooth dongle MAC to PS3 controller.

But I believed the Bluetooth dongle from the kit is not working. I have to use with another one.

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 132
    • View Profile
Re: ps3 controller
« Reply #11 on: March 30, 2014, 05:56:13 PM »
It sounds to me like the Bluetooth dongle is the issue then, as it never gets recognized by the USB Host code.
Do you got another one at hand, so we can see if that works?
Does the light come on inside the dongle when you plug it in?

Regards
Lauszus

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ps3 controller
« Reply #12 on: March 30, 2014, 06:32:35 PM »
Tried a spare Bluetooth dongle . It shows the same successful test as with the PS3
controller .
 The last line  is

All tests passed . Press RESET to re start test.

The led on the kit  Bluetooth dongle does not come on.
The led on my spare does light  .However it does
not pair with the PS3 controller.

Yours Fred

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 132
    • View Profile
Re: ps3 controller
« Reply #13 on: March 30, 2014, 10:27:11 PM »
Okay. Please upload the Balanduino code with debugging turned on in the USB Host library and then plug in the dongle and post the output here, then I will have a look at it.

Regards
Lauszus

hfoakley1948

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ps3 controller
« Reply #14 on: April 01, 2014, 08:46:59 PM »
Just tried a new Asus Bluetooth 4.0 dongle  from  Newegg . Which solved the problem.
Thanks all for the help.

Fred