legoev3 icon indicating copy to clipboard operation
legoev3 copied to clipboard

Wait for motor to finish

Open njsokalski opened this issue 7 years ago • 4 comments

I want to send a command (to turn a motor) and then wait for the motor to finish before doing anything else. Is there any way to:

  1. Raise an event when a motor stops. I know that the BrickChanged event is raised when a motor turns, but what I need is kind of the reverse of that, I need to know when a motor stops turning (sort of like a BrickNotChanged event) OR
  2. Detect whether a motor is turning (either a property of method) Without a way to be notified when a motor finishes, I'm not sure how to determine when I should start turning the next motor. Is there any way to do either of these things, or do you have any suggestions as to determine when to start the next motor (I don't have enough sensors to use that to determine when the motor finishes)? Thanks.

njsokalski avatar Feb 28 '17 17:02 njsokalski

If memory serves, the OutputReady command is designed for this. It will toggle when the motor starts and stops.

BrianPeek avatar Feb 28 '17 19:02 BrianPeek

Where is the OutputReady command? I did not see one by that name.

Nathan Sokalski [email protected]mailto:[email protected] http://www.nathansokalski.com/


From: Brian Peek [email protected] Sent: Tuesday, February 28, 2017 2:06 PM To: BrianPeek/legoev3 Cc: njsokalski; Author Subject: Re: [BrianPeek/legoev3] Wait for motor to finish (#24)

If memory serves, the OutputReady command is designed for this. It will toggle when the motor starts and stops.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BrianPeek/legoev3/issues/24#issuecomment-283132293, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGA_R409W2ufV9MIYprkJUgkmxC8rPMGks5rhHAZgaJpZM4MOq5V.

njsokalski avatar Feb 28 '17 19:02 njsokalski

I believe it only exists in source, you'd have to pull down the project and build yourself...I haven't had the time to dedicate to keeping this maintained with release packages, unfortunately. :(

BrianPeek avatar Feb 28 '17 19:02 BrianPeek

Is there anywhere that I can get instructions on how to do that? I have never really used anything from GitHub where I need to build and install the code directly (I have only done stuff where it is installed as a package or some other automated fashion). I don't mind if I need to do it directly, but I don't want to do something wrong that messes up my current configuration. Thanks.

Nathan Sokalski [email protected]mailto:[email protected] http://www.nathansokalski.com/


From: Brian Peek [email protected] Sent: Tuesday, February 28, 2017 2:53 PM To: BrianPeek/legoev3 Cc: njsokalski; Author Subject: Re: [BrianPeek/legoev3] Wait for motor to finish (#24)

I believe it only exists in source, you'd have to pull down the project and build yourself...I haven't had the time to dedicate to keeping this maintained with release packages, unfortunately. :(

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BrianPeek/legoev3/issues/24#issuecomment-283144126, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGA_RxNm4FhzKK5eD_PxCQ7U-AKYTt35ks5rhHsugaJpZM4MOq5V.

njsokalski avatar Mar 31 '17 00:03 njsokalski