Programming Basic Atom 28-RevD for PS2 controller

We are building a 2DOF Mini Hexapod. We are trying to program the Basic Atom 28-RevD so that the robot responds to the PS2 controller. The servos are powered up, the controller’s power light is on, the light on the Bot Board II is on, and the light on the SSC-32 is blinking. After we push the “Program” button on Basic Micro Studios, we hear continuos beeps that do not stop. When we try to use the PS2 controller to make the robot walk forward, it has sometimes responded erratically, but usually we have no response from the robot at all. The program we are using is lynxmotion.com/images/files/ … prog01.bas

Any ideas as to what could be wrong?

after you hit program does the sound start or does the chip program first?

are you using Atom28 or Atom28Pro? the program specify 28pro (green or red chip)?
are you using the GP2D12 IR sensor?

my first instinct would be to see what part of the program is making the beeps. you could try commenting out the

Sound 9,###\####]

lines with in your code one by one to see when it stops. this might help locate the problem. but then again the code should be fine. my guess is its a power or assembly problem.

also…
what are you using to power the servos?

Might want to check that the proper baud rate has been set on the SSC-32.

Constant beeping could mean that the PS2 code isn’t reading anything from the PS2. Wrong pins for the PS2?

Alan KM6VV

Hello,
After we hit program, the chip programs and then the continuous beeping starts. We are using the Atom28 Rev D, not the pro. We do not have a sensor at all. Does the robot require a sensor, or can we program it without one?
The part of the program making the beeps is the PS2 init part. This is the code that is causing the robot to beep:
;serout S_OUT,i57600,"PadMode : ", HEX2 DualShock(0), 13]
Sound 9,[100\4435]
if DualShock(0) <> PadMode then Ps2Init

We are using 6-volts (4 AA batteries) to power the servos and a 9-volt to power the electronics. The jumpers on the robot are set to match the schematic from step 4 of this tutorial:
lynxmotion.com/images/html/build165.htm
We tried messing around with the pins for the PS2 controller, and they seem to be in the correct position. We got the robot to work with the controller for about 3 minutes at one point, but the alignment of the servos was causing the robot to walk like a drunken sailor. When we unplugged it and tried to fix the alignment, we couldn’t get the robot to work again. The batteries are all OK, so we can’t figure out what is different. Any ideas?

disable the PS2 code and the beep!

Alan KM6VV

Edit: That is, if you don’t want to use a PS2 on the project. I might have misunderstood.

Depending on the pins used, you might need to add pull-ups, as has probably been suggested already.

What brand PS2 controller are you using? Care to share some images of your wiring?

Hey,
Below is an image of the wiring. In that picture we have the PS2 cable hooked in using a different configuration than the one in the tutorial we had been using, but we’ve also tried the configuration where the PS2 is hooked into the lower right hand corner of the SSC-32. We are using a Dualshock 2 controller.

We had a success this week. When we jiggled the cable connecting the PS2 controller to the SSC-32, the beeping stopped and the SSC-32 began reading the PS2 controller. The directional pad works, the SSC-32 makes noises when you press start, and the square, triangle, circle, and cross buttons work. The light on the Bot Board II is blinking and it also seems to respond to these buttons. However it still isn’t responding to the joystick and so it isn’t moving.

We don’t think its a power problem, because we can get the legs moving when we have the manual control via Lynxterm. We also checked the battery and we definitely have 6 volts to the servos.

If you have it nailed down to a poor connection you should be able to wiggle carefully to see where the intermittent problem is and fix it. After that you can try to get the controller to go into analog mode. That will enable the joysticks. BTW our code is verified with Lynxmotion wireless PS2 controllers, but we do not support all manufacturers as this would be impossible. Even Sony brand. Sorry…