Society of Robots
     | Robot Forum | Robot Tutorials | Robot FAQ |
July 31, 2010, 03:39:01 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: SoR Robot Chat every friday night. Join us! (forum integration fix coming when I have time)
http://www.societyofrobots.com/robotforum/chat/

Robot Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Axon PS2 Controller Interface Library  (Read 729 times)
0 Members and 1 Guest are viewing this topic.
JadeKnightTopic starter
Beginner
*

Helpful? 0
Offline Offline

Posts: 8


View Profile
« on: September 28, 2009, 10:34:40 AM »

I uploaded a library (.h and .c file) to interface with a PS2 controller using an Axon MCU. It should work with any AVR based MCU, though, with some minor modifications.

The low level PS2 communication code was adapted from 'Dunk's tutorial.
http://www.societyofrobots.com/member_tutorials/node/200

Features:

    * Configurable pin assignments (uses 4 or 5 I/O pins, and 5v regulated power).
    * Supports connecting/disconnecting the controller at any time.
    * Detecting analog vs. digital mode.
    * Forcing analog mode on controller.
    * Easy access to all buttons and axes (axes can be raw, or with a simple deadzone).
    * Currently tested to work with a genuine Sony PS2 wired controller (any other brands/types *may* require some tweaking of the low-level communication code).


Download Link:
    http://forums.trossenrobotics.com/datacenter/drivers-libraries-firmware-7/axon-ps2-controller-interface-library-144/
Logged
dunk
Expert Roboticist
Supreme Robot
*****

Helpful? 14
Offline Offline

Posts: 1,025



View Profile WWW
« Reply #1 on: February 23, 2010, 05:42:59 AM »

hey JadeKnight,
good work!
apologies it's been so long since you posted, i've been away.

with this you've done 2 out of the 3 things i always meant to go back and do to my code.
ie, get the acknowledge pin working and tidy up the code and put everything in easy to include functions.

do you mind if i edit the original tutorial to link to your post @ Trossen?
pointless people hacking away with my code when you've already completed the job.


the 3rd thing i always intended to do with this was use the hardware SPI module instead of bit-banging.
i failed when i tried this before but i've a better understanding of the SPI module in AVRs now.
i'll get round to that one day.


dunk.
Logged

Pages: [1]
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
N64 controller interface???
Misc
Truckstop 4 571 Last post August 17, 2009, 08:51:33 AM
by Truckstop
Axon interface Linux
Software
taba93 3 466 Last post November 27, 2009, 04:55:33 PM
by Commanderbob
New Timer library 100% Axon compatible
Software
TrickyNekro 1 208 Last post May 23, 2010, 06:28:41 PM
by TrickyNekro
PlayStation 2 Controller Arduino Library « 1 2 »
Software
madsci1016 58 1328 Last post July 27, 2010, 08:36:56 AM
by KurtEck
Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!


Advertise on this Forum