| | two task and while true Stefan Prescher
| | | Hi I made a small programm task main if IN_3 ==1 start wb else stop wb task sb while (true) if () fwd(Out_a,7); I found out that the prgramms goes into the while loop but it never started the motor if I copied it into the main part it runs fine Is (...) (26 years ago, 2-May-99, to lugnet.robotics.rcx.nqc)
| | | | | | | | Re: two task and while true Mike Moran
| | | | | (...) Hmm: - I believe that, after main starts, unless you press IN_3 *very* quickly, that IN_3 will not be 1, hence stop wb will be chosen. Perhaps you want something like this? : task main { while (true) { wait(IN_3 == 1); // start motor wait(IN_3 (...) (26 years ago, 7-May-99, to lugnet.robotics.rcx.nqc)
| | | | | | |