Lynxmotion Tech Support

www.lynxmotion.com
It is currently Sat May 18, 2013 4:19 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu May 31, 2012 7:48 am 
Offline
Roboteer

Joined: Mon Jun 06, 2011 3:13 pm
Posts: 27
In fact after looking at the bas files, I can easily interpret what I need to send over to emulate the DualShock controller, and in deed what to set the chesum ( (0) to enbale it to pass through... phew :)

Matt


Top
 Profile  
 
PostPosted: Thu May 31, 2012 2:01 pm 
Offline
Robot Guru
User avatar

Joined: Fri May 25, 2007 8:21 pm
Posts: 3868
Location: Central Coast, CA, USA
If you're going to use a PIC32, you might as well use a BotBoarduino, and C code along with the SSC-32.

The PS2 is fine, but with a project of this magnitude, why not use the DIY remote, or use R/C spread spectrum to control/communicate with your 'bot?

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
PostPosted: Thu Aug 02, 2012 9:46 pm 
Offline
Roboteer

Joined: Mon Jul 30, 2012 9:46 pm
Posts: 5
Hi

I have a MSR-H01 with a ARC32 and Lynxmotion PS2 wireless controller. I am using the Beta Phoenix 2.1 code. I acquired the parts over 6 months and finally assembled it and for the most part it is working.

The first question I had is in the config file there is a section [LEG DIMENSIONS], do these need to be modified? I tried a test to modify some of the dimensions to match the leg and it did not work, the legs went to up their stopping point.

The second question, is there a simple way to add a pan and tilt function? The MSR-H01 has the parts but my programming is still limited, so if anyone any code samples would be great. If not maybe the could be a additional option for the next version of the code, I would really like to get this part working.

Sorry if this is not posted in the correct location.
Thanks.


Top
 Profile  
 
PostPosted: Fri Aug 03, 2012 7:44 am 
Offline
Robot Guru
User avatar

Joined: Wed Feb 27, 2008 8:59 am
Posts: 3139
Location: Online @ innerbreed.co.uk
Mazemaker wrote:
The first question I had is in the config file there is a section [LEG DIMENSIONS], do these need to be modified? I tried a test to modify some of the dimensions to match the leg and it did not work, the legs went to up their stopping point.

The second question, is there a simple way to add a pan and tilt function? The MSR-H01 has the parts but my programming is still limited, so if anyone any code samples would be great. If not maybe the could be a additional option for the next version of the code, I would really like to get this part working.

Thanks.



yes and yes.

you will also need to configure the initpos & min max values.
i also used the MSR-H01 Hexapod, but using ABB2 with ATOM 28 Pro, SSC32
http://www.hexapodrobot.com/forum/viewt ... f=25&t=367

Image

_________________
Jonny Poole,
Freelance Concept Art & Animatronics, 3D Art and 3D Modelling, as well as Physical Modelling, Mechanical design, and illustration.
http://www.innerbreed.co.uk/
Create, Innovate, Inspire.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2012 9:14 pm 
Offline
Roboteer

Joined: Mon Jul 30, 2012 9:46 pm
Posts: 5
Hi Innerbreed
I looked at your code and I don't think my definition of simple code is the same as yours :)
I tried to use the differences between your code and the original 1.3 code to just pull out the pan and tilt function.
Then inserted the changes into the phoenix 2.1 arc32 code, I did not break the code, it just doesn't work for the pan and tilt.
I think there are two problems, one is how to switch the controls to pan and tilt only, the second is Serout SSC_OUT commands I am not sure how to use it with the arc32. I attached a text file to try to show the changes I made by indicating what was added to which file but it may or may not be helpful.

Also I think I am am biting off more that I can chew. Is there a version of phoenix code that is closer to the your version that also works with the arc32. I think if they were not so different I might have a better chance of modifying it.

Thanks


Attachments:
difference.txt [5.48 KiB]
Downloaded 41 times
Top
 Profile  
 
PostPosted: Thu Aug 09, 2012 8:43 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
The serout you mentioned for the HeadPanAngle and HeadTiltAngle as you know are specific to the SSC-32 versions of the code. If I were doing it, where those lines of code are in the main core (or PS2 control) code, I would probably add it conditionally (depending on something like is the servos defined) with some form of Gosub that did this like: gosub UpdatePanandTiltAngles[HeadPanAngle, HeadTiltAngle]

I would then implement this function in the driver files (SSC-32 and Arc32). You have the basics of the SSC-32 version there. What you need to do for the Arc32 is to convert this to the HSERVO command. As you probably know the HSERVO coordinate space is different than the SSC-32. SSC-32 the coordinates are in uS centered at 1500, whereas the HSERVO is in clock ticks minus the number of clock ticks in 1500us (ie 0 is the center point). I believe the conversion for the Arc32 is: (x * 20) - 3200 where x is the number of us.

Several threads talking about HSERVO including: viewtopic.php?f=4&t=3224

Good Luck
Kurt


Top
 Profile  
 
PostPosted: Sun Aug 19, 2012 8:36 am 
Offline
Roboteer

Joined: Mon Jul 30, 2012 9:46 pm
Posts: 5
Ok, I till try to get this working one step at a time. The first part I tried is to try to activate speaker and eyes using L3. I added this code to PS2 control.
Code:
PTMode               con 5
   
;PTMode
   IF (DualShock(1).bit1 = 0) and LastButton(0).bit1 THEN   ;L3 Button test
        sound cSpeakerPin, [50\1000]
    IF ControlMode <> PTMode THEN
       ControlMode = PTMode
       IF (SelectedLeg=255) THEN
       ELSE
         ControlMode = SingleLegMode
       ENDIF
          ENDIF
   ENDIF


;[PTMode]   
   IF (ControlMode=PTMode) THEN
       pause 100
       sound cSpeakerPin, [50\2000]
       low cEyesPin
            pause 100
            sound cSpeakerPin, [50\4000]
            high cEyesPin
    ENDIF

What I am seeing is it seems to detect the button push, it stops the walking mode, but it doesn't activate sound or eyes. So i am not sure why it doesn't get to the PTMode.
The second problem is it will not exit the PTMode by pressing L3 again, it will exit to a different mode so I think it is not detecting lastbutton. Thanks for any help.


Last edited by kurte on Sun Aug 19, 2012 8:57 am, edited 1 time in total.
code block


Top
 Profile  
 
PostPosted: Sun Aug 19, 2012 9:08 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
A quick look through your code, you have bits and pieces of other code, and may have some other side effects...

Maybe it should look more like:
Code:
    PTMode               con 5
       
    ;PTMode
       IF (DualShock(1).bit1 = 0) and LastButton(0).bit1 THEN   ;L3 Button test
          sound cSpeakerPin, [50\1000]
          IF ControlMode <> PTMode THEN
             ControlMode = PTMode
          ELSE
             ControlMode = WalkMode
          ENDIF
       ENDIF

    ;[PTMode]   
       IF (ControlMode=PTMode) THEN
           pause 100
           sound cSpeakerPin, [50\2000]
           low cEyesPin
                pause 100
                sound cSpeakerPin, [50\4000]
                high cEyesPin
        ENDIF

But would probably need to make sure the code is positioned in the right places... Such that it can execute...

Kurt


Top
 Profile  
 
PostPosted: Sun Aug 19, 2012 3:34 pm 
Offline
Roboteer

Joined: Mon Jul 30, 2012 9:46 pm
Posts: 5
That did help, I am able to get in and out of the commands using the L3 now. I am getting some unexpected leg movement but I will look at where the code is positioned to see if I can eliminiate it.

Thanks
Don

Revised
The unexpected leg movement was a dead battery not code position. It seems like it is working as expected. I can work on the next part, Yea!
Thanks


Top
 Profile  
 
PostPosted: Thu Aug 23, 2012 9:23 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
I thought I should mention, that for many projects such as this, you probably should look for the latest software up at the Lynxmotion Github account: https://github.com/lynxmotion

Kurt


Top
 Profile  
 
PostPosted: Wed Aug 29, 2012 7:29 pm 
Offline
Roboteer

Joined: Mon Jul 30, 2012 9:46 pm
Posts: 5
Thank for the location. I tried to modify the existing code and did get it to work. But it was not very clean and if there is a new version I did not want to need to add all the changes again. I also liked the idea of being able to use it only if needed, so I tried a different route by making a seperate file to hold the Pan and tilt changes and use a gosub to get to it. I am sure it could be made better but It seemed to work ok. I uploaded it in case it may be helpful. Thanks


Attachments:
phoenix_PandT_Mod.bas [1.59 KiB]
Downloaded 61 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group