View Single Post
  #5   Spotlight this post!  
Unread 24-06-2002, 00:53
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
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?


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.