It looks like you do not have any pause commands in the program. You would want to add PAUSE 20 in each one of your FOR...NEXT routines. The servos need a small period of time before another pulse can be sent.
For example:
*CURRENT CODE*
FOR COUNTER = 1 TO 150 · PULSOUT 12, 850 · PULSOUT 13, 650
NEXT
*CHANGE TO*
FOR COUNTER = 1 TO 150 · PULSOUT 12, 850 · PULSOUT 13, 650 · PAUSE 20
NEXT
You can also refer to the Robotics with the Boe-Bot chapter 4 for servo control review.·If you do not have that book here is a link to the free download.
What it the voltage on the battery pack? It sounds like the BASIC Stamp is resetting because of lack of power. Do you have a volt meter to verify the voltage?
The robot ran through the course once very well after replacing the batteries, but after slightly modifying the program the robot started doing circles and now will not work
I would suggest writing the program as it was when it ran through the maze well, and save a copy for backup. Once you have a copy, open up the backup, save it as another file name (so you don't change the backup in accident),· and start changing the program around to see if you can get it to do more advanced techniques; but you will then have a backup to start over from if you need to.
Feel free to post what you have or ask questions and I will try to recommend some changes; or I can help if you need help creating a back up program.
We are thinking that there may be a virus in the memory or on the board, is there a way to access the memory from the brain so we can wipe it clean and start over?
When you download a new program from the Stamp Editor to a Stamp, you replace any existing program with the new one. You do not need to erase the rest of the Stamp's EEPROM.
Thank you - We are at a loss as to what to do next. We have tried a new brain, new board, different power source, programs that we know work on other robots, and this program on other robots. Our program will work on other robots but other programs and our program will not run on ours. Any ideas???
Mr. Donelson has made lots of suggestions and you've followed some of them. You need to answer his questions and follow his suggestions. It would also help for you to post your changed program with the description of how it behaves. Most likely it doesn't work because there's an error in the program. What robot are you using? I'm guessing that it's a BoeBot, but you didn't say and that's important information.
As Mike suggested, the more information you provide, the easier it is to help with a solution; however on Alicia's defense, I spoke with her class's contact person prior to posting the thread on the forums, so I knew what robot they were using. It is a good habit to follow suggestions and provide feed back as much as possible, which enables the helper to follow the progress and suggest other alternatives if the previous suggestions has not worked.
Since the program was working prior to the changes made, were you able to re-write the program that worked and save it?
Thank you for your feedback. We were able to rewrite the program that was working and it works on other BOEBOTS that are working properly, but it does not work on this particular one. We have noticed that the servos some times need a little push in order to work properly but the Boebot is still not running the program properly. We are trying the program that Joshua suggested and will let you know how it works.
We tried the program and then loaded the one that we wrote that we know works to no avail. We are supposed to compete at a robot expo tomorrow maybe the people there can help us.
Divide your code into small pices doing just single task.
Insert DEBUG and temporary END.
Test.
Continue·to do so untill the real end.
You will see your coding error!
Learn how to implement subroutine - your code will be·cleaner and less·coding error prone.
DEBUG " GOOD-MORNING STARSHINE THE EARTH SAYS HELLO"
COUNTER VAR Word
FOR COUNTER = 1 TO 150 · PULSOUT 12, 850 · PULSOUT 13, 650 · PAUSE 20
NEXT
' insert this here ·DEBUG CR, " GOOD-MORNING STARSHINE THE EARTH SAYS HELLO" ·END
.......
FOR COUNTER = 1 TO 223 · PULSOUT 12, 850 · PULSOUT 13, 750
NEXT
.......
repeat .....
Comments
It looks like you do not have any pause commands in the program. You would want to add PAUSE 20 in each one of your FOR...NEXT routines. The servos need a small period of time before another pulse can be sent.
For example:
*CURRENT CODE*
FOR COUNTER = 1 TO 150
· PULSOUT 12, 850
· PULSOUT 13, 650
NEXT
*CHANGE TO*
FOR COUNTER = 1 TO 150
· PULSOUT 12, 850
· PULSOUT 13, 650
· PAUSE 20
NEXT
You can also refer to the Robotics with the Boe-Bot chapter 4 for servo control review.·If you do not have that book here is a link to the free download.
Robotics with the Boe-Bot:
http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Roboticsv2_2.pdf
Please let me know what your results are,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
What it the voltage on the battery pack? It sounds like the BASIC Stamp is resetting because of lack of power. Do you have a volt meter to verify the voltage?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
I would suggest writing the program as it was when it ran through the maze well, and save a copy for backup. Once you have a copy, open up the backup, save it as another file name (so you don't change the backup in accident),· and start changing the program around to see if you can get it to do more advanced techniques; but you will then have a backup to start over from if you need to.
Feel free to post what you have or ask questions and I will try to recommend some changes; or I can help if you need help creating a back up program.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
Thanks,
Alicia
When you download a new program from the Stamp Editor to a Stamp, you replace any existing program with the new one. You do not need to erase the rest of the Stamp's EEPROM.
You can use the following sample program to·clear all the locations of the BASIC Stamp EEPROM.
I hope this helps
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
As Mike suggested, the more information you provide, the easier it is to help with a solution; however on Alicia's defense, I spoke with her class's contact person prior to posting the thread on the forums, so I knew what robot they were using. It is a good habit to follow suggestions and provide feed back as much as possible, which enables the helper to follow the progress and suggest other alternatives if the previous suggestions has not worked.
Since the program was working prior to the changes made, were you able to re-write the program that worked and save it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
Thanks
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tia'Shar Manetheren
Does the Boe-Bot move at all? Or does the movement not reflect the program written?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Insert DEBUG and temporary END.
Test.
Continue·to do so untill the real end.
You will see your coding error!
Learn how to implement subroutine - your code will be·cleaner and less·coding error prone.
DEBUG " GOOD-MORNING STARSHINE THE EARTH SAYS HELLO"
COUNTER VAR Word
FOR COUNTER = 1 TO 150
· PULSOUT 12, 850
· PULSOUT 13, 650
· PAUSE 20
NEXT
' insert this here
·DEBUG CR, " GOOD-MORNING STARSHINE THE EARTH SAYS HELLO"
·END
.......
FOR COUNTER = 1 TO 223
· PULSOUT 12, 850
· PULSOUT 13, 750
NEXT
.......
repeat .....
Cheers Vaclav
·