BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Mon Jan 22, 2018 5:14 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: PLEASE HELP for connecting PS2 to the new ARC32
PostPosted: Tue Apr 16, 2013 7:03 am 
Offline
Citizen

Joined: Tue Dec 25, 2012 10:57 am
Posts: 26
KurtEck wrote:
Toward the bottom of the of the Basic Micro Studio window, is a set of tabs (Build, Debug, Find..., Terminal 1, Terminal 2..)
Click on one of the Terminal tabs.

There will be some buttons and drop down lists. In the one that list com ports, select the Port that your Arc32 is connected to. Go to the next one which is the baud rate(defaults to 300 in the list). In this one choose 38.4kbs. Now click on the connect button.
KurtEck wrote:
Toward the bottom of the of the Basic Micro Studio window, is a set of tabs (Build, Debug, Find..., Terminal 1, Terminal 2..)
Click on one of the Terminal tabs.

There will be some buttons and drop down lists. In the one that list com ports, select the Port that your Arc32 is connected to. Go to the next one which is the baud rate(defaults to 300 in the list). In this one choose 38.4kbs. Now click on the connect button. Kurt


I DID ALL THESE...

KurtEck wrote:
Now if you click the mouse in this window and hit return key, does it do anything? Kurt


NOTHING HAPPENED ????

KurtEck wrote:
Note: I am assuming you have successfully downloaded the program you mentioned. Now enter: o<cr>
That is the o followed by the Carriage return (Enter) key. That should enter into the servo offset mode I mentioned earlier.Kurt


I DIDN'T UNDERSTAND THIS PART

KurtEck wrote:
Next: When you turn your robot on, what do the lights do on the PS2 receiver. Is one solid and the other blinking? If you now turn on the PS2 remote control, does the one that was blinking now turn solid? If so they are talking with each other, if not, try fresh batteries and see if that helps. Kurt


UNTIL HERE EVERY THINGS R GOOD

KurtEck wrote:
If the two connect, does anything happen when you hit the start button? If so, does hitting the Triangle button, move the robot up? Does anything happen when you move the sticks?Kurt

NOTHING HAPPENED FOR ALL THESE PARTS

:'(


Top
 Profile  
 
 Post subject: Re: PLEASE HELP for connecting PS2 to the new ARC32
PostPosted: Tue Apr 16, 2013 7:16 am 
Offline
Citizen

Joined: Tue Dec 25, 2012 10:57 am
Posts: 26
And when I click on Depug botton and starting to compile. when it finish it gives me this message


Attachments:
Untitled.jpg
Untitled.jpg [ 22.1 KiB | Viewed 2121 times ]
Top
 Profile  
 
 Post subject: Re: PLEASE HELP for connecting PS2 to the new ARC32
PostPosted: Tue Apr 16, 2013 1:55 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Note: I never use the Debug button. Why? because it compiles the code differently, which screws up all commands/code that is timing dependent. Also it uses up the main serial input/output to terminal.

To download a program, you load the project file that is part of that zip file you posted. Something like:
Phoenix_Arc32_PS2.prj

It will show there are several files that are part of this in the workspace window pane. You may need to click on + symbol to expand the list to see these files. Double clicking on any of these files will open them in the editor part of the IDE.

There should be a button up there that looks like: Build Phoenix_Arc32_PS2, which if you click on this should compile the program (But not download it to your robot). But if you instead click on the Program button, this will compile and download to the robot.

Of course to do this, you must have the Arc32 connected to your computer, and the appropriate stuff selected in the drop down lists (BasicAtomPro, BAP Arc32, <your comm port>)

Kurt


Top
 Profile  
 
 Post subject: Re: PLEASE HELP for connecting PS2 to the new ARC32
PostPosted: Mon Apr 22, 2013 12:12 am 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Hi, any luck?

I know from your other thread, you are thinking of converting to Arduino... Which may be just as difficult (maybe more) to get up and running.

Have you tried to determine if you are getting valid PS2 data coming back from your PS2?

I include here a simple test program that if you download to your Arc32, helps you determine that things are working.

To use it, you need to extract the file from this posting. Then in the IDE load the file and then wit the appropriate stuff selected (BasicAtomPro, BAP Arc32, <Your comm port>) in the lists at the top of the IDE and then click on the Program button. Assuming this completes successfully...

Now click on lets say the Terminal1 Tab on the bottom of the IDE window. You may wish to use the slider control that separtes these tabs from the other parts of the IDE to give it more room. Now choose the appropriate comm port in the list here, Choose 38.4kbs in the next drop down list and then click on the connect button.

Now turn on your PS2 and try moving the joysticks around and clicking on buttons. Do new lines of data show up as you do this... You should end up with a bunch of Hexadecimal data that looks something like:
Code:
DS: 5A FF FF 80 80 9A 80
DS: 5A FF FF 80 80 A2 80
DS: 5A FF FF 80 80 D6 80
DS: 5A FF FF 80 80 D8 80
DS: 5A FF FF 80 80 FF 80
DS: 5A FF FF 80 80 B8 80
DS: 5A FF FF 80 80 80 80
DS: 5A FF FF 80 80 80 0
DS: 5A FF FF 80 80 80 3
DS: 5A FF FF 80 80 80 80

All of the lines will should start with 5A, the next 2 values have bits associated with each of the buttons on the PS2, and the last 4 values are the values of the 2 joysticks with 2 value for each joystick (Horizontal and Vertical).

Assuming you get this working then you try going to the next step.

Update: I also tried uploading the version I put up on github to see if it still works on my Arc32 Phoenix and it does.
It is up at: https://github.com/KurtE/Phoenix_For_BAPS

If you download this from github, you should then in the IDE open up the appropriate project file (Phoenix_Arc32_PS2.prj)
This will show the project with all of the appropriate files in the workspace pane of the IDE. Make sure the Build button says something like: Build Phoenix_Arc32_PS2 and then choose the Program button. Again Assuming that the program shows a success on the program (mine took 98 seconds). You should be able to turn on the robot and the PS2 and hopefully the two link (Red/Green light on solid). Then hit start button to wake up the robot. You can use the Triangle button to raise it to default height and then use the Left joystick to move around.

If any of these steps do not work, it again would help to see pictures of your robot, from a few different angles. One hopefully showing the Arc32 with its wiring. Also ones showing it from top and angle where we can see if all of the legs look like they are constructed properly (3 left legs, 3 right legs)...

Kurt


Attachments:
File comment: Test Program for PS2 on an Arc32
arc32 ps2 test.bas [3.44 KiB]
Downloaded 257 times
Top
 Profile  
 
 Post subject: Re: PLEASE HELP for connecting PS2 to the new ARC32
PostPosted: Mon Apr 22, 2013 11:34 am 
Offline
Citizen

Joined: Tue Dec 25, 2012 10:57 am
Posts: 26
I dont know I think the ARC32 is broken coz I was trying to connect it it says unknown device.
there is only a green light do u think is broken?


Top
 Profile  
 
 Post subject: Re: PLEASE HELP for connecting PS2 to the new ARC32
PostPosted: Mon Apr 22, 2013 6:06 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Sorry, you have not given me any sufficient information to give you any clues.

What says unknown device? When you plug in the Arc32 to your PC? What type of PC? What OS?

If it is the installing device driver failed message? Then guessing you are running Windows 7 or the like in 64 bit mode.
Then you should go to the Basic Micro download page: http://www.basicmicro.com/Downloads_ep_43.html

Then download the USB driver from that page, then look at the Readme or the like contained in the zip file that gives you step by step directions on how to install the driver on a 64 bit OS. You need to follow those steps carefully... I know it works as I had to do this yesterday with my old Arc32 as I had not used it on my newer machine.

If this is not the issue, again go back to my earlier posts and provide additional information and pictures... When all else fails, I then start by removing all of the wires attached to a processor, except the power connections and then plug in the USB and see if I can get the processor to talk to me. If I can then I start plugging stuff back in, maybe a few servos at a time and see if it still talks... If not probably something I just connected now right, so figure out what is wrong there.

Also I usually have a 9v Battery connected to the VL power connection on the board. Try new battery. ALso check jumper settings. If servos are connected to board and your jumpers are such that VCC (+5v) is passed to the servos instead of VSS (battery voltage) than the servos will draw more power than the voltage regulator on the board can produce and it will not run... Again pictures help to debug things like this!

Kurt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO