|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Timed Button
Thanks for the kind words, assaf2b. I would really hate for it not to work, so I quick tested it and found something that could be changed. I think if you use that code, it would keep the motor going until you released it, then wait and stop. I don't think this is the result you want, so I'm posting a revision of the code.
This time I took my own advice and stored the last button value and only took action when the button is true and the last value is false. Then when I ran it, it set the motor, waited the specified time, set the motor to zero, and didn't do it again until I released the button and pressed again. I think this is the behavior you want, so here is a screen shot and vi. Just drop the while loop into the Periodic Tasks vi, hook up the motor and joystick, and you should be good. I have tested this on the front panel and works as advertised there. Great job on getting to the finals! |
|
#2
|
|||
|
|||
|
Re: Timed Button
Ah well, it didn't work. But hey, who cares, we're going to Atlanta! Rookie All-Star award, and 2nd place in our country's competition.
What I did was move the opening reference of the joystick from Teleop Init to the Begin VI, add it to the Periodic typedef, insert your code in the Periodic VI, and yet it didn't work - whenever the button was held, the motor kept going with it. However, as I said, we'd all like to thank you regardless of the results. HUGE thanks from team #3075, Israel! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Button input? | RyanCool435 | Programming | 3 | 31-01-2009 08:57 |
| Capture webcamera images at timed intervals? | NoodleKnight | IT / Communications | 7 | 12-09-2004 03:42 |
| Button Making | PureMachine4 | Rumor Mill | 58 | 16-04-2004 16:00 |
| Triping Timed Fuses | Joe Canavan | Electrical | 2 | 21-02-2002 09:34 |
| Button Bar | Adrian Wong | CD Forum Support | 8 | 04-06-2001 20:27 |