This block will power down the motor, connected to a specified port.
Power down motor accepts port address as an input.
Power down input port address should be the same as the motor, You want to power down.
This coding block is compatible will all hubs and motors.
Device name | Compatible |
WeDo 2.0 Medium Motor | yes |
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 | yes |
Move Hub | yes |
LEGO® Powered UP App coding example: Power down motor
For this example, you will need:
- Hub – any hub from Hubs compatible with LEGO® Powered UP App list will work
- Motor – any motor from Motors compatible with LEGO® Powered UP App list will work
Step 1: Add coding blocks
- Flow block – Start
- Motor block – Start motor, select hub port A, and select power 50 (any power value, that enables the motor to spin will work)
- Flow block – Start
- Motor block – Power down motor, select hub port A
- Widget – Button widget with address 0
Step 2: Add Canvas Button with 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:
- Navigate to the Application control view
- Observe that when the program starts, the motor is spinning
- Press the Canvas Button
- Observe that after pressing the button the motor slows down and stops
Note: When using different methods for stopping the motor, for example with Stop instructions flow block, the motor will stop immediately.