Shop OBEX P1 Docs P2 Docs Learn Events
Back to Basics Question — Parallax Forums

Back to Basics Question

MovieMakerMovieMaker Posts: 502
edited 2008-12-25 18:54 in Robotics
Using the Basic Stamp2 with the GUIbot software. I adjusted my servos to center @ 750. But, when I tell it to move forward, it moves backwards. When I tell it to go backward, it moves forward. Any answer to why this is happening?

Thanks!

http://forums.parallax.com/forums/emoticons/lol.gif
lol

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-24 15:56
    You may have the servos switched (right <-> left). On the BoeBot and similar robots, one servo goes clockwise for the robot to move forward and the other goes counterclockwise. The control pulses have to be longer than 1.5ms (PULSOUT <pin>,750) on one servo and shorter than 1.5ms on the other. For moving backwards, everything is reversed.

    Think about it. Make pictures. Experiment. Write a little program that just moves one servo, first the left, then the right.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-24 16:33
    OK, I unplugged the motors and plugged them in opposite. They did not work right. I plugged them back to original settings. I ran the GUI again and tested one small part at a time. I worked fine. I don't really understand why. But, it worked fine. Then I made a complex moves operation and it worked fine. I guess it was the way that they were calibrated.

    Thanks for your help.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-24 18:14
    I have started running all my tests from scratch. When I run SIMPLE roaming with PING it is really jerky. I imagine that this is normal. What would be the fix for that?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-24 19:52
    Can't tell you for sure without you attaching the source for your actual program attached to a message. DO NOT cut and paste a large program into a message.

    Programs that result in jerky movement using servos nearly always have timing problems where the servo control pulse is not repeated at least every 20ms.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-24 23:16
    The program was the entire SimpleRoamingwithPingv1.0.bs2 that comes straight from the Parallax site. It is unaltered. I like that the BS2 runs on this with compatibility now.

    thanks for your reply.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-24 23:36
    I found the PING))) webstore page and downloaded the demo software and it was "Roaming With Ping".
    I don't readily see any "SimpleRoamingwithPingv1.0.bs2". How about at least a link so I know what you're talking about?
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-25 01:09
    I am having trouble finding it. But, it was just like the regular one except it had no IR stuff on it. I could have sworn I got it from Parallax. I will look some more.

    Also, I have had NO luck at all trying to work with the IR detectors. I purchased the Sharp IR pair that has both units built in and it requires a 10-12k pull-up resistor from signal to ground. It has 4.5-5.5 volts in on red and Signal in on Yellow and ground. My question on this is, I should be able to hook this up like I do the Ping, Correct?

    Let me look for where I got the program. It works wonderfully nice except for the jerkiness.

    smile.gif
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-25 01:12
    In the mean time, here is the file. It is not long at all.

    I guess it is not Parallax because they would have more documentation inside. I don't remember where I got it.

    Post Edited (MovieMaker) : 12/25/2008 1:19:14 AM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-25 09:47
    I don't need any more help with Roaming with Ping because I solved my problem by downloading the REAL Roaming with Ping. All I had to do was remark out the IR part of it and it worked fine.

    I still need advice on Installing the Sharp IR sensors. I believe I have to use an 8 Bit AD converter? How would the code go, if it is not too much trouble for someone to help me. The IR thing has been a nightmare. I must have a mental block against it or something. Everything else works fine. I have to figure out how to give it 4.5-5.5 volts.

    Hope Santa has been good to everyone. God Bless! and Happy New Year! I opened my present early so I could work with the boe-bot and I have been having a Blast!

    Post Edited (MovieMaker) : 12/25/2008 4:40:02 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-25 16:50
    There's all sorts of information available on analog to digital converters and Stamps. Start with the "Basic Analog and Digital" tutorial. The StampWorks Manual also shows how in Experiment #28.

    What's the difficulty with supplying 4.5 to 5.5V? That's what the Stamp uses, so there's a ready supply (Vdd) on the BOE.

    I really think you should treat yourself by setting aside some time and browsing the table of contents of the Parallax tutorials and the Nuts and Volts Columns. Most of what you need and will need is already well documented (with sample code!) with nice explanations and specific examples. They're all available in downloadable form for free. I'd suggest that you download them all as you browse so you'll have them on hand when you need them.
  • MSDTechMSDTech Posts: 342
    edited 2008-12-25 18:28
    There are also schematics and code for the Sharp GP2D12 on the Crustcrawler site at:
    http://www.crustcrawler.com/code/index.php?prod=20
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-25 18:54
    Thank You both for your suggestions. I will follow them. I am having so much fun with my boe-bot.
Sign In or Register to comment.