kibosh Posted November 22, 2022 Posted November 22, 2022 I am working on a retractable bridge, and have it working with two buttons. One button extends the bridge and the other retracts it. The problem is, if I'm not paying attention and extend the bridge when it's already extended, it breaks the mechanism apart. Same happens if I retract when it's already retracted. Is there a way to disable a control if a criteria is met? For example, if I extend the bridge, can I disable the extend function until I press the retract function? Quote
Toastie Posted November 22, 2022 Posted November 22, 2022 More input needed You are using a PUp hub (which one?), I guess a motor does the work, and the PUp app, correct? I believe you need to "sense" the two end points. In other words, when the bridge is "down", a touch sensor (or the like) is sensing that. Same for bridge is "up". As far as I am concerned, this is the only way to go. Spoiler What I did, was this, using an RCX: A 4-port Technic hub equipped with 2 touch sensors and one motor should do. Maybe others have better solutions! Best, Thorsten Quote
CastleRail Posted November 22, 2022 Posted November 22, 2022 Use a clutch gear if you want protection and manual control - Clutch Gear Quote
dr_spock Posted November 22, 2022 Posted November 22, 2022 You can use variable blocks to keep track if the extension or retraction has been set. It'll depend on you paying attention first time you operate the bridge after powering on the Powered UP to set up the bridge into a known state. Then you can use logic math blocks to compare and flow blocks to allow the extend or retract buttons to work or not. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.