Shop OBEX P1 Docs P2 Docs Learn Events
Basic stamp 2 and basic programming. (i need help!!!!). — Parallax Forums

Basic stamp 2 and basic programming. (i need help!!!!).

TONIXTONIX Posts: 8
edited 2004-09-25 09:40 in BASIC Stamp
Hello, I have bought, the robot "Carpet Rover", that is made up of the following components basically:
- 1 CONTROLLER MOTORS DC DOUBLE (Dual H-Bridge driven).
- 1 BASIC STAMP 2.
- 1 CIRCUIT NEXT STEP FOR BS2.
- 1 IR Proximity Sensorial Detector.
- 1 Tracker Sensor.
- 2 Gear Motor Head - 7.2vdc 30:1 291rpm (6mm shaft).
·
Good, so that east robot works does it lacks a program, which causes that this robot follows a line marked in the ground and, when, you put an object to him in the middle of the line, for the robot and when it exempt, it follows its trajectory, in addition, also it can work without to follow a line. (That is to say, I want that it makes the same functions, that they show in the videos of the Web of Lynxmotion.com).
·
Good, because so that does all these functions, a program in BASIC makes lack, that is inserted in the memory of microprocessor, so that it makes all these functions. Good, I would like, if she is possible, that they facilitated the programming code to me, in format .bs2, to make work this robot. Thanks. (I NEED HELP!!!!!!).
My Operating System is Windows XP.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-16 19:04
    You should be able to get demonstration code from the robot vendor. Have you contacted them? You robot was not made by Parallax, so we won't have off-the-shelf demo code. And it will be difficult for forum members that don't have the same robot to assist unless you can provide an accurate schematic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2004-09-16 23:34
    Tonix,

    I don't know the Carpet Rover, but you should contact the manufacturer for some assistance. You have identified lots of specific hardware and at least several of the parts you mentioned could have different types of interfaces (digital, analog, serial?) so it's nearly impossible for us to write code for you at this point, or even determine what the robot is doing wrong.

    Like Jon said, contact the manufacturer and get some sample code and documentation. The problem isn't your operating system, it's the lack of documentation and examples provided by the robot company. If you can get some example code from them and post it here that would be a start.

    Ken Gracey
    Parallax, Inc.
  • cabojoecabojoe Posts: 72
    edited 2004-09-17 02:57
    Lynxmotion has tons of downloads available, scroll to the carpet rover section: http://www.lynxmotion.com/ViewPage.aspx?ContentCode=downloads&CategoryID=21

    EDIT: The components you got (i.e. the motor controller and the gearmotors) are not "stock" items on the carpet rover. Did you order components separately? If this is the case you will need to write your own programs, since the Carpet Rover normally uses full rotation servos for the wheels and Lynxmotion's programs are written for this. You got some real nice components, congrats.



    Post Edited (cabojoe) : 9/17/2004 7:36:35 AM GMT
  • TONIXTONIX Posts: 8
    edited 2004-09-17 11:30
    Exactly, the robot that I have mounted, is most similar to "Carpet Rover" of Lynxmotion, but, some pieces I have changed them, like by example, to him I have not put servo, and however, I have put him two motors connected to a controller of motors and this connected to the controller whom it controls microprocessor BASIC Stamp 2. For that reason, I request, that if somebody knows to program in BASIC that please helps me, because, logically, I don’t have found no code that serves to control this robot in Internet. By assumption, this entire robot uses digital systems. Anyway, in page of Lynxmotion, are all the electronic schemes.
    ·
    Good, if somebody knows to program in BASIC, that please, me help to program this robot, since in Internet, I at least, haven’t seen no code so that east robot works. Thanks.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-17 12:41
    Chances are that everyone who visits this forum knows something about BASIC, as that is the core language of the BASIC Stamp. That said, it is not possible to assist without see you design. Since you have customized your robot, you're going to need to post a schematic at the very least, as well as specifics of the components you're using.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2004-09-17 16:46
    Tonix,

    You will need to show a schematic to us to help you. You're asking us to reverse engineer something we have not seen, so it's helpless. You mention that you've got the Carpet Rover, but you've taken out the servos and put in a motor controller and maybe some DC motors. That's a start, but you haven't told us about the brand, manufacturer, etc so we can't possibly begin to "write code" to explain how to control this robot. If this is a stock kit which has been modified using parts from the same supplier, he has every responsibility of helping you get this robot to run. If he can't do that then simply return the robot.

    If you can provide us with links to your exact schematic, or portions of a schematic, we could start to help. But at this point we're in the same position as you.

    Ken Gracey
    Parallax, Inc.
  • TONIXTONIX Posts: 8
    edited 2004-09-17 19:32
    Hello, you have the scheme of the electrical circuit here of robot (FILE.ZIP), thus is since I have interconnected all the components between if, if you want to see the electrical scheme of each component of the robot in individual, you can go a www.lynxmotion.com Thanks and, I wait for some answer to this problem in the greater possible brevity. Thanks.
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2004-09-17 19:43
    Can you point us to the motor controller specification? Also a Lynxmotion product?

    Thanks,

    Ken
  • TONIXTONIX Posts: 8
    edited 2004-09-17 20:29
    Yes, here you associate the Controller Motor = Dual Motor H-Bridge Driver, in the file: "CONTROLLER.JPG ". And here I specify the characteristics to you of this controller:

    attachment.php?attachmentid=74075
    [font=Verdana, Arial, Helvetica, sans-serif]
    • 4.8v - 12vdc
    • 4 amp Peak
    • 2 amp Continuous
    • Dual Channel, TTL Input
    • Driver type = L298 IC
    • Chip rated voltage = 46 vdc max
    • Chip rated current = 2 amps max
    • DHB Motor voltage = 20 vdc max
    • DHB Motor current = 1 amp max
    • I/O required = Four TTL level lines (outputs)
    • Supply capacitance = 330uF 20v
    • Logic voltage = 5vdc regulated
    • Onboard regulator = None
    • Current requirements (5v) = 36mA
    • PC board size = 2.3" x 3.0"

    And this product is of·Lynxmotion.[/font]
    113 x 31 - 297B
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2004-09-17 22:30
    Tonix,

    I'm not going to support their product, but I can get you started by demonstrating how it works with the BASIC Stamp. Lynxmotion should be providing sample code for the BS2 if they sold this to you. Their documentation is here: http://www.lynxmotion.com/images/data/dhb-v2.pdf·and it shows that for each motor there are three I/Os connected to the BASIC Stamp from the motor controller.

    Your first goal should be to get one motor to turn, then the other. Once you've achieved the basics then·you should consider adding additional features for the infrared sensors to your code.

    The motor controller has three signal lines to connect to the BASIC Stamp:

    aEnable······· CON· 0
    aInputPlus···· CON· 1
    aInputMinus····CON· 2

    Start:
    · HIGH aEnable
    · HIGH aInputPlus
    · LOW aInputMinus
    · PAUSE 1000

    · LOW aEnable

    END

    This will turn one motor clockwise very fast - try it. After that you can add the second motor. Next you will build a PBASIC program that looks something like this:

    aEnable······· CON· 0
    aInputPlus···· CON· 1
    aInputMinus····CON· 2

    Start:
    ··GOSUB Motors
    ··GOSUB Sensors
    · GOTO Start

    Create routines for the different aspects of managing your robot and build the program one step at a time.

    Ken Gracey
    Parallax, Inc.
  • TONIXTONIX Posts: 8
    edited 2004-09-18 00:54
    I haven't obtained that the other motor works, single works one, reviews the code to see if it is I have done something badly. Thanks.
    ' {$STAMP BS2}
    ··· aEnable······· CON· 0
    aInputPlus···· CON· 1
    aInputMinus··· CON· 2
    Start:
    · HIGH aEnable
    · HIGH aInputPlus
    · LOW aInputMinus
    · PAUSE 1000
    · LOW aEnable

    ··· bEnable······· CON 0
    bInputPlus···· CON··· 2
    bInputMinus··· CON·· 0

    · HIGH bEnable
    · HIGH bInputPlus
    · LOW bInputMinus
    · PAUSE 1000
    · LOW bEnable
    END
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2004-09-18 02:40
    Tonix,

    Try this:

    ' {$STAMP BS2}
    aEnable······· CON· 0
    aInputPlus···· CON· 1
    aInputMinus··· CON· 2
    Start:
    · HIGH aEnable
    · HIGH aInputPlus
    · LOW aInputMinus
    · PAUSE 1000
    · LOW aEnable
    END

    Did that work? If not, I'm pretty certain that your right motor controller is not connected to P0, P1 and P2. Then, you need to talk to Lynxmotion for some code examples.

    Ken
  • TONIXTONIX Posts: 8
    edited 2004-09-24 12:49
    Hello, lamentably, it has not worked, that is to say, single the motor of the left worked perfectly, because the one of the right it was stopped. So not that I can do so that works this. I already have myself position in contact with Lynxmotion, but has said to me that they cannot do nothing. Thus that, I need aid so that works east robot.
  • TONIXTONIX Posts: 8
    edited 2004-09-24 17:48
    What solution has, so that east robot works??? Please, to help me!!
  • TONIXTONIX Posts: 8
    edited 2004-09-25 09:40
    I am very lost, I do not know like programming this robot in BASIC, so please, if somebody knows that it helps me, I do not havenor idea. Thanks.
Sign In or Register to comment.