Thread: PBasic Probelm
View Single Post
  #3   Spotlight this post!  
Unread 08-04-2004, 09:44
Grommit Grommit is offline
Registered User
#0115 (Monta Vista Robotics)
 
Join Date: Oct 2002
Location: Cupertino
Posts: 47
Grommit will become famous soon enoughGrommit will become famous soon enough
Send a message via AIM to Grommit
Re: PBasic Probelm

You need two subroutines:
One for when the button state is up doing:
Set flag to 0
And the other when the button state is down doing:
Set flag to 1
(other stuff)

This way, the flag will be 1 if the button is pressed down.
Then at the top of the other button's code, put an if flag = 0 then,
so that code will not execute unless the button is up.
__________________
Shrenik Shah
Engineering Director
Team 115: Monta Vista Robotics

Congratulations to Mr. Shinta for winning Woodie Flowers at Silicon Valley!