Lock axle position

This motor block will stop the motor and apply an active break

Lock axle position as first input accepts Hub port address. Each hub port has a physical letter printed on its body.

The coding block is compatible with all hubs.

The coding block is compatible with motors that have a rotation sensor.

Device nameCompatible
WeDo 2.0 Medium Motorno
Medium Linear Motoryes
Technic™ Large Motoryes
Technic™ XL Motoryes
Technic™ Small Angular Motoryes
Medium Angular Motoryes
Large Angular Motoryes
Train Motorno
Move Hubyes

LEGO® Powered UP App coding example: Apply active breaks to a motor

For this example, you will need:

Step 1: Add coding blocks

  • Flow block – Start  
  • Motor block – Run motor select hub port A, select power 100
  • Flow block – Start on condition
  • Motor block – Lock axle position select hub port A,
  • Widget block – Button widget, select address 0

Step 2: Add Canvas widget

  • Add button, select address 0

Step 3: Setup motor and hub

  • Connect the motor to port A
  • Connect the hub to a device that runs the Powered UP App

Step 4: Run the program. Observe when the program starts, the motor starts spinning at full power.

Press button: observe that after pressing the button motor immediately stopped

Note: At the moment of writing, this block appears to behave same as Stop motor, if you noticed some different behaviour, please feel free to share your notes in comments below.

Back to Motor Blocks page

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *