go_away

Author Topic: Help with programming my mobile robotic arm  (Read 935 times)

0 Members and 1 Guest are viewing this topic.

Offline zman35Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Help with programming my mobile robotic arm
« on: September 08, 2010, 12:38:10 PM »
Hi everybody this is my time posting on here. Im working on a senior project of a wireless mobile robotic arm that I bought from a company called Lynxmotion. Ive already built it and made it wireless, now I want to write a program to show both in my presentation. I used their IDE when I was testing a few things that were in Basic. There is an option so I can use C/C++ which I do have some knowledge of.  I took the class a couple yrs ago. Im taking a class right now for programming microprocessors and my Prof. is teaching it in C (not C++). I think between that class and this forum I can build a program for my bot, maybe trying to keeping it in C. Id like for for it go forward about 3 ft and pick something up and then move it somewhere else. A problem that I may have is that the usb/serial port cable is pretty short. I dont know if I can compile and run the program, then unplug it so it can run the bot. Some how delay it in the beginning of the program for 10 secs. maybe use a while loop for a couple of rotations on the motor before they start up. I'll video tape it and post it on here when Im done. Just need to get pointed in the right direction, asking questions when I get stuck. The pic that I sent is the circuit board of my bot...serial port cable on the bottom and plugs for the servos and motors on top. I also have two separate switches one for the microcontroller and the other for the motors. I cant believe I dont have pics of my robot completely built just to get an idea. If needed I'll take some and post them.
Thanks.    
« Last Edit: September 08, 2010, 02:53:32 PM by zman35 »

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: Help with programming my mobile robotic arm
« Reply #1 on: September 09, 2010, 08:31:56 AM »
Id like for for it go forward about 3 ft and pick something up and then move it somewhere else. A problem that I may have is that the usb/serial port cable is pretty short. I dont know if I can compile and run the program, then unplug it so it can run the bot. Some how delay it in the beginning of the program for 10 secs. maybe use a while loop for a couple of rotations on the motor before they start up. I'll video tape it and post it on here when Im done. Just need to get pointed in the right direction, asking questions when I get stuck.

I hope you do well with your bot. As for the 'delay' there are quite a few ways of accomplishing this. The other bit to keep in mind, a couple of rotations/iterations on a loop with a modern CPU or micro-controller can be a VERY VERY short fractional percent of a second.

I would simply create a loop that waits for you to press a button (simple push button) on the bot to activate it. This would provide the additional feature of allowing the bot to repeat the process on command, and also prevent it from looping the process without being instructed.

To actually delay your application, there would likely be a 'delay' function built into your coding platform. If not, you can build one using the timers/clock counters of the CPU. I was unable to identify the microcontroller on your board, I am ASSUMING that it is one of the Basic Atom style boards. If this is the case you will likely have the following available BASIC function:
PAUSE - Delay (1mSec resolution)
PAUSE 1000 '1 second pause I believe

Just as a thought, you may include slight pauses between your bot's individual actions. This will exaggerate the movements to the audience of the presentation. It will also, depending on your controller, allow the motors to catch up with your commands.
-garrett

Offline zman35Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Help with programming my mobile robotic arm
« Reply #2 on: September 09, 2010, 10:48:52 AM »
Hey garrettg84 thanks for the reply. I was also thinking that the while loop would be the easiest way to start my program since I have two separate switches for the microcontroller and the motorcontroller. The microcontroller is a Basic Atom Pro 28. I would need to first turn on the switch to the microcontroller so it is able to communicate with my laptop and then of course create that loop that will wait for me to turn on the motorcontroller for the wheels. I'll probably start off with something simple like having my bot move forward a couple of feet and then stop, see how that goes. I added two pics...one of my bot and the other one shows the two switches on the left, the circuit board w/the servo plugs and the ones with tags are the L/R motors.   

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: Help with programming my mobile robotic arm
« Reply #3 on: September 09, 2010, 07:33:58 PM »
That looks like a pretty cool implementation. I'm jealous of your hardware =( I'm still building my arsenal of micro-controllers and things. I'm more apt to the programming side robotics. I barely have any knowledge of circuitry and motors and things in the physical world.

Good luck with the coding, and if you struggle let us know!
-garrett

 


Get Your Ad Here