Block updates follow blog post (#905)
* fix battery block comment * update run phase blocks * some more docs
This commit is contained in:
		
							
								
								
									
										30
									
								
								docs/reference/motors/motor/set-brake-settle-time.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								docs/reference/motors/motor/set-brake-settle-time.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
# set Brake Settle Time
 | 
			
		||||
 | 
			
		||||
Set the time to wait after a motor stopped to allow it settle
 | 
			
		||||
when brake is enabled. Default is 10ms.
 | 
			
		||||
 | 
			
		||||
```sig
 | 
			
		||||
motors.largeA.setBrakeSettleTime(200)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
When a the motor is stopped and brake is applied, it can still wiggle for a little while. You can use the settle time to automatically way after stopping and let the robot settle.
 | 
			
		||||
 | 
			
		||||
## Parameters
 | 
			
		||||
 | 
			
		||||
* **time**: a [number](/types/number) value which represents the number of milliseconds to wait after braking.
 | 
			
		||||
 | 
			
		||||
## Example
 | 
			
		||||
 | 
			
		||||
Set the brake mode and the settle time to 500ms. Run the motor connected to port **A** for 2 seconds at a speed of `30` and stop after 2s.
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
motors.largeA.setBrake(true)
 | 
			
		||||
motors.largeA.setBrakeSettleTime(500)
 | 
			
		||||
motors.largeA.run(30)
 | 
			
		||||
pause(2000)
 | 
			
		||||
motors.largeA.stop()
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## See also
 | 
			
		||||
 | 
			
		||||
[stop](/reference/motors/motor/stop)
 | 
			
		||||
@@ -1,28 +1,28 @@
 | 
			
		||||
# set Brake
 | 
			
		||||
 | 
			
		||||
Set the brake on the motor so it won't turn when it has no power.
 | 
			
		||||
Set the brake on the motor so it will brake when it finishes a brake command.
 | 
			
		||||
 | 
			
		||||
```sig
 | 
			
		||||
motors.largeA.setBrake(false)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
When a the motor is stopped, it can still rotate if an external force is applied to it. This can happen, for example, if your're tanking your brick on a inclined surface and stop the motors. Gravity will push down on the brick and might cause it to start rolling again. You can prevent this movement by setting the brake.
 | 
			
		||||
When a the motor is stopped, it can still rotate if an external force is applied to it. This can happen, for example, if you're tanking your brick on a inclined surface and stop the motors. Gravity will push down on the brick and might cause it to start rolling again. You can prevent this movement by setting the brake.
 | 
			
		||||
 | 
			
		||||
Also, you can use the brake to do simple skid steering for your brick.
 | 
			
		||||
 | 
			
		||||
## Paramters
 | 
			
		||||
## Parameters
 | 
			
		||||
 | 
			
		||||
* **brake**: a [boolean](/types/boolean) value which is either `true` to set the brake on or `false` to set the brake off.
 | 
			
		||||
 | 
			
		||||
## Example
 | 
			
		||||
 | 
			
		||||
Run the motor connected to port **A** for 2 seconds at a speed of `30`. Stop and set the brake.
 | 
			
		||||
Run the motor connected to port **A** for 2 seconds at a speed of `30` and stop after 2s.
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
motors.largeA.setBrake(true)
 | 
			
		||||
motors.largeA.run(30)
 | 
			
		||||
pause(2000)
 | 
			
		||||
motors.largeA.stop()
 | 
			
		||||
motors.largeA.setBrake(true)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## See also
 | 
			
		||||
 
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
# Set Run Acceleration Ramp
 | 
			
		||||
 | 
			
		||||
```sig
 | 
			
		||||
motors.largeD.setRunAccelerationRamp(1, MoveUnit.Seconds)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Examples
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
 | 
			
		||||
    motors.largeB.run(50, 6, MoveUnit.Rotations)
 | 
			
		||||
})
 | 
			
		||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
 | 
			
		||||
    motors.largeC.run(50, 6, MoveUnit.Seconds)
 | 
			
		||||
})
 | 
			
		||||
motors.largeB.setRunAccelerationRamp(360, MoveUnit.Degrees)
 | 
			
		||||
motors.largeB.setRunDecelerationRamp(360, MoveUnit.Degrees)
 | 
			
		||||
motors.largeC.setRunAccelerationRamp(2, MoveUnit.Seconds)
 | 
			
		||||
motors.largeC.setRunDecelerationRamp(2, MoveUnit.Seconds)
 | 
			
		||||
```
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
# Set Run Deceleration Ramp
 | 
			
		||||
 | 
			
		||||
```sig
 | 
			
		||||
motors.largeD.setRunDecelerationRamp(1, MoveUnit.Seconds)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Examples
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
 | 
			
		||||
    motors.largeB.run(50, 6, MoveUnit.Rotations)
 | 
			
		||||
})
 | 
			
		||||
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
 | 
			
		||||
    motors.largeC.run(50, 6, MoveUnit.Seconds)
 | 
			
		||||
})
 | 
			
		||||
motors.largeB.setRunAccelerationRamp(360, MoveUnit.Degrees)
 | 
			
		||||
motors.largeB.setRunDecelerationRamp(360, MoveUnit.Degrees)
 | 
			
		||||
motors.largeC.setRunAccelerationRamp(2, MoveUnit.Seconds)
 | 
			
		||||
motors.largeC.setRunDecelerationRamp(2, MoveUnit.Seconds)
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										26
									
								
								docs/reference/motors/motor/set-run-phase.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								docs/reference/motors/motor/set-run-phase.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
# Set Run Phase
 | 
			
		||||
 | 
			
		||||
Allows to specify an acceleration or deceleration phases for run commands.
 | 
			
		||||
 | 
			
		||||
```sig
 | 
			
		||||
motors.largeD.setRunPhase(MovePhase.Acceleration, 1, MoveUnit.Seconds)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Once the run phase is specified on a motor (or pair of motors),
 | 
			
		||||
it will be automatically applied to [run](/reference/motors/run) commands.
 | 
			
		||||
 | 
			
		||||
## Time vs Rotation
 | 
			
		||||
 | 
			
		||||
The phases specified for time units (seconds, milliseconds) only apply to run with time
 | 
			
		||||
moves. Similarly, the phases specified for rotation units (# rotation, degrees) only
 | 
			
		||||
apply to run with rotation units.
 | 
			
		||||
 | 
			
		||||
## Examples
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
motors.largeB.setRunPhase(MovePhase.Acceleration, 0.5, MoveUnit.Seconds)
 | 
			
		||||
motors.largeB.setRunPhase(MovePhase.Deceleration, 0.2, MoveUnit.Seconds)
 | 
			
		||||
forever(function () {
 | 
			
		||||
    motors.largeB.run(50, 1, MoveUnit.Seconds)
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user