Basic stamp 2 and basic programming. (i need help!!!!).
TONIX
Posts: 8
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.
- 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 Williams
Applications Engineer, Parallax
Dallas Office
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.
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
·
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 Williams
Applications Engineer, Parallax
Dallas Office
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.
Thanks,
Ken
[font=Verdana, Arial, Helvetica, sans-serif]
And this product is of·Lynxmotion.[/font]
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.
' {$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
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