Jump to content

Recommended Posts

Posted

Ok, I’m new here but not new to Lego.  However, I am converting, slowly to Powered Up for use with my trains.  Like many of you seem to do, I would like to have a train that has an engine at each end so that I can control them with ONE throttle.  The problem I have currently is how do I reverse the rear locomotive’s direction from within the Powered Up app?  I’ve searched, I really have and nothing comes up that seems to answer how you do it.  Perhaps I’m doing the searching wrong.  Ok, my set up is two locomotives, each with their own hub.  I know how to get both hubs to respond to one throttle in my app BUT how do I reverse the rear locomotive, so that it pushes while the front locomotive pulls?  I use an iPhone with the Powered Up app and it works great for one motor.  Any help is appreciated and forgive me if this has been asked before.  

 

 

Posted

You simple give the motor negative values. So while one motor gets values from 1 to 100 the other will get values from -1 to -100. Use a variable for that. the throttle controls the variable. one motor gets the pure variable value while the other gets the value multiplied by -1.

Posted (edited)

Hi,

put the value for the speed in a variable, then use a motor block with that variable as input, and a second, where you multiply this value by -1

Edited by Lok24
Posted

Thank you to both Elphiel and Lok24 for your explanation.  I realize now I have a lot more to do, I was hoping I could have used one of the already made apps (such as for the Passenger Train) to do what I wanted.  So now, it’s off to “school” to learn another programming technique.  Thanks again for your help.

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...