The range seems to go from till And number 4 seems to be the right y-axis and number 3 the right x-axis. In the default, center position, the value is always 0. Setup and Installing Wireless PS3 Controllers On The RetroPie I did the following with the right joystick : up, down, right, left. It also seems like we get 2 events for one button interaction one on key down and one on key up, respectively with value 1 and value 0. It looks like we can identify the button by mapping the number prop. When you press some buttons you should get something like the following output.
First try, let's see if we can get some output, run the code by executing npm run. Log the output to the console so we can see if that's working and what's actually inside these events.
Install and save the following node dependency by running npm i -save joystick. Create both files and paste the following contents in package. Now that is out of the way let's create the required files, we will need only 2 files, index. Run the following commands to install joystick. Before we can get started we'll need to install the joystick lib. If you haven't please follow those guides first. And lastly I also assume you have your PS3 controller already paired. Once you got these basics the possibilities are endless! Don't care and just want to see the end result? I assume you have already installed Raspbian on your Raspberry Pi.
HenriR1 scott!A basic example of how to communicate with a PS3 controller on a Raspberry Pi and have things reacting to its input. Did you make this project? Share it with us! I Made It! Reply Upvote. The PS2 Controller is now ready to be used in any project that you like. You can get the button states in Python and C, so if you know how to control the XBMC using any of those two languages, then it should be pretty easy to use the controller as a Remote Control. Remote Raspberry Pi Robot (PS3 Controller) - Fablab NerveCentre Participated in the Gadget Hacking and Accessories Contest. Press reset on the Arduberry to start receiving the data. Follow Access the Serial port using minicom guide to change the baud rate to Make sure that the controller is connected to the Arduino shield and switched on. The data that is coming from the PS2 shield is coming at baud, so we need to configure minicom.
Slide the Arduberry on to the Raspberry Pi and power it on. Did you use this instructable in your classroom? Add a Teacher Note to share how you incorporated it into your lesson. We use the Arduberry to adapt the shield to the Raspberry Pi.