Update on PS2, ABB1, and Pro?

I’m trying to establish communication with the Lynxmotion wireless PS2 controller using my ABB1 and Atom Pro. I tried to use the example as outlined here lynxmotion.com/images/html/build034.htm . I downloaded everything and modified the code for the 8.0.1.7 IDE. The code compiled properly, but when I view the terminal I see this:

*FF 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
FF 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
FF 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
FF 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
FF 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
FF 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
FF 255 255 255 255 255 255 255 255 255 255 255 *

and it just repeats that. The little vibration motors do nothing. Now, I haven’t installed a 1k pull-up resistor yet as outlined here: lynxmotion.com/images/html/build026.htm

Now my question is do we still need to install the pull-up resistor on the data and clock lines for the lynx controller? Do we install the controller on pins 4-7 and the pull-up on 4 & 7, or do we install the PS2 controller on 12-15 and the pull-ups on 12 & 15? The information on the site seems to contradict the forum, but the forum posts are old, so who knows which one is correct. Before I start soldering I want to make certain I’m doing it right.

-Matt-

Note: if a pull-up needs to be added to the board to make it work that should be included in the example. I spent countless hours late into the evening trying to get this and other example codes to work, only to find it may be a hardware issue when I searched the forum.

On my Hex Robot, I also have a ABB and an Atom Pro. I know that there are problems with one or more pins on the Pro having a lower voltage in the pins 4-7 so you need to move the PS2 controller to a different set of 4 pins. Originally I moved mine to 12-15, but later to 8-11 as to free up IO pins 14-15 which are used for a hardware serial port…

The new board BB2 has pull-ups built-in for pins 12 and 15, but if you are using an older ABB you will need to add one at least for the DAT line (pin 12).

Good Luck
Kurt

Cool, so I can move it to any set of 4 pins I choose as long as it isn’t 4-7.

Is 14-15 dedicated on the board for serial IO. Sorry for the newb questions, I’m just learning. If yours is working on 8-11 I may move mine to the same, that way I know it will work there. :laughing:

-Matt-

Yes, you can move them to any 4 pins… The new standard that the BB2 has for it is pins 12-15 which should work fine. That is where I started off.

My first answer maybe had too much information in it for a NEWB :blush: , but I don’t know how to rectify except to add more info :blush: .

Many Input/Output pins on the underlying Renesis H8/3694 Microprocessor have possible other uses. If you look at Mudule Pinouts on page 187 of the Basic Atom Pro manual (P197 in the PDF), you will see what functions are available. Note many of these pins have multiple possible other uses. For example IO pin 3 can be used as a normal IO pin or it can be used as an Analog Input (ADIN) or it can be used as Interrupt input (WKPINT_3) as it is used on the TV Brat robot (BIPED forum).

Now IO pins P14 and P15 are also TXD/RXD which is the hardware serial port. In basic you can access this using HSERIAL commands. You can use any IO pins for serial IO using the normal serin/serout commands. This uses software routines to “Bit Bang” out each of the bits in the serial communication. This works fine for most circumstances. However one big advantage for the hardware port is for receiving serial input from an external device. Using serin on standard IO pins will only properly work if your program is sitting in the serin command when the serial input arrives. So if your program is off doing something else and the serial input happens it will be lost. If instead you were using HSERIN, the underlying hardware will receive the input regardless of what your program is doing and you can process it when it is conveniant. Note: there are limits on how much input it will buffer before your program must process it…

Sorry again I know this way too much information!
Kurt

No that was fine. I’ve done some basic PIC microcontroller programming. I understand the basics, but using the “features” on the Pro and ABB are something I’m muddling through.

I used pins 8 through 11. I installed the 1k on pin 8 and it didn’t change anything. I tried a 1k on 8 and 11 and still nothing. I then tried the 500k on pin 8 and still no changes. I’m not certain if I’m missing something. I checked all my batteries and they’re fine.

Here is the code I modifed from the Lnyx web-site.

I’m sure I’m missing something stupid, but for the life of me I can’t find it.

Thanks for your help.
-Matt-

Sorry, I don’t see anything obvious here. Obviously make sure your pull-up resistor is wired properly to the +5v. I believe that it should only be necessary on the DAT bin as the Pro will be driving the CLK pin. But I could be wrong.

I have been playing with making this pS2 controller work with a Propeller Microcontroller and have it somewhat working. I found this site informative about what these commands are:curiousinventor.com/guides/ps2

So far I have not had luck with getting the initialization code to work properly. However I have been able to make the controller work. What I sometimes have to do is to start the program, then turn off the PS2 controller and turn it back on (the lock function worked, but not the switch to analog). Then I press the analog button on the joystick and it switches to mode 73 and I am able to get the joystick information… You might try this as well to see if you can start to get valid input.

I believe that you said you have the Lynxmotion PS2 controller. If not you might try running the green wire to a VS pin. Some controllers (like the one that I have from Sector 7 require this connection to work).

Other than that I am not sure what to tell you…

Kurt

The most up do date PS2 code will be found in the A4WD1 tutorial. It’s working with the Atom Pro and the Bot Board II.
lynxmotion.com/images/html/build134.htm

Because you are using the Next Step board you will need to install a 1k pullup resistor added to the data line only. You can look at the users manual for the Bot Board II to see the schematic.

Unfortunately we do not have the ability to make sure all programs and tutorials work for very old boards that we have not sold for over 7 years. :frowning:

The only other potential for problems is if you are trying to make your own cable to connect the PS2 receiver to the Carrier board. Our published color code may not match your cut extender cable.

Ummm I’m using a Mini-Atom Bot Board, which I bought in December 2007.

The PS2 controller is the lynxmotion controller.

Edit: I purchased the cable from lynxmotion as well.

Ahhh I see. I had it in my head you were using a Next Step carrier. Sorry… :blush:

Ok, so the ABB came before the Atom Pro. We chose pins 4,5,6 and 7 for the PS2 connections. When the Atom Pro was made they put 3.3vdc I/O pins for pin 6 and 7. So for that reason we had to make the changes in the Bot Board II. It has the PS2 connections moved to 12,13,14 and 15. The only line that requires a pullup is the data line, which is P12. The pullup must be 1k or lower. One end goes to 5vdc and the other end goes to the I/O pin.

If you are able to add the pullup then you should be able to use the A4WD1 tutorials to get your PS2 controller working.

Nope. Didn’t work. I dowloaded the very bottom code here lynxmotion.com/images/html/build134.htm

I configured it for the Botboard 1.

I moved the 1k resistor to pin 12. I quadruple checked the resistor is tied from 5V to signal. I also tied pin 10 signal to LED A. I connected 2 servos to pin 2 and 3. I also tried them on 4, 5, and 6 with no change.

Here’s what happens when I run the code:

Ascending notes from speaker - Good
LED A comes on - Okay I suppose
left LED on PS2 controller (next to left analog stick) flashes
right LED on PS2 controller stays off
right LED on PS2 receiver goes solid
left LED on PS2 receiver stays off

I cannot cycle LED A with triangle (or any other button for that matter). No combination of buttons causes the servos to move. I double-checked the batteries in the remote, still reading 1.6V each. I check my source battery, still reading 7.6V. Made certain I had the jumper on VS-VL. I have the jumper on the PS2 cables set to 5V. I have the green wire connected to VS.

Here is my code straight from IDE:

I really don’t even know what to try next to make it work. Totally out of ideas.

Do you have or know anyone who has a PS2 game console? You can test the controller on it. If it doesn’t work on the game console it’s a bad controller. It has happened before. If it does work on the game console then we can dig deeper. FYI the controller will link up with the atom chip removed.

Turn bot board (receiver) on, left LED on steady, right LED blinking.

Turn hand held controller on, left LED blinks once, then both LEDs blink twice, then go out. On the receiver both LEDs light and stay on steady.

This will happen even if the only thing connected to the PS2C is the 5vdc power…

Basically what I’m trying to say is it’s probably not a program issue. Another thing I noticed a couple times, but not every time, is that the robot / receiver should be powered on first, then the hand held controller should be powered on second. I’m sure this is due to me testing it with the 4 position DAT, CMD, ATT, CLK connector removed.

Ding Ding Ding. You got the prize Jim. It’s a bad PS2 controller. I plugged my wired PS2 controller in and it worked fine. servos moved, lights flashed, horns buzzed. Everything worked. It was an amazing relief. I sent you an e-mail as well.

Thanks,
-Matt-

The quality of the controllers is generally very good, but I have had to replace a couple bad right out of the box. :frowning: We will take care of it for you. Sorry for the trouble…

Not a problem. I appreciate you fixing the issue and helping me troubleshoot everything.

So in summaray:
if you stumbled onto this thread and you need help troubleshooting your setup. Try these things first:

*Install a 1K pullup resistor on the Data pin (power to signal)
*Download the 4WD rover PS2 code found here: lynxmotion.com/images/html/build134.htm
*double check all your batteries, resistor installation, and PS2 controller
*also make certain your jumper is set to VL not VS.

Hopefully that solves the problem for you.
Thanks again Jim,
-Matt-