|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
I'm determined this summer to learn PBasic, i think.... Basically on my team we've had an engineer from UL do all the programming for the past 3 years, but next year since I will *hopefully* be on a rookie team down in maryland, i'd like to know how to program a robot.
Basically my question is for all of you programmers is: What do you need to know about programming a robot? What is the "program" called? Where can I learn it (like what books can i read??) and How did you all learn it? Thanks in advance! -STACY |
|
#2
|
||||
|
||||
|
its called basic stamp or something....talk to dan i, he knows it
|
|
#3
|
|||||
|
|||||
|
For starters you can read the basic stamp manual. It helps if you already know how to program in another language, though. For a very simple explanation even a 'non-programmer' could understand, look at the articles at the FIRST-Codex site.
Stephen P.S Good Luck! |
|
#4
|
||||
|
||||
|
If you already have some programming expierience in other languages (so that you know the lingo, how programming works, etc.), best way to learn pbasic is to read what the robot controller does first, then pull up the default code from www.innovationfirst.com , and go through it line by line to learn how it works. The manual just contains tons of stuff you don't need to know and just confuse you and/or waste your time.
|
|
#5
|
|||
|
|||
|
I am not much of a programmer, but it seems like getting a BOE-bot would be a good idea. That allows a lot of controls experimentation, no?
|
|
#6
|
|||||
|
|||||
|
Quote:
|
|
#7
|
|||||
|
|||||
|
You shouldn't have any problem programming the stamp, I was actually suprised at how simple it is for most robots. Leave messages here or at the codex and I am sure people will answer any question you ask
|
|
#8
|
|||
|
|||
|
"PBasic"
There's a reason PBasic is called "PBasic". Syntax-wise, other than programming the graphic calculator, it's the easiest thing to program. LIke I said, syntax-wise. (If you don't know, syntax is the actual typing part of the language. In other words, where the equal signs, multiplication signs, variables, etc... go in the program.)
It is very simple to write basic robot functions in the program. Now, for those sophisticated robots that rely heavily on the program, such as our robot balancing program from last year , there are two things that are limiting about PBasic:   The number of variable you can use- You are limited to 26 bytes of variables.   Interarithematics- There are no decimals or negative number in PBasic* There are other tips and tricks. If you want to know more, you can email me or AOL IM me at Khalicl13. You can also look at the Stamp Manual. It's extremely useful. I have to go now. Good Luck. * There is an exception to this: Decimals and negative numbers are possible if you DEBUG (displaying data on a computer from the programming chip) some data. |
|
#9
|
|||
|
|||
|
There's a reason PBasic is called "PBasic". Syntax-wise, other than programming the graphic calculator, it's the easiest thing to program. LIke I said, syntax-wise. (If you don't know, syntax is the actual typing part of the language. In other words, where the equal signs, multiplication signs, variables, etc... go in the program.)
It is very simple to write basic robot functions in the program. Now, for those sophisticated robots that rely heavily on the program, such as our robot balancing program from last year , there are two things that are limiting about PBasic: The number of variable you can use- You are limited to 26 bytes of variables. Integer Arithematics- There are no decimals or negative number in PBasic* There are ways to get aroung some of these things and there are other tips and tricks. If you want to know more, you can email me or AOL IM me at Khalicl13. You can also look at the Stamp Manual. It's extremely useful. I have to go now. Good Luck. * There is an exception to this: Decimals and negative numbers are possible if you DEBUG (displaying data on a computer from the programming chip) some data. |
|
#10
|
||||
|
||||
|
actually, PBASIC can handle negatives, or at least it says it can. it just has nasty habits of screwing them up if you do to much with the negative number. this year i programmed the robot with a few equations that went negative but then came back positive right away.
|
|
#11
|
||||
|
||||
|
i learned PBasic this year and it wasn't that hard. Play around with a Boe-bot some. it mostly helps with knowing how long a loop is. If you can get an old controlor, a window motor, and a servo to practice on it helps alot. I learned ramping for our drive motors and it was realy helpful. Sensors are fun to play with also. E-mail me (or team 930) if you want some help. Have fun
![]() |
|
#12
|
|||||
|
|||||
|
Quote:
|
|
#13
|
||||
|
||||
|
so, only use negatives when absolutly needed, or if you know it will work (which means don't put a new equation in that goes negative, and not test it before a round). as for new code, NEVER put in new code right before a round. always test it out first, unless ready for your robot to die on the field.
|
|
#14
|
||||||
|
||||||
|
false negatives
The way that PBASIC "handles" negatives is by treating them as their standard two's complement. -1 is treated as approx. 65,000. Therefore, any useful operation will fail because the number is not actually negative. Because the two's complement system was originally designed to allow "negative" numbers to be added and subtracted using the same CPU instructions as unsigned numbers, these two operations work just fine in PBASIC.
If you need to do negatives for some reason (my team hasn't had any yet), the easiest thing to do is just pretend that something else is zero. For example, you could think of the number 120 as being -7 and the number 134 as being +7. Then, anytime you use this number, just use a Min/Max statement and then subtract 127 off the end, much like the white paper Innovation First has on "One Joystick Tank Drive." |
|
#15
|
||||
|
||||
|
Exactly
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Obscure PBASIC for RoboEmu | rbayer | Programming | 1 | 28-03-2003 23:57 |
| PBasic 2.5 vs. 2.0 | Anthony Kesich | Programming | 6 | 09-02-2003 22:06 |
| PBasic Question | Melissa H. | Programming | 28 | 17-11-2002 18:53 |
| Robots and the Learning Channel.... | archiver | 2000 | 0 | 24-06-2002 00:16 |
| Output voltage in PBASIC | diego25 | Programming | 7 | 31-01-2002 22:50 |