I have an L6 arm with the ssc-32 and the atom board 2 with an atom pro microcontroller. I tried the code in the establishing communication with ps2 and it works well(even the vibrating motors work well when pressing buttons) so all connections must be ok.However when i try this lynxmotion.com/images/files/l5l6p1.bas to control the arm with the ps2 it doesnt work.I have changed the baud rate as the ssc-32 manual says with the jumper for atom pro communication.When the program runs, it makes a beep and the analog led (in the ps2)lights up (i have an original ps2 controller).Then after a while it goes off and it does nothing when buttons are pressed.I dont know whats wrong.It seems like the two boards are not communicating. Could it be that I may have damaged the TTL communication of the two boards because I forgot to change th baud rate from the beginning? Or is it just that the code is not compatible with the atom pro? Thanks very much for your time.
PS. I have already changed the proper pin configurations in the code to be the same with my physical connections.
The code was written for the Atom not the Pro. Which IDE are you using for the Pro? You should be using the 8.0.1.8 version. I believe it fixed a math problem and a problem with the nap command. I don’t think there are other differences in the two syntax.
I am using version 8.0.1.7 and Im pretty sure that I cant find the 8.0.1.8 version on the downloads page of the official basicmicro website.Is it a beta version? Where can I find it?
Can you please guide me step by step to modify this code for the Atom Pro?
Or with this new IDE you are reffering to,not any modifications are needed?
OK I downloaded the 8.0.1.8 version and there seems to be some change but still doesnt work.Now the red LED is constantly on and the speaker plays a tone every few seconds and there seems to be communication with the SSC-32 because its LED is flashing.
But when I press any buttons nothing happens. Thanks everybody and Robodude especially for looking into the problem
I will have James test this asap. This might take a while. We will update the code when we have it working. Till then please feel free to experiment with it.
Then you should set up terminal window 1 of the IDE with the proper comm port and in the case baud rate of 57600 and connect and then see what the padmode is set to and if it is looping there.
Also it might not be going into mode $79 and sticking in mode $73 which would work well with this code anyway. You might change the line looking at the padmode to change it to something like:
if (DualShock(0) <> PadMode) and (DualShock(0) <> $73) then again
Also I would double check to see that the code was updated to have the PS2 controller on the right pins, ie the code look like this:
;PS2 Controller / BotBoard I
;DAT con P4
;CMD con P5
;SEL con P6
;CLK con P7
;SSC32 con p15
;PS2 Controller / BotBoard II
DAT con P12
CMD con P13
SEL con P14
CLK con P15
SSC32 con p8
And you have the SSC-32 to Bot board connected through IO pin 8 and to the right pins on the SSC-32. Also make sure you have the jumpers set properly for 38400.
Thanks for your suggestions especially for saying that the servos should be connected to the right pins.I looked at the code more carefully and I saw that the servos should be connected to different pins than when controlling the arm with RIOS
The new thing that happened is that all servos got activated and the arm took its home position. When I press the triangle button the servos get deactivated only for a while. When I press any other button or when I move the joysticks almost nothing happens. And I say almost because when pressing any buttons(continuously) it seems that the arm makes tiny movements,in fact so tiny that are hardly noticeable,I would say they are twiches rather than movements.
I tried the code modification you suggested but still the same.
Now Im waiting for James suggestion as Robot Dude said.
You may be almost there. What you are describing now (I think) is the SSC-32 is resetting. On the SSC-32, power the VL (Logic) from a 9vdc battery and the VS (servos) from a 6vdc battery. Don’t forget to remove the VS1=VS jumper. Then tell me if it works.
Actually, scratch that. That error was fixed in the latest version. I’m definitely going to agree with RobotDude on this one. A resetting SSC can cause all sorts of problems.
I tried it anyway to replace all cos but nothing happened. The LED of SSC-32 flashing and the fact of the servos not remaining deactivated for very long might be an indication of reset,right? I tried with a 9V battery for the logic of ssc-32 and a 6V battery for the servos of ssc-32 and servos of bot board and the logic of bot board…Still the same
Why is it reseting? How can I fix this?
I tried also with a 7.2V battery just in case the 6V was not good but still the same
When Im using the SSC-32 alone with the RIOS everything works fine. I have firmware 2.02GP
The VL-VS1 jumper from the ssc-32 was already removed. I tried removing also the VL-VS jumper from the atom board but still nothing. Could the atom pro have a different baud rate than 38.4?
I also tried using the wall pack for the servos of ssc32 and 9V battery for the logic of ssc-32 and the 6v battery for the logic and servos of the bot board.
I hope I wont burn anything with all these connections
Its driving me crazy!
I tried a simple test program that I found in another post(a bit modified) to verify that the communication between the two boards is ok. And it is indeed fine,the base servo moves ok and the rest are at mid position.
The code is
So if this works ok this means there is no power issue since all servos are activated, right? Or am I missing something?
The problem must be in the code.Something is done within the code that makes the ssc-32 reset.
Please tell me your thoughts and suggestions.I would really like to solve this with your help.I know a little bit about programming but I am a mere beginner. Thanks!
Actually still could easily be power poblem. As this code is only moving one servo at a time, with a pause inbetween. What can happen with something like the SSC-32 is you are doing a move with multiple servos that causes it to momentarily pull more power, then your power pack can deliver which cases the voltage to drop low enough that the processor browns out and resets.
I don’t have an arm to play with, but looking quickly at the program you are trying to use I think the values below are in range You might try something like:
This should case all of the servos to move at once from one end of the range to another end of the range. Note I have not calculated where the arm will be at these end points so be sure everything is clear in it’s path.
I tried your code and indeed all servos move at once. I left it for about a minute and it kept doing repetitive moves without reseting I believe. So for once more I would say that it dosnt seem like a power problem(unless the ps2 controller is the culprit for drawing so much power from the batteries,something which is not tested in this code snippet). Any other suggestions? What about James? Have you reproduced the problem or is it only me having it?
Specifications : L6 arm with new base, SSC-32 with 2.02GP firmware, Bot Board 2, Basic Atom Pro 28,original ps2 controller(purchased recently/green cable connected to VS–>does it make any difference?), 9V battery for SSC-32 logic, 6V 3300mAh or 7.2V 2800mAh(lynxmotion one) for powering the VS on SSC-32,VS on atom board and VL on atom board.