Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted
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?
Posted

More input needed :pir-wink:

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...