Ps2 controller to servo

Hello,

I am very new at this so please forgive me. I am trying to make a stand alone Lynx B - Pan and Tilt Kit (Black Anodized) pan and tilt system that is controlled by a ps2 controller

I have tried to wade through all the info on the site but I seem to be overwhelmed
I have already purchased the wireless PS2 Robot Controller and the Sony Playstation Controller Cable I t was quite obvious that out of the box these will not run my hobby servos.

Please tell me what else I need. I’m guessing I need some type of motor controller or bot board…please let me know what I need to purchase…I hope not to have to do any programming because I have no clue about it at all.
Is there a simple out of the box way to simply control a hobby servo with the ps2 controller…I’m willing to buy whatever I need to

SSC-32 Servo Controller
lynxmotion.com/Product.aspx? … egoryID=52
Bot Board II
lynxmotion.com/Product.aspx? … egoryID=66
BASIC Atom 28 Pin
lynxmotion.com/Product.aspx? … egoryID=66
PS2 Robot Control: Establishing Communication
lynxmotion.com/images/html/build034.htm
BasicATOM IDE Downloads
basicmicro.com/ViewPage.aspx … _basicatom

sample code to run on BasicATOM IDE:
I HAVENT TESTED IT BUT IT WAS USED IN ONE OF MY OLDER PROJECTS, IV JUST REMOVED SOME PARTS OF THE CODE THAT WILL BE OF NO USE TO YOU AND LEFT YOU WITH THE PAN AND TILT PARTS.
SORRY IF ITS NOT COMPLETE, BUT IT WILL POINT YOU IN THE RIGHT DIRECTION. I ALSO KNOW THAT YOU CAN PROGRAM WITH OUT THE ssc-23 AND JUST USE THE botboards. MIGHT BE WORTH LOOKING INTO IT.
Arachner Robotics. Ltd.

[code];************************************************
;Omnidirectional Property Surveillance Unit
;************** Ant-Artic program ***************
;****************** Bot Board *******************
;**** Basic Atom-28 / SSC-32 & PS2 DualShock ****
;********* Code written by Jonny Poole **********
;************************************************

;code uses pin connections 0 & 1 for pan and tilt system on SSC-32

clear ;Resets atom chip

;-------------Constants
;DualShock wireless controller peripherals
DAT con P4
CMD con P5
CLK con P7
SEL con P6
DeadZone con 28
PadMode con $79

PAN_PulseMin con 600 ;(panning servo) <180°>
PAN_PulseMax con 2400

TILT_PulseMin con 600 ;(tilt servo) <180°>
TILT_PulseMax con 2400

;ACosdo not remove/edit this data****
data 64,64,63,63,63,62,62,62,61,61,61,60,60,60,59,59,| ;*
59,59,58,58,58,57,57,57,56,56,56,55,55,55,54,54,| ;*
54,53,53,53,52,52,52,51,51,51,50,50,50,49,49,49,| ;*
48,48,48,47,47,46,46,46,45,45,45,44,44,44,43,43,| ;*
42,42,42,41,41,41,40,40,39,39,39,38,38,37,37,37,| ;*
36,36,35,35,35,34,34,33,33,32,32,31,31,31,30,30,| ;*
29,29,28,28,27,27,26,25,25,24,24,23,23,22,21,21,| ;*
20,19,19,18,17,16,15,15,14,13,11,10,09,07,05,00 ;*
;************************************************************

; ssc32 Servo pin connections

PAN con “0” ;panning servo
PAN2 con “0”

TILT con “0” ;tilt servo
TILT2 con “1”

;--------------------------------------------------------------------
;-------------Variables

DualShock var Byte(7)
DS2Mode var byte

ZCoord var Sbyte
WCoord var Sbyte

DCoord var Byte
DAngle var Byte

PAN_Pulse var word
TILT_Pulse var word
;--------------------------------------------------------------------
;***************
;*** Program ***
;***************

;-------------Init
;DualShock
pause 500

clear
high CLK

again
low SEL
shiftout CMD,CLK,FASTLSBPRE,$1\8,$43\8,$0\8,$1\8,$0\8] ;CONFIG_MODE_ENTER
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$44\8,$00\8,$01\8,$03\8,$00\8,$00\8,$00\8,$00\8] ;SET_MODE_AND_LOCK
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$4F\8,$00\8,$FF\8,$FF\8,$03\8,$00\8,$00\8,$00\8] ;SET_DS2_NATIVE_MODE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$43\8,$00\8,$00\8,$5A\8,$5A\8,$5A\8,$5A\8,$5A\8] ;CONFIG_MODE_EXIT_DS2_NATIVE
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$01\8,$43\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8,$00\8] ;CONFIG_MODE_EXIT
high SEL
pause 1

low SEL
shiftout CMD,CLK,FASTLSBPRE,$1\8]
shiftin DAT,CLK,FASTLSBPOST,[DS2Mode\8]
high SEL
pause 1

Sound 9,[100\4435]
if DS2Mode <> PadMode then again

pause 500

;-----------------------------------------------------------------------------------------------
;-----------------------------------------------------------------------------------------------

ZCoord = DualShock(3) - 128
if ZCoord > DeadZone then
	ZCoord = ZCoord - DeadZone
elseif ZCoord < -DeadZone
	ZCoord = ZCoord + DeadZone
else
	ZCoord = 0 
endif

WCoord = DualShock(4) - 128
if WCoord > DeadZone then
	WCoord = WCoord - DeadZone
elseif WCoord < -DeadZone
	WCoord = WCoord + DeadZone
else
	WCoord = 0 
endif

;----------------------------------------------------------------------------------		    

; 180° Head Code (pan)
	Head_Pulse =  (((PAN_PulseMax - PAN_PulseMin) * ((DAngle + 64 ) & $7F) |
		/ 127 + PAN_PulseMin) max PAN_PulseMax) min PAN_PulseMin

; 180° Head Code (tilt)
	Head_Pulse =  (((TILT_PulseMax - TILT_PulseMin) * ((DAngle + 64 ) & $7F) |
		/ 127 + TILT_PulseMin) max TILT_PulseMax) min TILT_PulseMin	

;-------------Sub PS2Query
Ps2Query
low SEL
shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8]
shiftin DAT,CLK,FASTLSBPOST,[DualShock(0)\8, DualShock(1)\8, DualShock(2)\8, DualShock(3)\8, |
DualShock(4)\8, DualShock(5)\8, DualShock(6)\8]
high SEL
pause 1

return

;--------------------------------------------------------------------[/code]
Copy and paste it into the IDE (link provided above)
good luck.

If you get the BotBoard II and the Basic Atom 28 you will have what you need to do it. I don’t have a program for just a pan and tilt though. If no one can throw something together I will try later.