NXT-G
Flag pole climb and I don't want it getting stuck at the top if the touch sensor misses the cap.
How would you use a timer to change the execution path, or work around it. Any suggestions.
Thanks,
TC
How to write a Time Out, if a wait sensor just keeps waiting
Re: How to write a Time Out, if a wait sensor just keeps waiting
Have you looked into logic variables in NXT-G? One option would be to define a logic variable. Set it to false at the start, and then make the loop that waits for the end condition exit once that variable becomes true.terrycary wrote:How would you use a timer to change the execution path, or work around it.
You'd then need two separate rungs in your program. One would wait for the touch sensor and, when pressed, set the logic variable to true. The other rung could simply do a long (timeout style) wait and when that completes set the variable to true.
Once either rung sets the variable to true the robot can climb back down the pole (or whatever).
Re: How to write a Time Out, if a wait sensor just keeps waiting
That works. Thanks. New to this and it's conceptually a little different than anything I've programmed in.
TC
TC
Re: How to write a Time Out, if a wait sensor just keeps waiting
So are you being required to use NXT-G for your project? There are a good number of language options and compilers for the NXT brick. This table gives a decent overview of the main programming options, though some entries are a bit out of date these days.terrycary wrote:New to this and it's conceptually a little different than anything I've programmed in.
Who is online
Users browsing this forum: No registered users and 3 guests