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 name | Compatible |
WeDo 2.0 Medium Motor | no |
Medium Linear Motor | yes |
Technic™ Large Motor | yes |
Technic™ XL Motor | yes |
Technic™ Small Angular Motor | yes |
Medium Angular Motor | yes |
Large Angular Motor | yes |
Train Motor | no |
Move Hub | yes |
LEGO® Powered UP App coding example: Apply active breaks to a motor
For this example, you will need:
- Hub – any hub from Hubs compatible with LEGO® Powered UP App list will work
- Motor – any motor that has rotation sensor from Motors compatible with LEGO® Powered UP App list will work
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.
Leave a Reply Cancel reply