Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 5 months ago.
Hit "X" PS3 Button to light onboard LED1
im being newbish here, can someone guide me how to light onboard LED using ps3 controller?
i imported and compiled this program https://mbed.org/users/BartJanssens/code/PS3_BlueUSB/
and inserted my ps3 usb to my mbed and im getting this kind of reply
it appears i get response whenever i try to hit a button. numbers shows up when i push "X" button
120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 304 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 513 305 151 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 513 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 513 305 152 0 LSX LSY RSX RSY UPA RPA DPA RPA L2 R2 L1 R1 TRI CIR CRO SQU ACX ACY ACZ GYZ 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0 120 137 126 124 0 0 0 0 0 0 0 0 0 0 0 0 512 305 152 0
with this running, can you teach me how to simply light a LED1 when i push button X? where do i start to code it?
1 Answer
11 years, 5 months ago.
Quick google on that list of letters results this file: http://mbed.org/users/abe00makoto/code/ADK_BlueUSB/file/9fb6c423e32c/Ps3USB.cpp
At line 215 the function is defined which is called to generate that. The function above that calls that one, and I think that one is automatically called. So you could edit those functions to do whatever you want with that data.