Shop OBEX P1 Docs P2 Docs Learn Events
Boe bot Program files — Parallax Forums

Boe bot Program files

paulvivepaulvive Posts: 35
edited 2012-01-09 14:20 in General Discussion
I'm able to write short programs and my Boe Bot will run them as long as my usb cable is connected. How do I write the program files to the stamp so the Boe Bot will run without being connected to the USB.
Is there a book or manual on just the Pbasic langiage and syntax?

I would like to see a sample program that will take the robot through a series of navigational moves.
I just got it yesterday and I would like to get to programming without having to go thru all of the student info, such as what is a resistor. I have completed a lot of the programs in the Manual, zeroing out the servos, getting the LED's to work etc.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-06 15:59
    Download the "BASIC Stamp Syntax and Reference Manual"

    Also download "What's a Microcontroller?" if you don't have it already.

    Both (and other stuff) can be found via the Parallax Downloads page under Basic Stamp Documentation and Educational Tutorials and Translations.

    The BoeBot will execute whatever program has been downloaded to it whenever the power is turned on or when you press the reset button. The only time you would need the USB connection is if you use the DEBUGIN statement in your program. DEBUG statements will work although they'll transmit their data to a non-existent PC (which is ok to do).
  • paulvivepaulvive Posts: 35
    edited 2012-01-07 06:38
    I understand that the Boe Bot will execute whatever programs that have been downloaded to it, But apparently writing programs in th stamp editor does not download the program to the stamp, as I said it will execute the programs through my USB cable only.Are there preloaded programs in the stamp. If so, I have power to the Boe bot I turn the switch on to one or two nothing happens, i hit the reset button nothing happens. Are you saying just read all the documentation thats available?THERE'S SOMETHING BASIC THAT i'm missing here.
    Downloading to the stamp is where I'm stuck, Does the editor automatically download a program to the stamp.?
  • PublisonPublison Posts: 12,366
    edited 2012-01-07 08:50
    paulvive wrote: »
    I understand that the Boe Bot will execute whatever programs that have been downloaded to it, But apparently writing programs in th stamp editor does not download the program to the stamp, as I said it will execute the programs through my USB cable only.Are there preloaded programs in the stamp. If so, I have power to the Boe bot I turn the switch on to one or two nothing happens, i hit the reset button nothing happens. Are you saying just read all the documentation thats available?THERE'S SOMETHING BASIC THAT i'm missing here.
    Downloading to the stamp is where I'm stuck, Does the editor automatically download a program to the stamp.?

    When you say "Execute" the program, do you mean selecting the "Run" button ,(or F9), in the Editor? If you select "Run", the program that is in the Editor at the time is automatically downloaded to the EEPROM on the Stamp chip. There is really no way to run the program without it being downloaded to the Stamp first. That program should run after a "Reset" or a power off then on. Be advised, any program that uses the servos require the on-off switch be in position 2 to apply power to the servos, but I think you already knew that.

    Do you have an example program that does not work without the USB cable. I can give it a try.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-07 09:24
    Ditto on what Publison said. There is no separate download process. The Stamp Editor does a sequence of operations in interacting with the Stamp. It always starts by forcing the Stamp to reset. Following that, it can request the Stamp to send identification information that specifies the Stamp model and firmware version. Following that, it can download a program to the EEPROM leaving the reset of the EEPROM unchanged. The Stamp finishes by telling the Editor whether the download was successful or not. At that point, the Stamp continues into the reset operation by clearing the variables and starting execution of the program in the EEPROM. When you press the reset button or turn on power, the Stamp goes through the same steps, but it skips the first two steps because it doesn't receive a command from the Stamp Editor.

    The Identify operation of the Stamp Editor stops after the identification information is received. The Run operation does all the steps. It uses the Stamp model information to verify that the program is written for that Stamp model.
  • ercoerco Posts: 20,261
    edited 2012-01-07 10:07
    Sounds like it might be time for brand new alkaline batteries.

    Not different used batteries. New batteries.
  • paulvivepaulvive Posts: 35
    edited 2012-01-07 11:31
    OK!. I typed the program in the Editor

    Do
    Pulsout 13, 850
    Pulsout 12, 650
    Pause 20
    Loop

    I hit run and it ran the program with and without the USB cable

    I swear I tried it ten times and it wouldn't work. Now! can I put more than one program at a time in the EEPROM and if so how would I select the program I want to run.

    I;m getting there. I just have to erase my mind of what I did in the past and start from scratch. I'm sure I'll have more problems and questions. Thanks
  • paulvivepaulvive Posts: 35
    edited 2012-01-07 12:06
    OK !!!!, I ran the four rotation combination and it worked.J

    Just Thinking. With EEPROM you can only enter one program as the next prgram will erase the previous one. To Accomlish more than one action, or event, you have to write a single program that includes all of the actions you want to achieve.

    As an aside in trying out the "Say It" module it mentions a "bridge". It says the GUI will ask you if you want to load the bridge. When I tried it there wasn't any mention of a bridge.
  • PublisonPublison Posts: 12,366
    edited 2012-01-07 12:41
    paulvive wrote: »
    OK!. I typed the program in the Editor

    Do
    Pulsout 13, 850
    Pulsout 12, 650
    Pause 20
    Loop

    I hit run and it ran the program with and without the USB cable

    I swear I tried it ten times and it wouldn't work. Now! can I put more than one program at a time in the EEPROM and if so how would I select the program I want to run.

    I;m getting there. I just have to erase my mind of what I did in the past and start from scratch. I'm sure I'll have more problems and questions. Thanks

    Glad you are making some progress.

    Do be sure to include the directives at the top of you program:

    ' {$STAMP BS2} (Depending on the chip you are using.)
    ' {$PBASIC 2.5}
  • PublisonPublison Posts: 12,366
    edited 2012-01-07 12:56
    paulvive wrote: »
    OK !!!!, I ran the four rotation combination and it worked.J

    Just Thinking. With EEPROM you can only enter one program as the next prgram will erase the previous one. To Accomlish more than one action, or event, you have to write a single program that includes all of the actions you want to achieve.

    As an aside in trying out the "Say It" module it mentions a "bridge". It says the GUI will ask you if you want to load the bridge. When I tried it there wasn't any mention of a bridge.

    The Basic Stamp2 can only hold one program. So must modify the program and download it with you new code.

    The BS2Pe, B2SX, BS240, and BS2PX have additional "Program Slots", but these can not be programmed separably. Not something to consider until you have mastered the BS2.

    Sorry, I have no knowledge in the use of the SayIt module.
  • paulvivepaulvive Posts: 35
    edited 2012-01-07 13:25
    Thanks. I do include the Directives in the programs. I just didn't in the Post to save typing.
  • PublisonPublison Posts: 12,366
    edited 2012-01-07 13:42
    paulvive wrote: »
    Thanks. I do include the Directives in the programs. I just didn't in the Post to save typing.

    Gotha,

    It's a good idea when posting code to use the advanced properties and use the Code Tag to show the exact code you used. This way others can cut and paste into the Editor program to test. It also preservers the indentations that are required for loops.
  • paulvivepaulvive Posts: 35
    edited 2012-01-08 05:49
    I wish I were 12 tears old then maybe I could better understand the instruction for the "SAY IT" module. Any help would be appreciated. First of all I get a message in the SAY IT GUI that I don't have the latest version and do I want to down load. I click yes and a blue bar runs across the top of the GUI. Then it says it should turn grees when it's finished downloading. IT DOESN'T. I ran the test and the unit recognized the trigger word. Where to now.



    What is the bridge they're referring to and where do I find it?

    I SET UP AND GOT THE WHISKERS TO RUN A ROAMING PROGRAM>
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-08 13:14
    paulvive wrote: »
    What is the bridge they're referring to and where do I find it?


    If you're able to interact with the SayIt, the bridge has likely been installed by the GUI. The bridge is a program to pass the serial signal from the computer to the SayIt and and to pass whatever the SayIt outputs back to the computer. This lets the program on the computer interact with the SayIt module.
    paulvive wrote: »

    I SET UP AND GOT THE WHISKERS TO RUN A ROAMING PROGRAM>

    Very cool! The Boe-Bot is a lot of fun.
  • paulvivepaulvive Posts: 35
    edited 2012-01-09 13:35
    I'm still working on SAY IT. My other project is the Ping. The schematic shows three pins one going to vss and one going to vdd which is not a problem. The third pin connects to the stamp, but I can't find anyway to connect to the stamp other than soldering a lead to it and I'm sure that's not the way it's intended to be done. The pin connection to the stamp is P15 can I use pin P!5 that is next to the breadboard?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-09 14:20
    paulvive wrote: »
    can I use pin P!5 that is next to the breadboard?

    Yes, The female headers are there to make it easy to connect things to the BS2's pins. Just use a different pin than used by the SayIt, servo or other devices attached to the Stamp.
Sign In or Register to comment.