I've fixed a couple of running bugs with the data packet, and I've modified the NXTI2CDevice library to be compatible with Arduino 1.0.
The attached zip file has
1. a new Arduino sketch
2. a new Processing sketch
3. the modified NXTI2CDevice library
You'll still need the Procontroll library in Processing, though.
Greetings, everyone, and welcome to my first instructable!
Today we'll be covering a few major bases to get to the final goal: controlling an Arduino-based robot via a PS3 remote! By the end of this instructable, you'll be able to control the speeds of both NXT motors with the two analog sticks of a PS3 controller.
Here's the idea:
A PS3 communicates via bluetooth to the computer sending the value of its analog sticks to the Processing program. Processing then sends this information as a packet of data to the Arduino bot through the Xbee wireless modules. Lastly, the Arduino board "unpacks" this data packet and interprets it as the speed and direction to drive each motor.
Here are the three basic milestones that we'll cover:
-- using Arduino to control NXT Motors
-- interfacing the Programming Language Processing with a PS3 controller
-- Wireless communication between your computer and Arduino via Xbee modules
If you aren't quite comfortable with either Processing or Arduino's Programming languages--fear not! I've accompanied the project with my source code .
Here's what I'll assume:
-- you're mildly familiar with Arduino, and you can a user-created library to the IDE.
-- your computer has bluetooth-pairing capabilities
-- you can strip a few small wires and you have basic soldering skills.
Here's a few concepts that you'll learn about on the side:
(You don't need to know about these beforehand to get started on this project)
-- Xbee wireless communication
-- i2c communication (between the NXT motors and Arduino)
All right, Let's get started!
Lastly, feel free to check out the video for the final results of this project in action!