|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#5
|
|||
|
|||
|
Re: EVEN MORE PBASIC HELP, ASAP!!
Posted by Stephen at 2/14/2001 10:15 PM EST
Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA. In Reply to: EVEN MORE PBASIC HELP, ASAP!! Posted by bill whitley on 2/14/2001 5:47 PM EST: I recomend you not make PWM1(or any PWM) a variable. It just, simply put, wastes those 26 variables. Just go to the serout command, and where PWM1 is, just put p1_y. This also works for other things, I'll give you one more example. We have a servo, that will be 156 when nothing is pressed (closed position), and 10 when p1_sw_top is pressed (open position), instead of wasting a variable and putting an again wasteful if loop in, I just went to the serout command, and at PWM4 wrote ((p1_sw_top ^ 1)*146)+10 hope that helped, if you need any more help, feel free to e-mail me at Steven3554@yahoo.com : Is this necessary??? : PWM1 = p1_y : PWM2 = p2_y : PMW3 = p3_y : PWM4 = p4_y : Do we need to define PWM1 as a var byte? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PBASIC ARCTAN function | Greg Ross | Programming | 14 | 11-05-2003 12:28 |
| Need to learn PBASIC...Where Should I Go? | IMDWalrus | Programming | 5 | 29-04-2003 16:43 |
| 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 |