Shop OBEX P1 Docs P2 Docs Learn Events
BASIC stamp course — Parallax Forums

BASIC stamp course

aliciaalicia Posts: 8
edited 2009-05-01 16:33 in BASIC Stamp
Program not running will loopback after single action

Comments

  • JDJD Posts: 570
    edited 2009-04-16 17:28
    Alicia,

    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
  • aliciaalicia Posts: 8
    edited 2009-04-20 17:25
    jumpin.gif The pauses do not affect the movement, it still goes forward slightly then restarts, but on the stamp editor the program runs smoothly
  • JDJD Posts: 570
    edited 2009-04-20 17:38
    Alicia,

    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
  • aliciaalicia Posts: 8
    edited 2009-04-22 17:08
    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
  • JDJD Posts: 570
    edited 2009-04-23 21:48
    Alicia,

    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
  • aliciaalicia Posts: 8
    edited 2009-04-28 17:38
    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?

    Thanks,

    Alicia
  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-28 17:47
    There is no such thing as a virus in a Stamp.

    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.
  • aliciaalicia Posts: 8
    edited 2009-04-28 18:11
    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???
  • JDJD Posts: 570
    edited 2009-04-28 18:21
    Alicia,

    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
  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-28 18:36
    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.
  • JDJD Posts: 570
    edited 2009-04-28 18:52
    Alicia,

    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
  • aliciaalicia Posts: 8
    edited 2009-04-28 20:09
    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.

    Thanks
  • aliciaalicia Posts: 8
    edited 2009-04-28 20:17
    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.

    Thanks
  • ManetherenManetheren Posts: 117
    edited 2009-04-29 11:35
    It sounds like there is a hardware issue that would need resolved with your Bot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tia'Shar Manetheren
  • JDJD Posts: 570
    edited 2009-04-29 16:20
    Alicia,

    Does the Boe-Bot move at all? Or does the movement not reflect the program written?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Respectfully,


    Joshua Donelson
    www.parallax.com
  • FranklinFranklin Posts: 4,747
    edited 2009-04-29 17:59
    Have you replaced the batteries? Haven't read all the posts so if you have...nevermind...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • vaclav_salvaclav_sal Posts: 451
    edited 2009-04-29 18:18
    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 .....

    Cheers Vaclav

    ·
  • aliciaalicia Posts: 8
    edited 2009-05-01 16:33
    Thank you
Sign In or Register to comment.