Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
e4e87c427d | |||
1fece05e5e | |||
186c7e2e3f | |||
3322119f35 | |||
515be621a0 | |||
b337f4cf1c |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 41 KiB |
BIN
docs/static/tutorials/run-motors/motor-port-dropdown.png
vendored
Normal file
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 33 KiB |
@ -1,6 +1,6 @@
|
||||
# Line Following
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Make a program to follow a line using the Color sensor and reflected light. Let's test reflected light to see if it's white or black (on the line), and drive our robot accordingly.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Make a custom animation
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Create a custom animation for your @boardname@.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Music Brick
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Transform your @boardname@ into a musical instrument!
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Object Near?
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
The digital Ultrasonic Sensor generates sound waves and reads their echoes to detect and measure distance from objects in centimeters. Build a program that will detect when an object is nearby.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Red Light, Green Light
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Use the ``||sensors:pause color sensor||`` block to play Red Light, Green Light with your @boardname@ robot!
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Run motors
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Use the buttons to start and stop the large and medium motors.
|
||||
|
||||
@ -66,8 +66,7 @@ brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
## Step 5
|
||||
|
||||
Now, let’s add a Medium motor, and tell it how many rotations we want it to run for.
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``|brick:on button||`` blocks. In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``left`` and ``right`` buttons.
|
||||
Now, let’s add a Medium motor, and tell it how many rotations we want it to run for. Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``|brick:on button||`` blocks. In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``left`` and ``right`` buttons.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
@ -105,9 +104,11 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
## Step 7
|
||||
|
||||
For the ``||motors:run||`` blocks that are in the ``||brick:on button left||`` and ``||brick:on button right||`` blocks, use the drop-down menu to select ``medium motor D``.
|
||||
|
||||

|
||||
For the ``||motors:run||`` blocks that are in the ``||brick:on button left||`` and ``||brick:on button right||`` blocks, use the drop-down menu to select a ``medium motor`` on port ``D``.
|
||||
|
||||
| | | |
|
||||
|-|-|-|
|
||||
|  | | |  |
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
@ -203,7 +204,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
})
|
||||
```
|
||||
|
||||
# Step 12
|
||||
## Step 12
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:stop all motors||`` block onto the Workspace, and drop into the ``||brick:on button||`` enter block.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Security Alert
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
The Infrared Sensor uses infrared light waves to detect proximity to the robot. Build an security alert using the infrared sensor.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Using Touch Sensor Values
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Use the Touch sensor value to stop a running motor.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Touch to Run
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Use the Touch sensor to run a motor.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Wake Up!
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Show different moods on your @boardname@.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# What Animal Am I?
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Create different animal effects with your @boardname@.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# What Color is it?
|
||||
|
||||
## Introduction @fullscreen
|
||||
## Introduction @unplugged
|
||||
|
||||
Use the Color sensor to detect different colors.
|
||||
|
||||
@ -111,7 +111,7 @@ brick.showString("What color?", 1)
|
||||
|
||||
## Step 8
|
||||
|
||||
In the ``||music::play sound effect||`` blocks, use the drop-down menu to select the ``colors red``, ``colors green``, and ``colors yellow`` sound effects corresponding to the different colors detected.
|
||||
In the ``||music:play sound effect||`` blocks, use the drop-down menu to select the ``colors red``, ``colors green``, and ``colors yellow`` sound effects corresponding to the different colors detected.
|
||||
|
||||
```blocks
|
||||
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
|
||||
|
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-ev3",
|
||||
"version": "0.1.43",
|
||||
"version": "0.1.45",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-ev3",
|
||||
"version": "0.1.43",
|
||||
"version": "0.1.45",
|
||||
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
|
||||
"private": true,
|
||||
"keywords": [
|
||||
@ -40,7 +40,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-common-packages": "0.22.7",
|
||||
"pxt-core": "3.12.19"
|
||||
"pxt-core": "3.12.22"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
||||
|