Recently purchased a new Bot Board II from lynxmotion after somehow accidently ruining the old one somehow. Received the new one, installed the basic atom and programmed it fine, but the board does not seem to respond to any commands.
The Basic Atom Pro seems to accept the program, the board chirps when it is powered on, but the green LED turns on stays solid, and the yellow LED blinks, and no response from the first red? LED, also the power LED is solid.
The PS2 receiver has 1 solid light on and the other light on it does not light (Lynxmotion controller)
CODE: (worked with the old board before i had to replace it)
[code]DAT con P12
CMD con P13
SEL con P14
CLK con P15
temp var byte ’ Variable definitions.
buttons var word
Lastbuttons var word
bpress1 var bit
bpress2 var bit
rhori var byte
rvert var byte
lhori var byte
lvert var byte
rhori_null var byte
rvert_null var byte
lhori_null var byte
lvert_null var byte
NormalizeValue var byte
NormalizeNull var byte
DeadBand con 2
ldrive var word
rdrive var word
Button_START var bit
Button_SELECT var bit
Button_L1 var bit
Button_L2 var bit
Button_R1 var bit
Button_R2 var bit
Button_A var bit
Button_O var bit
Button_X var bit
Button_S var bit
Dpad_UP var bit
Dpad_RIGHT var bit
Dpad_LEFT var bit
Dpad_DOWN var bit
'GripperVertPosition = 1500
'GripperGripPosition = 1500
low p0 ’ Ensure pulsout commands are positive going.
low p1
low p2
low p3
low P10 ’ Ensure device connected to pin 10 and 11 is off on startup
low P11
high CLK ’ Ensure CLK is negative going.
sound 9, [100\880, 100\988, 100\1046, 100\1175] 'four quick ascending notes.
pause 1000
setup ’ This section sets the PSX Controller to Analog Mode. (red LED should light)
’ This will work with Sony and Madcatz wired, but not with Medcatz wireless.
’ You must press the analog button on the controller to set to analog mode.
low SEL
shiftout CMD,CLK,FASTLSBPRE,$1\8]
shiftin DAT,CLK,FASTLSBPOST,[temp\8]
high SEL
pause 1
if (temp <> $73) and (temp <> $79) then
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 100
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,$4D\8,$00\8,$00\8,$01\8,$FF\8,$FF\8,$FF\8,$FF\8] ;VIBRATION_ENABLE
;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
goto setup
endif
gosub get_PSX_data
gosub NullJoysticks
main
gosub get_PSX_data
if Button_START then : gosub NullJoysticks : endif
NormalizeValue = lhori : NormalizeNull = lhori_null : Gosub Normalize : lhori = NormalizeValue
NormalizeValue = lvert : NormalizeNull = lvert_null : Gosub Normalize : lvert = NormalizeValue
NormalizeValue = rhori : NormalizeNull = rhori_null : Gosub Normalize : rhori = NormalizeValue
NormalizeValue = rvert : NormalizeNull = rvert_null : Gosub Normalize : rvert = NormalizeValue
ldrive=((lvert*8) + 3000 - 1016) MAX 4000 MIN 2000' Forward / backward speeds
if ldrive >= 3000 then
rdrive = 3000 - (ldrive - 3000)
elseif ldrive <= 3000
rdrive = 3000 + (3000 - ldrive)
endif
'FULL REVERSE = 2000
'FULL FORWARD = 4000
'NEUTRAL = 3000
'FORWARD / REVERSE WITH JOYSTICK
pulsout 0,(ldrive)
pulsout 2,(rdrive)
'FORWARD / WITH DPAD
’ pulsout 0,(Dpad_UP4000)
’ pulsout 2,(Dpad_UP2000)
'REVERSE
’ pulsout 0,(Dpad_DOWN2000)
’ pulsout 2,(Dpad_DOWN4000)
'RIGHT
pulsout 0,(Dpad_RIGHT4000)
pulsout 2,(Dpad_RiGHT4000)
'LEFT
pulsout 0,(Dpad_LEFT2000)
pulsout 2,(Dpad_LEFT2000)
pause 20
goto main
get_PSX_data ’ This section gets the data from the PSX controller.
Lastbuttons = buttons
low SEL
’ Initiate request for data from PSX controller.
shiftout CMD,CLK,FASTLSBPRE,$1\8,$42\8]
shiftin DAT,CLK,FASTLSBPOST,[temp\8,buttons.LOWBYTE\8,buttons.HIGHBYTE\8,rhori\8,rvert\8,lhori\8,lvert\8]
high SEL
pause 1
buttons = buttons ^ $FFFF ' SO WE CAN USE POSITIVE BOOLEAN LOGIC WHEN EVALUATING BUTTONS
Button_SELECT = Buttons.bit0
Button_START = Buttons.bit3
Dpad_UP = Buttons.bit4
Dpad_RIGHT = Buttons.bit5
Dpad_DOWN = buttons.bit6
Dpad_LEFT = Buttons.bit7
Button_L2 = Buttons.bit8
Button_R2 = Buttons.bit9
Button_L1 = Buttons.bit10
Button_R1 = Buttons.bit11
Button_A = Buttons.bit12
Button_O = Buttons.bit13
Button_X = Buttons.bit14
Button_S = Buttons.bit15
return
Normalize
if NormalizeValue < (NormalizeNull-DeadBand) then
NormalizeValue = (127NormalizeValue)/(NormalizeNull-DeadBand) MAX 127
elseif NormalizeValue > (NormalizeNull+DeadBand)
NormalizeValue = (127(NormalizeValue-NormalizeNull)/(255-DeadBand-NormalizeNull) + 127) MAX 255
else
NormalizeValue = 127
endif
return
NullJoysticks 'READ ANALOG JOYSTICKS TO NULL OFF-CENTER VALUES
rhori_null = rhori
rvert_null = rvert
lhori_null = lhori
lvert_null = lvert
return
[/code]
picture doesn’t show much but the far right light blinks and the others are solid when powered on [WILL POST WHEN MY 1 DAY RESTRICTION IS UP]
in the meantime ://img11,imageshack,us/img11/5206/botboard,jpg