{"action":"opened","issue":{"url":"https://api.github.com/repos/felis/USB_Host_Shield_2.0/issues/228","repository_url":"https://api.github.com/repos/felis/USB_Host_Shield_2.0","labels_url":"https://api.github.com/repos/felis/USB_Host_Shield_2.0/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/felis/USB_Host_Shield_2.0/issues/228/comments","events_url":"https://api.github.com/repos/felis/USB_Host_Shield_2.0/issues/228/events","html_url":"https://github.com/felis/USB_Host_Shield_2.0/issues/228","id":149881079,"number":228,"title":"Issue with setLedOn() in PS3USB (works in PS3BT)","user":{"login":"bbf3","id":18582535,"avatar_url":"https://avatars.githubusercontent.com/u/18582535?v=3","gravatar_id":"","url":"https://api.github.com/users/bbf3","html_url":"https://github.com/bbf3","followers_url":"https://api.github.com/users/bbf3/followers","following_url":"https://api.github.com/users/bbf3/following{/other_user}","gists_url":"https://api.github.com/users/bbf3/gists{/gist_id}","starred_url":"https://api.github.com/users/bbf3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbf3/subscriptions","organizations_url":"https://api.github.com/users/bbf3/orgs","repos_url":"https://api.github.com/users/bbf3/repos","events_url":"https://api.github.com/users/bbf3/events{/privacy}","received_events_url":"https://api.github.com/users/bbf3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-20T20:42:52Z","updated_at":"2016-04-20T20:42:52Z","closed_at":null,"body":"Hello,\r\nI'm having an issue turning on the PS3 controller's LEDs when in USB (corded) mode. Using just the examples provided (PS3BT and PS3USB), it seems like my controller can turn LEDs on and off when using the PS3BT example, but not when using the PS3USB example program. \r\n\r\nAn exception: If I add an \"attachOnInit\" in my main loop:\r\n`void loop() { // begin main loop\r\n  Usb.Task(); \r\n  PS3.attachOnInit(USBonInit); // this added\r\n\r\n...main loop code...`\r\nThen after my main loop: \r\n`...main loop code...\r\n} // end of main loop\r\n\r\nvoid USBonInit(){  // runs only once at moment of controller initialization\r\n  Serial.print(\" JUST CONNECTED \");\r\n   PS3.setLedOn(LED3);\r\n}`\r\n...then I can make an LED (#3) turn on. This will only happen if I unplug the controller and replug it back in. It won't happen on first programming the Arduino if the controller is plugged in, or by resetting the arduino while keeping the controller plugged. Additionally, pressing one of the D-pad keys (to change an LED) makes the LED go out and turns none of them back on. \r\n\r\nChanging the Arduino program back to the PS3BT example fixes the issue and the LEDs can be programmed by the D-pad buttons as intended. I've switched back and forth between the two examples multiple times and have the same issue with PS3USB each time. \r\n\r\nAny ideas? Thank you for all the effort that clearly went into this hardware and software. \r\n\r\nBlake"}}