Putting robotics at your service™

Free shipping on orders over $200

Programming assistance for my new Mech please (PS2)

Print view Share :
Previous topicNext topic

Page 1 of 5 [ 62 posts ]

1, 2, 3, 4, 5
Novice ( offline )
Posts: 72
Posted: 2010-03-27 14:24 
Hi Everyone, My name is Dennis, Im pretty new to this whole hobby. I have just finished constructing my machine, but am stuck on the programming aspect. Truth is I have absolutely no clue where to even begin and have looked around but am having a difficult time finding anything. So I figure I would describe what I am trying to achieve and see if any of you can guide me or point me in the right direction. So here is my Robot:







And here is a diagram of how I would like to control it wirelessly with the ps2 controller.



The image on the left is mode 1 and the one on the right is mode 2 and I was wondering if there might be a way to toggle between the modes via the select button on the controller. I have zero programming experience and would appreciate any assistance or tutorials that could help while keeping in mind that I would have to learn from scratch since I know nothing about that at the moment.

Also I have already connected the robot to my PC via bot board 2 and the atom pro ide software as well as the ssc32 via the lynx terminal software. All servos are responsive and functional and the I was able to also succesfully download and run a test program from lynxmotion with the ascending tones, so everything seems to be in working order. Thanks in advance


Novice ( offline )
Posts: 72
Posted: 2010-03-27 14:27 
Oh and I forgot to mention that my current set up has the ssc32 connected to the bot board2 and the servos and sabertooth motor controller connected to the ssc32. I am using the atom pro 28 chip on the bot board 2. Thanks

D


User avatar
Guru ( offline )
Posts: 3298
Posted: 2010-03-27 16:36 
hi dennis, Welcome to lynxmotion.
congratulation on your build. looks very complicated from a programming aspect.

Assuming you have everything set up the way it should be, Connection, etc then your half way there.
i personally would start with getting the Track system working first. you will find some tutorials here at Lynxmotion:

Tri-Track Tutorial for PS2 Control v1.0
http://www.lynxmotion.com/images/html/build138.htm

Tracked Vehicles + J5 projects
viewforum.php?f=24

i would start small and separate your project into section that you can work on. like i said start with the track then maybe the base rotate and head, then move to each of the arms.

no one will take your project on and program it for you, plus you will have lots more fun learning it yourself.
im only pointing you in the direction i think works best.

i like the hand you have made up there. they look very cool. 8)

you could start looking at different section of this forum to find the information you need. everyone here is really friendly and will be willing to help you how ever we can. :wink:


Great project.

_________________
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.


Novice ( offline )
Posts: 72
Posted: 2010-03-27 17:05 
Hi Innerbreed, thanks for your assistance, I really appreciate it. I definitely want to learn and program the machine myself. My concern is that it seems very overwhelming and at the moment I have not seen anything that can teach the process to me in a more straight forward approach. I have opened up some existing programs and quite honestly I am completely lost. I dont understand the syntaxes nor do I know where to look for their descriptions and definitions.

In that link you posted with the tritrack tutorial, I noticed that the wiring is set up without the ssc32. Currently I have the ssc32 as part of my configuration, do I actually need it or is it possible to control the entire machine simply through the bot board 2?

Also, I did download and succesfully program the atom pro 28 with that (ps2a4wd1.bas) file, but Im not getting any response from the machine, Im assuming this is due to the fact that my setup is using the ssc32.

Thanks for your help

D


User avatar
Guru ( offline )
Posts: 3298
Posted: 2010-03-27 17:22 
you will need the SSC with all those servos you have. you will need to make suure the commands are being sent to it from the Botboard. the connections would look something like this:


ignore the servo pins as they would be different from what you have connected, but you will notice on the SSC the wire is connected from the RX/TX pin to pin 10/11 of the Botboard.

to send the commands to the ssc from the atom the code would look like this.
Code:
;-------------------[SERIAL CONNECTIONS]abbII
SSC_OUT      con P11      ;Output pin for (SSC32 RX) on BotBoard
SSC_IN       con P10      ;Input pin for (SSC32 TX) on BotBoard
 


Code:
serout SSC_OUT,i38400,["#",DEC Index,"P1500",13]


serout sends out the command, SSC_OUT is the pin name, and then we send the flow rate of i38400. followed by the command its self.

the command here would center all the servos at there middle position.

i would have maybe started with a smaller project like the Brat and started to learn the programming there. down load some code and try and study it. when viewing the code on the IDE, if there is something in the code you dont understand just Ctrl+F and type that word in, and then press F3 and follow that word though out the code to see what/how its working. all questions welcome.

_________________
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.


Novice ( offline )
Posts: 72
Posted: 2010-03-27 17:47 
you are awesome dude, I really appreciate it. Im gonna do exactly as you say and just focus on one little thing at a time. I tend to be more mechanically inclined which is why I ended up bitting off more than I can chew in regards to the programing. But Im hpoing I will be able to pick it up over time. In the meantime what you posted is great, Im gonna try it out and keep you posted. I just found this on the site,



Its the schematic for Johnny 5 for SEQ, do you think that might be adaptable to my machine? both mine and the johnny 5 seem to have the same number of servos although a bit different in configuration. What do you think?

And also, Im not sure exactly what SEQ is for, but is that something that might make my learning a little easier? Should I implement its use in my project?


User avatar
Guru ( offline )
Posts: 3298
Posted: 2010-03-27 19:07 
well done, thats a better idea of what you can do. if you went with the schematic you've posted then do. would be easier. :wink:
great find. :)

sequencer is exactly what it says on the tin. its used to make up "Canned" sequences that you can execute at a given time. its used directly with the SSC.
its for controlling anything you build using up to 32 servos using the SSC-32. The main screen allows you to add servo control boxes, and position them on a grid. ie like this:


This visual representation of a robot makes it easier to position the servos for each sequence. Lots of other features. The program will even generate Basic Atom code as well.

personally i would use it if you feel it will help.
with the picture you posted i would expect sequencer to be used but you can also use the Botboard here as well.

_________________
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.


Novice ( offline )
Posts: 72
Posted: 2010-03-28 13:33 
so Im looking at the code I downloaded from the site called ps2a4wd1 and I wanted to know if there was a specific location where I needed to add the SSC32 code you showed me.


User avatar
Guru ( offline )
Posts: 3298
Posted: 2010-03-28 18:11 
hi iv just been looking through the code. way over my head. iv not use the sabertooth but here is the configuration you'll need to adopt.


after looking at the code i was able to add the simple sections to send the commands from the Botboard, to SSC, then sabertooth.
for now i have removed the P&T and gripper servos etc and just left the controls for the Tracks.

remember you will have to add the PS2 (not shown here) to Pins 12, 13, 14, and 15.


i would like some one else to look over the code i have posted here before using it. it has compiled in the IDE with no errors so from that point of view it looks ok but im no programming guru.

a second opinion would be great. :wink:
hope this sets you on the right track.


Attachment:
File comment: a second opinion would be great.
ps2_ssc_test.bas [6.9 KiB]
Downloaded 93 times

_________________
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.
Novice ( offline )
Posts: 72
Posted: 2010-03-28 21:30 
Good stuff, that is great. I will test it out tonight and keep you posted. I really appreciate all of your help. Do you or anyone by any chance know of a good book I could pick up for complete begginers that you could reccomend? I tried to look for some for dummies books but all I found was visual basic. I wasnt sure if that was relevant.


Novice ( offline )
Posts: 72
Posted: 2010-03-28 22:33 
ok, so I uploaded it and reconfigured the wiring, but unfortunately it did not work. I did notice, that one of the two led's on the wireless receiver is blinking, not sure if that means anything. I will keep messing around and see what happens.


Novice ( offline )
Posts: 72
Posted: 2010-03-28 23:23 
Ive been playing with it and so far, I got the light to stop blinking on the receiver. I noticed that the green Led ont the SSC32 is blinking really fast and that when I press L1 BotBoard 2 beeps 4 times, if I press L2 it beeps three times, the green led on the ssc32 also goes out when I press those buttons but not for anything else including the joysticks. I connected through terminal one via the IDE software and see some weird text scrolling through the window that pauses when I press L1 or L2. If I hold the right joyustick up, my computer makes a sound, but not through the computer speaker and actually through my regular speakers and its not a beep but rather one of the sound fx that happens when the computer brings up a dialog box but nothing else happens. Some communication happening but no movement.


User avatar
Guru ( offline )
Posts: 3298
Posted: 2010-03-29 11:55 
Vsions wrote:
Ive been playing with it and so far, I got the light to stop blinking on the receiver. I noticed that the green Led ont the SSC32 is blinking really fast and that when I press L1 BotBoard 2 beeps 4 times, if I press L2 it beeps three times, the green led on the ssc32 also goes out when I press those buttons but not for anything else including the joysticks. I connected through terminal one via the IDE software and see some weird text scrolling through the window that pauses when I press L1 or L2. If I hold the right joyustick up, my computer makes a sound, but not through the computer speaker and actually through my regular speakers and its not a beep but rather one of the sound fx that happens when the computer brings up a dialog box but nothing else happens. Some communication happening but no movement.


Reciever:
the LED on the receiver will blink when there is no communication from the controller.

for the SSC:
This is the Processor Good LED. It will light steady when power is applied and will remain lit until the processor has received a valid serial command. It will then go out and will blink whenever it is receiving serial data.

not sure why your computer would make a noise when you use the remote. :?

i will look though the code tonight to find out why the ABB beeps when you push buttons. it will be a simple sound command.

_________________
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.


User avatar
Guru ( offline )
Posts: 3298
Posted: 2010-03-29 13:11 
ok i have rewritten then code so its easier to understand. i hope.

it will be much easier for me to help you in a way i understand it.
please upload the following and let me know what the problems are (if any) and ill try helping from there. :wink:
you should notice that all the buttons will beep when pushed. this is just to see if they work. we can add commands here later.

you will also need to push "start" to initiate the code once turn on.

L1 and L2 should respond now, We should be getting some movement.


Attachment:
ps2_ssc_test2.bas [6.8 KiB]
Downloaded 90 times

_________________
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.
Novice ( offline )
Posts: 72
Posted: 2010-03-29 15:40 
ok sounds good, thanks. I will be uploading it the moment I get home from work.


1, 2, 3, 4, 5

All times are UTC - 5 hours [ DST ]. It is currently 2014-09-15 20:52
Feedback Form
Feedback Form