Programming Language and Syntax and response to my posting code.
paulvive
Posts: 35
Back in 1980 when I first started with computers and programming languages it seemed easier because I knew what I wanted the computer to do and I knew what I wanted to see on the computer screen and I was able to learn the syntax that was necessary to do it. There were manuals that you could learn the language and syntax from. There werent any GUIs only DOS to work with.. I dont know the syntax of Pbasic, yet, and I dont know what the Robot or Robotic module is looking for and if I did I wouldnt know how to provide it. Im used to reading a manual of whatever I wanted to learn. Learning it, understanding it and being able to use it . Im having a difficult time with the Pbasic syntax, I dont know it and I havent found a Book to learn it from. I cant learn it from bits and pieces of programs, although there are parts that I do recognize there is a lot that I dont. Maybe Im missing the fact that there is a manual for Pbasic as there was for Ancient Basic and visual basic and other languages that I learned from reading a book. If so, I would appreciate knowing where to find it. A lot of guys have been a great help in helping me to get started in Robotics and I really appreciate it. I have to admit, but I dont intend it to be an excuse, but Im 80 years old and my brain doesnt work as well as it used to but I dont intend to just sit in a rocking chair. I just wanted to say I really appreciate all of you for trying to work with me.
To some of the more recent replies about posting. I swear I used the right brackets, maybe I need glasses better than WalMart.
To some of the more recent replies about posting. I swear I used the right brackets, maybe I need glasses better than WalMart.
Comments
Doc
Here is the link to the BASIC Stamp Documentation Downloads page: http://www.parallax.com/tabid/440/Default.aspx
and the PDF of the manual: http://www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf
In this first screenshot - notice the icon of a book with a yellow question mark on the far right of the tool bar: Clicking that will open the online help for Pbasic syntax:
The window should look like this (depending on your version of OS:
Hope this is helpful!
Doc
One more question, once I learn and understand Pbasic I still have to know what inputs a particular Module or function needs so I know what to program. Foe example the SAY IT module. Wouldn't I need to know what inputs it needs to operate. Again the difference in writing a program for a computer it doesn't need anything but what I want it to have via my programming whereas a robot needs or looks for specific inputs which your program must provide. If I'm way off track here you won't hurt my feelings by telling me so, right now I feel stupid anyway. Thanks again for your input.
I just want to make sure you have the SayIt documentation from the product page. The document 30080_SayItModulev1.2.pdf has all the SayIt commands listed, starting on page 15. I personally didn't understand the syntax of the SayIt so I "listened in" on the data exchange between the Prop and the SayIt GUI.
This is one exchange I recorded.
You can see I added some comments after some of the early commands. It helped be to understand how to use the various commands after seeing the commands the PC issued to the SayIt.
If you look at the replies from the SayIt, there are many "o" replies. Page 18 of the pdf has STS_SUCCESS | "o" | OK or no error status |. The other codes in the above exchange can also be found in the pdf. This helped me undstand the syntax better. Hopefully it will be helpful to you.
One concept that took a while to get into my head was that the SayIt only listens for one group of words at a time. Your program has to tell it which group you want to be active.
I thought Dave Xanatos did a great job explaining this.
Keep practicing, over 50% of the PBasic instructions can be run without the need for any hardware whatsoever. Use DEBUGIN to enter values and DEBUG to view results. When it comes time you want to use some kind of hardware device just remember that the BS2 family are 5v devices with limits on their current capacity. Some devices just use on off values of either 5v or 0v respectively, more complex devices still use the Stamps 5v - 0v logic levels but usually there is some kind of communications needed. If its a Parallax device you can be certain example code exists, if its a third party device a good data sheet will help decide if it can be used with the Stamp.
There are not many 80 year old Stampers and I respect you all for keeping sharp.
Jeff T.
Heck, this makes Leon seem like a spring chicken of only 69 years.