Needed some help for a robot
Hey guys my friend had an old robot and I have been reading it is called a bs2 board of education (its green) and he has a ping ultrasonic sensor on the white board(which are 2 circles on a plane), he showed it to me the other day and we wanted to get it up and running to just move forward and avoid things like walls, so we went online and downloaded a program to (Basic Stamp Editor -2.4.2 I think) and we tried putting something called "roamingwithping.bs2" on it which we found on some website (it was this one I think) and some other codes but so far we cant make it move, and sometimes it moves but just like it turns when its not supposed to and doesnt really work well.
I was wondering if there is a place where I can get a simple code for the robot to "just move forward and avoid things" (I dont know if theres a robotic way to say it). I have tried looking around around this website with no luck, but maybe I am just looking in the wrong place.
Me and my friend dont know how to program even though we have looked at a couple of tutorials with no luck.
If anybody could help us out or provide us with a code I would appreciate it, sorry if I am posting on the wrong part of the forums I just joined a couple of minutes ago to ask for some help
Thanks in advance. : D
I was wondering if there is a place where I can get a simple code for the robot to "just move forward and avoid things" (I dont know if theres a robotic way to say it). I have tried looking around around this website with no luck, but maybe I am just looking in the wrong place.
Me and my friend dont know how to program even though we have looked at a couple of tutorials with no luck.
If anybody could help us out or provide us with a code I would appreciate it, sorry if I am posting on the wrong part of the forums I just joined a couple of minutes ago to ask for some help
Thanks in advance. : D
Comments
www.parallax.com/tabid/535/Default.aspx
www.parallax.com/tabid/440/Default.aspx
www.parallax.com/Store/Robots/RollingRobots/tabid/128/CategoryID/3/List/0/SortField/0/Level/a/ProductID/302/Default.aspx
www.parallax.com/StoreSearchResults/tabid/768/txtSearch/ping/List/0/SortField/4/ProductID/92/Default.aspx
I see that y'all have done your home work to get to this point. I know what its like getting redirected over and over again. Go look up this and that. Bla,bla,bla,
Attach Your code and I'll help You with it.
I'll help explain whats happen in the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
$WMc%, I dont have a code that I am doing myself, I just want a simple code to make the robot move around and avoid things (such as walls, and solid objects), I dont want to post the code since I just downloaded it from the internet and it is not my own, but I do not know how to make one, and I know 0% about programming, I am reading the "Robotics with the BoeBot" but having a hard time since I only heed to make it go forward detecting with ultrasonic sensor, and pretty much see something on right len (the ultrasonic eyes) and go left, see something on left len and go right, see on both go back and turn around or something. Those are the basics I was reading on some internet page there. Thats really all I would want it to do, but, so far nothings come along, Ima keep on reading.
Look down the page and get the "Roaming with Ping)))" files and while you're there look at the video.
If you don't know what you are doing now it is better that you learn than if someone gives you all the code. (when you want to make it do something else you will have a better understanding of what you need to change)
Good Luck, welcome and have fun.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
It doesn't matter who made the code! Just post what your using.I will help you understand what the code is doing.Many other members will jump in to point out errors and find fault in the code at hand.In the end you will gain a whole new understanding of the BS2!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
anyways I have to go for now, thanks for all of your help till now I will read more about it later and give it a try.
I am using the roaming with ping))) code from here
http://www.parallax.com/tabid/768/ProductID/92/Default.aspx
If you cannot move the Ping to the left/right then the robot will·have no way to determine·left from right, only what is ahead.
Lots of kids work with the Boebot.
Some members have tried to lead you in the right direction, but you're resisting.
Do you want a hand or a hand-out?·
If you do not want to learn, then say so.· "I am warock56 and I am not smarter than a 5th-grader" will suffice.
Hang in there.The code you posted is Huge, It has so many REM statements that its got Me confused. I'll have a much abbreviated code shortly.
I was just a kid when I started out in elc. about 26 years ago!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
There's no ready-to-use program for the BoeBot that uses a PING without the servo and servo bracket that allows it to scan back and forth. You can easily modify the "Roaming with PING)))" program to turn the BoeBot instead of just the bracket. It won't work as well since the BoeBot will slip a little as it pivots and the program will not be able to keep track of its position as well as it would with the bracket. You'll have to learn enough programming to make the changes yourself.
Remember that the BoeBot is not intended to be used as a toy with ready-to-go programs. It's intended for learning about microcontrollers and basic robotics and the programs that are provided are given as examples and you're expected to learn how they work, modify them for your own purposes, and perhaps improve them and share them with others.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PG
also the green cable that connects to it we do not have green cables...
Post Edited (warock56) : 12/8/2009 2:51:29 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer."
I sort of got it working, only have one ir led so when I put it on one side the robot turns one way, when I put it on the other the robot continuously turns the other way.
My friend has the other led so I can not be sure it works until tomorrow, I read 3 different tutorials and came up with the code on the bottom, if it will work, I will let you guys know tomorrow.
this is what I have so far:
' {$STAMP BS2}
' {$PBASIC 2.5}
irDetectLeft VAR Bit
irDetectRight VAR Bit
pulseLeft VAR Word
pulseRight VAR Word
FREQOUT 4, 2000, 3000
DO
FREQOUT 8, 1, 38500
irDetectLeft = IN9
FREQOUT 2, 1, 38500
irDetectRight = IN0
IF (irDetectLeft = 0) AND (irDetectRight = 0) THEN
pulseLeft = 650
pulseRight = 850
ELSEIF (irDetectLeft = 0) THEN
pulseLeft = 850
pulseRight = 850
ELSEIF (irDetectRight = 0) THEN
pulseLeft = 650
pulseRight = 650
ELSE
pulseLeft = 850
pulseRight = 650
ENDIF
PULSOUT 15,pulseLeft
PULSOUT 14,pulseRight
PAUSE 15
LOOP
Some pics of the Robot
img46.imageshack.us/g/dsc02702b.jpg/
If anyone can comment on anything that could be wrong...
It would help me out.
The first couple of lines of code
"irDetectLeft VAR Bit
irDetectRight VAR Bit
pulseLeft VAR Word
pulseRight VAR Word"
were taken from some guide online. I dont know what they are but I know that it needs it so their there.
Instead of 12,13 I used 14,15 on the servos because 12,13 dont work on our robot.
Its probably not much code but it took me the afternoon...
Post Edited (warock56) : 12/8/2009 3:42:36 AM GMT
I tried using a code that checks if your leds are detecting, should show a 1 if not detecting and a 0 if detecting, it is always on 0.
Edit: I am thinking it may be I did not shield the led's, if this is the problem what could be a way to shield them with common household materials, like paper or something.
Post Edited (warock56) : 12/8/2009 3:56:01 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PG
Video of it moving around the table.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PG
Edit: Yea btw it stopped going backwards as soon as I put the shields on the LED's. That was the high point of my day today.