Compare commits

...

15 Commits

Author SHA1 Message Date
b5303a660b 0.0.107 2018-02-26 11:22:44 -08:00
a60958f72a Update search icon and avatar SVG (#345) 2018-02-26 10:43:29 -08:00
33dcb6deee renaming infraredSensor to infrared (#344) 2018-02-26 10:39:15 -08:00
130a47d684 Sensor names are now part of the block text (#341)
* Sensor names are now part of the block text

* Use ports field editor
2018-02-26 11:33:50 -05:00
2d355bb2ca Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-02-23 20:38:53 -08:00
8ee63df325 Add in 'console' doc stuff (#342)
* Add 'playSound' api docs

* Add in 'console' doc stuff

* Add 'send to screen' in summary\
2018-02-23 14:13:08 -08:00
7d16cf10ac added make it smarter 2018-02-23 07:37:32 -08:00
60ec3f1c99 Add 'playSound' api docs (#340)
* Add 'playSound' api docs

* Linkup summary
2018-02-22 16:23:07 -08:00
6524b0a841 Add 'timer' api docs (#339) 2018-02-22 14:56:15 -08:00
d778232155 removing .mp4 file 2018-02-22 10:24:40 -08:00
c157b4d922 0.0.106 2018-02-22 10:18:13 -08:00
0837123828 bumping pxt 2018-02-22 10:15:58 -08:00
e51a32b69f use full motor names (#338) 2018-02-22 10:03:25 -08:00
029066000d updated style 2018-02-22 08:28:42 -08:00
7e35abeff3 lock on 0.0.104 2018-02-22 06:54:18 -08:00
56 changed files with 6561 additions and 4945 deletions

View File

@ -13,7 +13,7 @@
* [Design Engineering](/design-engineering)
* [Make It Move Without Wheels](/design-engineering/make-it-move)
* [Make It Smarter and Faster](/design-engineering/make-it-faster)
* [Make It Smarter and Faster](/design-engineering/make-it-smarter)
* [Make a System that Communicates](/design-engineering/make-it-communicate)
* [Maker](/maker)
@ -111,3 +111,25 @@
* [pause for light](/reference/sensors/color-sensor/pause-for-light)
* [color](/reference/sensors/color-sensor/color)
* [light](/reference/sensors/color-sensor/ambient-light)
* [Music](/reference/music)
* [play sound effect](/reference/music/play-sound-effect)
* [play sound effect until done](/reference/music/play-sound-effect-until-done)
* [play tone](/reference/music/play-tone)
* [ring tone](/reference/music/ring-tone)
* [stop all sounds](/reference/music/stop-all-sounds)
* [rest](/reference/music/rest)
* [change tempo by](/reference/music/change-tempo-by)
* [set tempo](/reference/music/set-tempo)
* [note frequency](/reference/music/note-frequency)
* [beat](/reference/music/beat)
* [set volume](/reference/music/set-volume)
* [Control](/reference/control)
* [Timer](/reference/control/timer)
* [seconds](/reference/control/timer/seconds)
* [millis](/reference/control/timer/millis)
* [reset](/reference/control/timer/reset)
* [pause until](/reference/control/timer/pause-until)
* [Console](/reference/console)
* [log](/reference/console/log)
* [log value](/reference/console/log-value)
* [send to screen](/reference/console/send-to-screen)

View File

@ -15,7 +15,7 @@
"name": "Make It Smarter and Faster",
"description": "TBD",
"imageUrl": "/static/lessons/make-it-smarter.png",
"url": "/design-engineering/make-it-move",
"url": "/design-engineering/make-it-smarter",
"cardType": "side"
},
{

View File

@ -0,0 +1,192 @@
# Make It Smarter and Faster
## Connect
### Design Brief
Design, build and program a robotic creature that can sense its environment and respond by moving.
https://www.youtube.com/watch?v=y9-A_C_08KY
* What do the robots in the video need to be able to sense, plan, and act?
* What senses do humans have and why are they important to us?
* How many human-like senses do you see the robots demonstrating?
### Brainstorm
Discuss different solutions to the design brief.
Think about:
* What kind of creature can it be?
* How can it move?
* What does it need to be aware so that it stays safe, well fed and warm (or cool)?
* Is it looking for food, a safe place to hide or a warm place to soak up the sun?
* Will the creature need to move fast or slow?
* Will it need to turn?
* Will it need to go backward?
![EV3 and bricks](/static/lessons/make-it-smarter/bricks.png)
## Construct
### Build
Think about a creatures movement for inspiration. Your mechanism can be attached or unattached to the EV3 brick. You can start by tinkering with the LEGO elements in the picture add then build on.
More building ideas:
* [EV3 Frames](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/ev3%20frames-5054ee378e624fb4cb31158d2fc8e5cf.pdf)
* [Color Sensor 1](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/color%20sensor_v1-16a7231bdc187cd88a8da120c68f58d5.pdf)
* [Gyro Sensor](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/gyro%20sensor-6f0fdbd82ae45fe0effa0ebf3f460f3d.pdf)
* [Ultrasonic Sensor](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/ultrasonic%20sensor-a56156c72e8946ed4c58c5e69f3520d3.pdf)
* [Touch Sensor](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/touch%20sensor-868fda1b9d6070a0a034fb22456a7fc9.pdf)
* [Jaw](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/jaw-ee93e8f3243e4d30cd34b0c337c33653.pdf)
* [Leg 1](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/leg%201-c14624046ea3a95148820ed404f5ac65.pdf)
* [Leg 2](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/leg%202-8855c35b990205f6b9d7130687a3d4db.pdf)
* [Leg 3](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/leg%203-575d52ef15fb79f1e4d3350d36607160.pdf)
### Program
Before you program, think about:
* How will you program the robot to sense?
* How will you program the robot to respond?
* Which programming blocks will you use?
### ~ hint
**Hint:** Explore the different Sensor blocks in the Sensors Menu
### ~
## SCREEN 5
Sample Solution
[Video: EV3 Insect]
This Insect uses its Ultrasonic Sensor to sense danger and move away from threat.
The Insect solution combines these building ideas:
* EV3 Frames
* Leg 2
* Leg 3
* Ultrasonic Sensor
Four copies of Leg 3 were built: one for the front left, one for the back right, and two mirror copies for the front right and back left.
* [Building Instructions](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/insect-94b8a46f0dc5082c9d78ddb734626dc9.pdf)
### Sample Solution
This program checks if the Ultrasonic Sensor senses something near.
This program:
* Turns on the green EV3 brick Status Light
```block
brick.setStatusLight(StatusLight.Green)
```
* Waits for Ultrasonic Sensor to detect an object
```block
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected)
```
* Turns on Motors A and D in opposite directions
```block
motors.largeAD.tank(50, -50)
```
* Waits for one half of a second (1500 milli seconds)
```block
pause(1500)
```
* Reverses the direction of Motors A and D
```block
motors.largeAD.tank(-50, 50)
```
* Waits for one half of a second
* Stops all motors
```block
motors.stopAll()
```
* Makes an insect chirping sound
```block
music.playSoundEffectUntilDone(sounds.animalsInsectChirp)
```
* Loops so the insect wanders around when the Ultrasonic Sensor is triggered
```blocks
forever(function () {
brick.setStatusLight(StatusLight.Green)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected)
motors.largeAD.tank(50, -50)
pause(1500)
motors.largeAD.tank(-50, 50)
pause(1500)
motors.stopAll()
music.playSoundEffectUntilDone(sounds.animalsInsectChirp)
})
```
### Download and test
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Contemplate
### Test and Analyze
As you work on your solution:
1. Describe one part of your design that worked especially well.
2. Describe one design change that you had to make.
3. What will you try next?
### Review and Revise
Take a moment to reflect on your robot solution.
Think about:
* Does your robot move when the sensor is activated?
* If not, what will you change to make the robots ability to sense and respond more obvious?
* What other behaviors can you add to the robot to make it more realistic?
Describe two ways you could improve your robot.
## Continue
Personalize your project
* Add/remove LEGO elements to improve the way your robot moves.
* Click on the JavaScript tab and experiment with changing the values in the code.
* Add a custom image or sounds by adding blocks from the Brick or Music menus.
* Does your robot resemble a creature? Add arts and crafts materials to you project.
## Communicate
Here are some ideas:
* Create a video of your project, especially your final presentation and your robots performance. Explain some important features of your software program.
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
* Include an image of your program with comments.
* Add a team photograph!
Congratulations! What will you design next?

View File

@ -1,3 +1,3 @@
{
"appref": "v"
"appref": "v0.0.104"
}

View File

@ -1,9 +1,16 @@
# Reference
```namespaces
brick.showMood(moods.sleeping);
sensors.color(null);
motors.stopAll();
brick.showMood(moods.sleeping);
```
## Advanced
```namespaces
console.log("");
control.runInParallel(function(){});
```
## See Also
@ -11,5 +18,5 @@ motors.stopAll();
[brick](/reference/brick),
[sensors](/reference/sensors),
[motors](/reference/motors),
[touch sensor](/reference/sensors/touch-sensor),
[color sensor](/reference/sensors/color-sensor)
[control](/reference/control),
[console](/reference/console)

15
docs/reference/console.md Normal file
View File

@ -0,0 +1,15 @@
# Console
Output text and data values to the console.
```cards
console.log("");
console.logValue("x", 0);
console.sendToScreen();
```
## See also
[log](/reference/console/log),
[log value](/reference/console/log-value),
[send to screen](/reference/console/send-to-screen)

View File

@ -0,0 +1,26 @@
# send To Screen
Direct the console output to go to the @boardname@ screen.
```sig
console.sendToScreen();
```
A "console" is a place for a user to see special messages from a device. It could be something connected to a serial port, a display that shows text, or even a text file. A console is typically used as a place to send information that is added to a message _log_ (a record of messages that are sent from a device). Your program can send log messages using the [console](/reference/console) functions. The MakeCode editor has a console view that lets you see the console output when your program runs in the simulator.
On the @boardname@, the screen can serve as a console too and you can make your console output go there. Before using the console log functions, set the screen as the console output location.
## Example
Direct the console output to go to the screen. Show 20 values on the screen. Use the up and down buttons to scroll through the values.
```blocks
console.sendToScreen()
for (let index = 0; index <= 20; index++) {
console.logValue("index", index)
}
```
## See also
[log](reference/console/log), [log value](/reference/console/log-value)

33
docs/reference/control.md Normal file
View File

@ -0,0 +1,33 @@
# Control
Program controls and events.
```cards
control.millis();
control.runInParallel(() => {
});
control.reset();
control.waitMicros(4);
control.deviceSerialNumber();
```
## Timer
```cards
control.timer1.reset()
control.timer1.pauseUntil(5)
control.timer1.millis()
control.timer1.seconds()
```
## Advanced #advanced
```cards
control.raiseEvent(0, 0);
control.onEvent(0, 0, () => {
});
control.assert(false, 0);
control.panic(0);
```

View File

@ -0,0 +1,8 @@
# Timer
```cards
control.timer1.reset()
control.timer1.pauseUntil(5)
control.timer1.millis()
control.timer1.seconds()
```

View File

@ -0,0 +1,25 @@
# millis
Get the amount of time counted by the timer in milliseconds.
The timer count begins from `0` when you program starts or is [reset](/reference/control/timer/reset).
## Returns
* a [number](/types/number) that is the amount of time elapsed, in milliseconds, since the timer was started or reset.
## Example
Find out how many milliseconds go by between presses of the `down` button on the brick.
```blocks
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
brick.showValue("DownButtonTime", control.timer1.millis(), 1)
control.timer1.reset()
})
```
## See also
[seconds](/reference/control/timer/seconds), [reset](/reference/control/timer/reset)

View File

@ -0,0 +1,32 @@
# pauseUntil
Pause until the timer counts up to a number of milliseconds.
```sig
control.timer1.pauseUntil(0)
```
When code in a block comes to a **pauseUntil**, it will wait until the timer count reaches the number of milliseconds you say. Code in blocks like **forever** and **runInParallel** will keep running while the current code is paused.
The time number you give is the number of milliseconds past the running timer count. If the timer is currently at `25000` milliseconds and you want to pause for `10` seconds, then use a pause time of `35000`. If you want your pause time number to match the actual wait time, then [reset](/reference/control/timer/reset) the timer first.
## Parameters
* **ms**: the [number](/types/number) of milliseconds that you want the timer to count up to. For seconds, convert to milliseconds: 100 milliseconds = 1/10 second and 1000 milliseconds = 1 second.
## Example
Pause between messages on the screen by `5` seconds.
```blocks
brick.clearScreen()
brick.showString("Testing my pause...", 1)
let startTime = control.timer1.millis()
brick.showValue("StartTime", startTime, 3)
control.timer1.pauseUntil(startTime + 5000)
brick.showValue("EndTime", control.timer1.millis() - startTime, 4)
```
## See also
[millis](/reference/control/timer/millis), [reset](/reference/control/timer/reset)

View File

@ -0,0 +1,49 @@
# reset
Reset the elapsed time of the timer back to `0`.
```sig
control.timer1.reset()
```
A timer starts counting from `0` when your program starts. It's time value always gets larger as your program runs. Maybe you want to meausure how long some task takes to finish or you want to do some action only for a little while. A timer can keep track of the time it takes to do it.
Resetting the timer sets the time value to `0` so the next time you check the time it's exactly the amount of time that has _elapsed_. Otherwise, you need to remember a start time value and then subtract it from the current time.
## Examples
### Press time
Find out how much time goes by between presses of the `enter` button on the brick.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
brick.showValue("PressTime", control.timer1.seconds(), 1)
control.timer1.reset()
})
```
### Difference timer
Use a difference timer and compare it to a timer that resets. Use the ``left`` button to start timing and the ``right`` button to stop.
```blocks
let startTime = 0
let timing = false
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
brick.clearScreen()
brick.showString("Starting timers...", 1)
startTime = control.timer1.seconds()
control.timer2.reset()
timing = true
})
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
if (timing) {
brick.clearScreen()
brick.showString("Timer results...", 1)
brick.showValue("timer 1", control.timer1.seconds() - startTime, 3)
brick.showValue("timer 2", control.timer2.seconds(), 4)
timing = false;
}
})
```

View File

@ -0,0 +1,25 @@
# seconds
Get the amount of time counted by the timer in seconds.
The timer count begins from `0` when you program starts or is [reset](/reference/control/timer/reset). The number of seconds returned also includes milliseconds if there is a fractional part of a second too.
## Returns
* a [number](/types/number) that is the amount of time elapsed, in seconds, since the timer was started or reset.
## Example
Find out how many seconds go by between presses of the `down` button on the brick.
```blocks
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
brick.showValue("DownButtonTime", control.timer1.seconds(), 1)
control.timer1.reset()
})
```
## See also
[millis](/reference/control/timer/millis), [reset](/reference/control/timer/reset)

View File

@ -40,9 +40,9 @@ sensors.ultrasonic1.pauseUntil(UltrasonicSensorEvent.ObjectDetected);
## Infrared
```cards
sensors.infraredSensor1.onEvent(null, function () {});
sensors.infraredSensor1.pauseUntil(null);
sensors.infraredSensor1.proximity();
sensors.infrared1.onEvent(null, function () {});
sensors.infrared1.pauseUntil(null);
sensors.infrared1.proximity();
```
@ -53,5 +53,5 @@ sensors.remoteButtonCenter.onEvent(ButtonEvent.Pressed, function () {})
sensors.remoteButtonCenter.pauseUntil(ButtonEvent.Pressed);
sensors.remoteButtonCenter.isPressed()
sensors.remoteButtonCenter.wasPressed()
sensors.infraredSensor1.setRemoteChannel(null)
sensors.infrared1.setRemoteChannel(null)
```

142
docs/static/avatar.svg vendored
View File

@ -5,105 +5,53 @@
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 32 32"
style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#303030;}
.st0{fill:#DE0612;}
.st1{fill:#FFFFFF;stroke:#FFFFFF;stroke-width:0.4;stroke-miterlimit:10;}
</style>
<sodipodi:namedview bordercolor="#666666" borderopacity="1" gridtolerance="10" guidetolerance="10" id="namedview15" inkscape:current-layer="svg2" inkscape:cx="16" inkscape:cy="16" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="661" inkscape:window-maximized="0" inkscape:window-width="997" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="5.2149125" objecttolerance="10" pagecolor="#ffffff" showgrid="false">
</sodipodi:namedview>
<g id="avatar_mf" transform="translate(-5304.979 8145.745)">
<path id="Path_180" class="st0" d="M5317.1-8125.6c0.2,0,0.3-0.1,0.5-0.1l2.9-0.6c1.3-0.3,2.5-0.5,3.8-0.8c0.5-0.1,1-0.2,1.5-0.3
c0.1,0,0.1,0,0.1-0.1c0-0.5,0-1-0.1-1.5c-0.1-0.6-0.2-1.1-0.3-1.7c-0.1-0.4-0.1-0.8-0.2-1.2c-0.1-0.7-0.2-1.4-0.3-2
c-0.1-0.6-0.2-1.1-0.3-1.7c0-0.2-0.2-0.4-0.4-0.4c0,0,0,0-0.1,0c-0.2,0-0.5,0.1-0.7,0.1c-0.5,0.1-1,0.1-1.5,0.2
c-0.5,0.1-1,0.1-1.6,0.2c-0.5,0.1-1,0.1-1.4,0.2c-0.2,0-0.3,0-0.5,0.1c-0.2,0-0.4,0.2-0.5,0.4c0,0.2-0.1,0.4-0.1,0.5
c0,0.4-0.1,0.8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1-0.3,0.3
C5314.8-8135,5314.7-8134.6,5314.7-8134.2z"/>
<path id="Path_185" class="st0" d="M5324.5-8117.2c-0.2-0.7-0.5-1.3-0.7-2l-0.7,0.3c0,0-0.1,0-0.1,0c-0.1,0.1-0.2,0-0.2-0.1
c-0.1-0.3-0.2-0.5-0.3-0.8c-0.2-0.7-0.5-1.4-0.7-2.1c0,0,0-0.1,0-0.1c0,0,0,0.1-0.1,0.1c-0.1,0.2-0.3,0.3-0.5,0.5c0,0-0.1,0-0.1,0
c-0.3,0.1-0.6,0.1-0.8,0.2c0,0-0.1,0-0.1,0c0,0.2-0.1,0.3-0.1,0.5c0.6,1.5,1.1,3.1,1.7,4.6c0,0,0,0,0,0.1
C5322.7-8116.3,5323.6-8116.7,5324.5-8117.2z"/>
<path id="Path_186" class="st0" d="M5325.4-8123.1c-0.7,0.2-1.3,0.3-2,0.5c-0.5,0.1-0.9,0.2-1.4,0.3c-0.1,0-0.2,0.1-0.1,0.2
c0,0,0,0,0,0.1c0.2,0.5,0.3,0.9,0.5,1.4c0.2,0.5,0.4,1.1,0.6,1.6c0,0,0,0,0,0c0.1-0.1,0.2-0.1,0.3-0.2c0.2-0.1,0.3-0.2,0.5-0.2
c0.2-0.1,0.4-0.1,0.6-0.2c0.7-0.2,1.5-0.4,2.2-0.6c0,0,0,0,0.1,0C5326.3-8121.1,5325.9-8122.1,5325.4-8123.1z"/>
<path id="Path_187" class="st0" d="M5320.7-8124.4c-0.4,0.1-0.8,0.2-1.2,0.3c-0.6,0.1-1.3,0.3-1.9,0.4c0,0-0.1,0-0.1,0
c-0.1,0-0.2-0.1-0.3-0.1c0,0,0,0.1,0,0.1c0.3,0.7,0.4,1.5,0.3,2.2c-0.1,0.4-0.3,0.8-0.5,1.1c0,0,0,0-0.1,0.1
c0.2-0.1,0.4-0.1,0.6-0.1l2.5-0.6c0.5-0.1,0.9-0.6,1-1.1c0.1-0.5,0-1-0.1-1.5C5320.8-8124,5320.8-8124.2,5320.7-8124.4z"/>
<path id="Path_188" class="st0" d="M5325.5-8127c-2.7,0.5-5.3,1.1-7.9,1.6c0,0.5,0,0.9,0.1,1.4c0.1,0,0.2,0,0.3-0.1
c1.2-0.3,2.3-0.5,3.5-0.8c1.2-0.3,2.4-0.5,3.6-0.8c0.1,0,0.3-0.1,0.4-0.1c0,0,0.1,0,0.1-0.1
C5325.6-8126.2,5325.5-8126.6,5325.5-8127z"/>
<path id="Path_189" class="st0" d="M5328.6-8118.4c-0.2-0.4-0.3-0.7-0.5-1.1c-0.1-0.2-0.2-0.5-0.3-0.7c0-0.1,0-0.1-0.1,0
c-1.2,0.3-2.4,0.6-3.6,1c0,0,0,0-0.1,0c0.2,0.7,0.5,1.3,0.7,2C5326-8117.6,5327.3-8118,5328.6-8118.4z"/>
<path id="Path_190" class="st0" d="M5319.9-8120.9l-0.6,0.1c-1,0.2-2,0.5-3,0.7c-0.1,0-0.1,0.1-0.1,0.1c-0.3,0.7-0.5,1.5-0.8,2.2
c0,0,0,0,0,0.1c0.2,0,0.4-0.1,0.5-0.1c1-0.3,2-0.5,3.1-0.8c0.1,0,0.2-0.1,0.3-0.2C5319.5-8119.5,5319.7-8120.2,5319.9-8120.9z"/>
<path id="Path_191" class="st0" d="M5325.1-8125.4c-1.1,0.2-2.2,0.5-3.3,0.7c0.3,0.7,0.4,1.4,0.3,2.2c0.2,0,0.4-0.1,0.5-0.1
c0.9-0.2,1.8-0.4,2.7-0.6c0.1,0,0.1,0,0.1-0.1c0.1-0.4,0-0.9-0.1-1.3C5325.3-8124.9,5325.2-8125.1,5325.1-8125.4
C5325.1-8125.3,5325.1-8125.4,5325.1-8125.4z"/>
<path id="Path_192" class="st0" d="M5325.6-8132c0.2,0,0.4,0,0.5,0c0.2,0,0.4,0,0.6,0c0.3,0,0.6-0.2,0.8-0.4c0.3-0.4,0.7-0.8,1-1.2
c-0.1-0.1-0.1-0.1-0.1-0.2c0,0,0,0-0.1,0c-0.7-0.1-1.3-0.5-1.4-1.2c-0.1-0.2-0.1-0.4-0.1-0.6c-0.2,0.1-0.3,0.3-0.5,0.4
c-0.1,0.1-0.2,0.1-0.3,0.2c0,0-0.1,0.1-0.2,0c-0.2,0-0.5-0.1-0.7-0.1c0,0,0,0-0.1,0C5325.3-8134.1,5325.4-8133.1,5325.6-8132z"/>
<path id="Path_193" class="st0" d="M5328.4-8134.2c0.2-0.3,0.5-0.5,0.8-0.7c0.4-0.4,0.6-0.8,0.7-1.4c0-0.1,0-0.2-0.1-0.3
c-0.3-0.5-0.7-1.1-1-1.6c0-0.1-0.1-0.1-0.1,0c-0.4,0.2-0.8,0.5-1.1,0.8c-0.2,0.2-0.4,0.4-0.6,0.6c-0.1,0.1-0.1,0.3,0,0.4
c0.5,0.7,1,1.5,1.4,2.2C5328.4-8134.2,5328.4-8134.2,5328.4-8134.2z"/>
<path id="Path_194" class="st0" d="M5314.3-8126.1c-0.1-0.1-0.1-0.1-0.2-0.2c-0.1,0-0.1-0.1-0.1-0.2c0-0.1,0-0.3,0-0.4h-0.1
c-0.6,0-1.2-0.1-1.7-0.2c0,0-0.1,0-0.1,0c-0.4,0.2-0.7,0.4-1,0.8c-0.4,0.6-0.4,1.4,0.1,1.9c0.2,0.2,0.4,0.4,0.6,0.6
c0.1,0.1,0.2,0.2,0.3,0.2c-0.2-0.6,0-1.3,0.5-1.8C5313-8125.9,5313.6-8126.2,5314.3-8126.1z"/>
<path id="Path_195" class="st0" d="M5315.7-8114.9c0.5-0.1,0.9-0.3,1.4-0.4c0.8-0.2,1.6-0.4,2.4-0.7c0.1,0,0.1,0,0.1-0.1
c0.1-0.4,0.2-0.7,0.4-1.1c0,0,0,0,0-0.1c-0.1,0-0.2,0-0.3,0.1c-1.2,0.3-2.3,0.6-3.5,1c-0.1,0-0.1,0.1-0.1,0.1
c-0.1,0.4-0.3,0.7-0.4,1.1C5315.7-8115,5315.7-8115,5315.7-8114.9z"/>
<path id="Path_196" class="st0" d="M5315.4-8117.4c0.2,0.3,0.4,0.6,0.6,0.9c0,0,0.1,0,0.1,0c1-0.3,1.9-0.5,2.9-0.8
c0.3-0.1,0.6-0.2,0.9-0.2c-0.1-0.1-0.1-0.2-0.2-0.2c-0.2-0.2-0.3-0.4-0.5-0.6c0,0-0.1-0.1-0.1,0c-0.9,0.3-1.9,0.5-2.8,0.8
C5316-8117.5,5315.7-8117.5,5315.4-8117.4z"/>
<path id="Path_197" class="st0" d="M5321.3-8143.6c0-0.3,0-0.7,0-1c0,0-0.1,0-0.1,0c-0.7,0-1.5,0-2.2,0.1c-0.4,0-0.7,0-1.1,0.1
c-0.1,0-0.1,0-0.1,0.1c0,0.3,0,0.6,0,0.8c0,0,0,0.1,0.1,0.1c0.4,0,0.8,0,1.1,0c0.5,0,1.1,0,1.6-0.1
C5320.9-8143.5,5321.1-8143.6,5321.3-8143.6z"/>
<path id="Path_198" class="st0" d="M5329.2-8134.3c0.1,0,0.2,0,0.2-0.1c0.4-0.2,0.8-0.4,1.1-0.7c0.3-0.2,0.4-0.5,0.6-0.8
c0.1-0.3,0.1-0.6-0.1-0.9c-0.4-0.5-0.7-1-1.1-1.6c0,0,0,0-0.1-0.1c-0.2,0.2-0.4,0.4-0.6,0.6c0,0,0,0,0,0c0,0,0,0.1,0,0.1
c0.2,0.4,0.5,0.7,0.7,1c0.1,0.2,0.2,0.4,0.1,0.6c0,0.5-0.1,0.9-0.4,1.3c-0.1,0.1-0.2,0.2-0.3,0.3
C5329.4-8134.5,5329.3-8134.4,5329.2-8134.3C5329.2-8134.3,5329.2-8134.3,5329.2-8134.3z"/>
<path id="Path_199" class="st0" d="M5317.5-8136.7c0,0.2,0,0.3,0,0.5c0,0,0,0.1,0.1,0.1c0.2,0,0.3,0.1,0.5,0.1c0.7,0.1,1.4,0.1,2,0
c0.4,0,0.8-0.1,1.2-0.1c0.2,0,0.5-0.1,0.7-0.1c0.1,0,0.1,0,0.1-0.1c0-0.2,0-0.3,0-0.5C5320.5-8136.6,5319-8136.5,5317.5-8136.7z"/>
<path id="Path_200" class="st0" d="M5312.5-8123.2c0.1-0.4,0.1-0.8,0.2-1.2c0.1-0.6,0.6-1,1.2-1c0.3,0,0.5,0.1,0.7,0.3
c0.2,0.2,0.2,0.4,0.2,0.7c-0.1,0.3-0.2,0.6-0.2,0.9c0,0.1-0.1,0.2-0.1,0.4c0,0,0,0,0,0c0.1-0.1,0.2-0.2,0.3-0.3
c0.3-0.4,0.4-0.9,0.4-1.4c0-0.6-0.4-1-0.9-1.1c-0.1,0-0.1,0-0.2,0c-0.5,0-1,0.3-1.4,0.7c-0.3,0.3-0.4,0.6-0.5,1
c-0.1,0.3,0,0.7,0.2,1C5312.5-8123.2,5312.5-8123.2,5312.5-8123.2z"/>
<path id="Path_201" class="st0" d="M5314.3-8123.2c0.1-0.5,0.3-0.9,0.4-1.4c0.1-0.2,0-0.4-0.2-0.5c-0.4-0.2-0.9-0.1-1.2,0.2
c0,0,0,0,0,0.1c0,0.2,0,0.4,0.1,0.6c0,0.1,0.1,0.2,0.2,0.3C5313.7-8123.6,5314-8123.4,5314.3-8123.2
C5314.2-8123.2,5314.3-8123.2,5314.3-8123.2z"/>
<path id="Path_202" class="st0" d="M5317.4-8124.1c0-0.4,0-0.9-0.1-1.3c-0.1,0-0.1,0-0.2,0c-0.1,0-0.2,0-0.3,0
c-0.7-0.3-1.4-0.5-2.1-0.8c0,0,0,0,0,0c0.1,0.1,0.1,0.1,0.2,0.2c0.3,0.2,0.5,0.6,0.6,0.9c0,0,0,0,0,0c0.1,0,0.3,0,0.4,0.1
c0.3,0.1,0.6,0.3,0.9,0.5c0,0,0.1,0.1,0.1,0.1C5317.1-8124.2,5317.2-8124.1,5317.4-8124.1z"/>
<path id="Path_203" class="st0" d="M5321.6-8124.6c-0.2,0-0.4,0.1-0.6,0.1c0.1,0.2,0.1,0.4,0.2,0.6c0.1,0.4,0.2,0.8,0.1,1.2
c0,0.5-0.1,0.9-0.4,1.3c0,0,0,0,0,0c0.3,0,0.6-0.2,0.7-0.5c0.2-0.3,0.3-0.6,0.3-0.9C5321.9-8123.4,5321.8-8124,5321.6-8124.6z"/>
<path id="Path_204" class="st0" d="M5315.7-8135.8c0.2,0,0.3,0.1,0.5,0.1c0.5,0.1,1,0.2,1.5,0.2c0.2,0,0.5,0,0.7,0
c0.7-0.1,1.4-0.2,2.1-0.2c0.6-0.1,1.2-0.2,1.8-0.2c0.5-0.1,1.1-0.1,1.6-0.2l-1.5-0.2c0,0,0,0,0,0c0,0.2-0.1,0.3-0.2,0.3
c0,0,0,0,0,0c-0.3,0.1-0.5,0.1-0.8,0.2c-0.8,0.1-1.6,0.1-2.3,0.1c-0.4,0-0.9,0-1.3-0.1c-0.1,0-0.2-0.1-0.3-0.2c0,0-0.1,0-0.1,0
c-0.3,0-0.6,0.1-0.9,0.1L5315.7-8135.8L5315.7-8135.8z"/>
<path id="Path_205" class="st0" d="M5327.3-8117.7c-0.3,0.1-0.5,0.2-0.8,0.2c-0.6,0.2-1.1,0.3-1.7,0.5c0,0-0.1,0-0.1,0.1
c-0.5,0.2-1,0.5-1.5,0.7c0,0,0,0,0,0c0.3-0.1,0.5-0.1,0.8-0.2c0.5-0.2,1.1-0.3,1.6-0.5c0.1,0,0.2-0.1,0.2-0.1
C5326.2-8117.2,5326.8-8117.5,5327.3-8117.7C5327.3-8117.7,5327.3-8117.7,5327.3-8117.7C5327.3-8117.7,5327.3-8117.7,5327.3-8117.7
z"/>
<path id="Path_206" class="st0" d="M5327-8135.8c0,0.1,0,0.2,0,0.4c0.1,0.5,0.3,0.9,0.7,1.1c0.1,0.1,0.3,0.1,0.4,0.2l0,0
C5327.8-8134.7,5327.4-8135.2,5327-8135.8L5327-8135.8z"/>
<path id="Path_207" class="st0" d="M5329-8134.4c-0.1,0.1-0.2,0.2-0.3,0.4c0,0,0,0,0,0.1c0,0.1,0,0.1,0.1,0.1c0.1,0,0.2,0,0.3-0.1
c0.1,0,0.2-0.1,0.3-0.1c-0.1,0-0.1-0.1-0.2-0.1C5329-8134.2,5329-8134.3,5329-8134.4z"/>
<g>
<polygon class="st0" points="2,9.9 5.8,8.2 5.8,8 6.2,7.4 6.9,6.9 8,6.6 9.1,6.5 9.5,6.6 13.1,5 13.1,4.8 13.4,4.3 14,3.9
14.9,3.6 16,3.5 17.1,3.6 18,3.9 18.6,4.3 18.9,4.8 18.9,5 22.4,6.6 23,6.6 24,6.7 25,7 25.8,7.5 26.2,8 26.2,8.3 29.9,10
28.8,19.3 15.9,28.5 3.1,19.2 "/>
<g>
<path class="st1" d="M15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6L15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6
C15.9,28.6,15.9,28.6,15.9,28.6L15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6L15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6L15.9,28.6
C15.9,28.6,15.9,28.6,15.9,28.6L15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6
C15.9,28.6,15.9,28.6,15.9,28.6C15.9,28.6,15.9,28.6,15.9,28.6L3.1,19.3c0,0,0,0,0,0L2,9.9c0,0,0,0,0,0c0,0,0,0,0,0l0,0
c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0v0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0h0c0,0,0,0,0,0c0,0,0,0,0,0
c0,0,0,0,0,0l3.8-1.7l0-0.1l0-0.1c0,0,0,0,0,0l0.4-0.6c0,0,0,0,0,0l0.7-0.5c0,0,0,0,0,0l1-0.3c0,0,0,0,0,0l1.2-0.1c0,0,0,0,0,0
l0.4,0l3.6-1.6l0-0.1c0,0,0,0,0,0c0,0,0,0,0,0l0,0l0.2-0.5c0,0,0,0,0,0L14,3.8c0,0,0,0,0,0l0.9-0.3c0,0,0,0,0,0L16,3.4
c0,0,0,0,0,0l1.1,0.1c0,0,0,0,0,0L18,3.8c0,0,0,0,0,0l0.6,0.4c0,0,0,0,0,0l0.3,0.5c0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.2,0.7l0.7,0.6L14.7,15.5z M14.7,13.5l1.3,0.1l1.3-0.1l1.1-0.4l0.7-0.6l0.1-0.3l0,0c0,0,0,0,0,0
l0-0.1l0,0c0,0,0,0,0,0l0,0l0-0.1L19,11.2l-0.7-0.5l-1.1-0.4L16,10.2l-1.2,0.1l-1.1,0.4L13,11.2l-0.3,0.6l0,0c0,0,0,0,0,0l0.2,0.7
l0.7,0.6L14.7,13.5z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont";
src: url("iconfont.eot?8b7e57577c2d1f1ae9e810b9e010bc84?#iefix") format("embedded-opentype"),
url("iconfont.woff2?8b7e57577c2d1f1ae9e810b9e010bc84") format("woff2"),
url("iconfont.woff?8b7e57577c2d1f1ae9e810b9e010bc84") format("woff");
src: url("iconfont.eot?92b07c6c5392088e45983d845234d068?#iefix") format("embedded-opentype"),
url("iconfont.woff2?92b07c6c5392088e45983d845234d068") format("woff2"),
url("iconfont.woff?92b07c6c5392088e45983d845234d068") format("woff");
}
.icon {
@ -91,3 +91,6 @@ url("iconfont.woff?8b7e57577c2d1f1ae9e810b9e010bc84") format("woff");
.icon-blocks:before {
content: "\f119";
}
.icon-search:before {
content: "\f11a";
}

Binary file not shown.

View File

@ -82,6 +82,9 @@
<glyph glyph-name="blocks"
unicode="&#xF119;"
horiz-adv-x="40" d=" M10.9 23H39V16.9H10.9V23z M39.2 27.1L39.2 33L0.9 33L0.9 31.1L0.9 27.1L0.9 12.9L0.9 7L39.2 7L39.2 12.9L6.9 12.9L6.9 27.1z" />
<glyph glyph-name="search"
unicode="&#xF11A;"
horiz-adv-x="40" d=" M38.6 4.9L29.6 13.9C31.5 16.5 32.7 19.7 32.7 23.1C32.7 31.8 25.7 38.8 17 38.8C8.3 38.8 1.4 31.8 1.4 23.1C1.4 14.4 8.3 7.5 17 7.5C20.3 7.5 23.3 8.5 25.9 10.3L35 1.2L38.6 4.9zM17 12.7C11.3 12.7 6.6 17.4 6.6 23.1S11.3 33.6 17 33.6S27.5 28.9 27.5 23.1S22.8 12.7 17 12.7z" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because one or more lines are too long

View File

@ -110,15 +110,15 @@ namespace sensors {
* @param handler the code to run when detected
*/
//% help=sensors/color-sensor/on-color-detected
//% block="on %sensor|detected color %color"
//% block="on **color** %this|detected color %color"
//% blockId=colorOnColorDetected
//% parts="colorsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=100 blockGap=12
//% group="Color Sensor"
//% color.fieldEditor="gridpicker"
//% color.fieldOptions.columns=4
//% color.fieldOptions.columns=4
//% color.fieldOptions.tooltips=true
//% color.fieldOptions.hideRect=true
//% color.fieldOptions.width=268
@ -135,15 +135,15 @@ namespace sensors {
* @param color the color to detect
*/
//% help=sensors/color-sensor/pause-for-color
//% block="pause %sensor|for color %color"
//% block="pause **color** %this|for color %color"
//% blockId=colorPauseForColorDetected
//% parts="colorsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=99 blockGap=8
//% group="Color Sensor"
//% color.fieldEditor="gridpicker"
//% color.fieldOptions.columns=4
//% color.fieldOptions.columns=4
//% color.fieldOptions.tooltips=true
//% color.fieldOptions.hideRect=true
//% color.fieldOptions.width=268
@ -160,11 +160,11 @@ namespace sensors {
* @param sensor the color sensor to query the request
*/
//% help=sensors/color-sensor/color
//% block="%sensor| color"
//% block="**color** %this| color"
//% blockId=colorGetColor
//% parts="colorsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=98
//% group="Color Sensor"
//% blockGap=8
@ -179,11 +179,11 @@ namespace sensors {
* @param handler the code to run when detected
*/
//% help=sensors/color-sensor/on-light-changed
//% block="on %sensor|%mode|%condition"
//% block="on **color** %this|%mode|%condition"
//% blockId=colorOnLightChanged
//% parts="colorsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=89 blockGap=12
//% group="Color Sensor"
onLightChanged(mode: LightIntensityMode, condition: LightCondition, handler: () => void) {
@ -196,11 +196,11 @@ namespace sensors {
* @param color the color to detect
*/
//% help=sensors/color-sensor/pause-for-light
//% block="pause %sensor|for %mode|%condition"
//% block="pause **color** %this|for %mode|%condition"
//% blockId=colorPauseForLight
//% parts="colorsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=88 blockGap=8
//% group="Color Sensor"
pauseForLight(mode: LightIntensityMode, condition: LightCondition) {
@ -214,11 +214,11 @@ namespace sensors {
* @param sensor the color sensor port
*/
//% help=sensors/color-sensor/light
//% block="%sensor|%mode"
//% block="**color** %this|%mode"
//% blockId=colorLight
//% parts="colorsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=87
//% group="Color Sensor"
light(mode: LightIntensityMode) {
@ -241,10 +241,10 @@ namespace sensors {
* @param condition the dark or bright light condition
* @param value the value threshold
*/
//% blockId=colorSetThreshold block="set %sensor|%condition|to %value"
//% blockId=colorSetThreshold block="set **color** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=90
//% value.min=0 value.max=100
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/set-threshold
setThreshold(condition: LightCondition, value: number) {
if (condition == LightCondition.Dark)
@ -257,9 +257,9 @@ namespace sensors {
* Get a threshold value
* @param condition the light condition
*/
//% blockId=colorGetThreshold block="%sensor|%condition"
//% blockId=colorGetThreshold block="**color** %this|%condition"
//% group="Threshold" blockGap=8 weight=89
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/threshold
threshold(condition: LightCondition): number {
return this.thresholdDetector.threshold(<ThresholdState><number>LightCondition.Dark);
@ -268,9 +268,9 @@ namespace sensors {
/**
* Collects measurement of the light condition and adjusts the threshold to 10% / 90%.
*/
//% blockId=colorCalibrateLight block="calibrate|%sensor|for %mode"
//% blockId=colorCalibrateLight block="calibrate **color** %this|for %mode"
//% group="Threshold" weight=91 blockGap=8
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/calibrate-light
calibrateLight(mode: LightIntensityMode, deviation: number = 8) {
this.calibrating = true; // prevent events
@ -316,6 +316,7 @@ namespace sensors {
/**
* Returns a color that the sensor can detect
* @param color the color sensed by the sensor, eg: ColorSensorColor.Red
*/
//% shim=TD_ID
//% blockId=colorSensorColor block="color %color"
@ -323,7 +324,7 @@ namespace sensors {
//% weight=97
//% help=sensors/color
//% color.fieldEditor="gridpicker"
//% color.fieldOptions.columns=4
//% color.fieldOptions.columns=4
//% color.fieldOptions.tooltips=true
//% color.fieldOptions.hideRect=true
//% color.fieldOptions.width=268
@ -331,15 +332,15 @@ namespace sensors {
return color;
}
//% whenUsed block="color 3" weight=95 fixedInstance jres=icons.port3
//% whenUsed block="3" weight=95 fixedInstance jres=icons.port3
export const color3: ColorSensor = new ColorSensor(3)
//% whenUsed block="color 1" weight=90 fixedInstance jres=icons.port1
//% whenUsed block="1" weight=90 fixedInstance jres=icons.port1
export const color1: ColorSensor = new ColorSensor(1)
//% whenUsed block="color 2" weight=90 fixedInstance jres=icons.port2
//% whenUsed block="2" weight=90 fixedInstance jres=icons.port2
export const color2: ColorSensor = new ColorSensor(2)
//% whenUsed block="color 4" weight=90 fixedInstance jres=icons.port4
//% whenUsed block="4" weight=90 fixedInstance jres=icons.port4
export const color4: ColorSensor = new ColorSensor(4)
}

View File

@ -51,6 +51,7 @@ namespace console {
*/
//% blockId=logsendtostreen block="send console to screen"
//% weight=1
//% help=console/send-to-screen
export function sendToScreen(): void {
console.screen.attach();
}

View File

@ -10,6 +10,7 @@ namespace control {
*/
//% weight=21 blockGap=12 blockId="control_raise_event"
//% block="raise event|from %src|with value %value" blockExternalInputs=1
//% help=control/raise-event
void raiseEvent(int src, int value) {
pxt::raiseEvent(src, value);
}

View File

@ -421,28 +421,28 @@ namespace motors {
}
}
//% whenUsed fixedInstance block="large A"
//% whenUsed fixedInstance block="large motor A"
export const largeA = new Motor(Output.A, true);
//% whenUsed fixedInstance block="large B"
//% whenUsed fixedInstance block="large motor B"
export const largeB = new Motor(Output.B, true);
//% whenUsed fixedInstance block="large C"
//% whenUsed fixedInstance block="large motor C"
export const largeC = new Motor(Output.C, true);
//% whenUsed fixedInstance block="large D"
//% whenUsed fixedInstance block="large motor D"
export const largeD = new Motor(Output.D, true);
//% whenUsed fixedInstance block="medium A"
//% whenUsed fixedInstance block="medium motor A"
export const mediumA = new Motor(Output.A, false);
//% whenUsed fixedInstance block="medium B"
//% whenUsed fixedInstance block="medium motor B"
export const mediumB = new Motor(Output.B, false);
//% whenUsed fixedInstance block="medium C"
//% whenUsed fixedInstance block="medium motor C"
export const mediumC = new Motor(Output.C, false);
//% whenUsed fixedInstance block="medium D"
//% whenUsed fixedInstance block="medium motor D"
export const mediumD = new Motor(Output.D, false);
//% fixedInstances
@ -586,16 +586,16 @@ namespace motors {
}
}
//% whenUsed fixedInstance block="large B+C"
//% whenUsed fixedInstance block="large motors B+C"
export const largeBC = new SynchedMotorPair(Output.BC);
//% whenUsed fixedInstance block="large A+D"
//% whenUsed fixedInstance block="large motors A+D"
export const largeAD = new SynchedMotorPair(Output.AD);
//% whenUsed fixedInstance block="large A+B"
//% whenUsed fixedInstance block="large motors A+B"
export const largeAB = new SynchedMotorPair(Output.AB);
//% whenUsed fixedInstance block="large C+D"
//% whenUsed fixedInstance block="large motors C+D"
export const largeCD = new SynchedMotorPair(Output.CD);
function reset(out: Output) {

View File

@ -55,7 +55,8 @@ declare namespace control {
* @param mode optional definition of how the event should be processed after construction.
*/
//% weight=21 blockGap=12 blockId="control_raise_event"
//% block="raise event|from %src|with value %value" blockExternalInputs=1 shim=control::raiseEvent
//% block="raise event|from %src|with value %value" blockExternalInputs=1
//% help=control/raise-event shim=control::raiseEvent
function raiseEvent(src: int32, value: int32): void;
/**

View File

@ -11,36 +11,40 @@ namespace control {
}
/**
* Gets the elapsed time in millis since the last reset
* Get the elapsed time in millis since the last reset
*/
//% blockId=timerMillis block="%timer|millis"
//% help=control/timer/millis
millis(): number {
return control.millis() - this.start;
}
/**
* Gets the elapsed time in seconds since the last reset
* Get the elapsed time in seconds since the last reset
*/
//% blockId=timerSeconds block="%timer|seconds"
//% help=control/timer/seconds
seconds(): number {
return this.millis() / 1000;
}
/**
* Resets the timer
* Reset the timer
*/
//% blockId=timerRest block="%timer|reset"
//% help=control/timer/reset
reset() {
this.start = control.millis();
}
/**
* Pauses until the timer reaches the given amount of milliseconds
* Pause until the timer reaches the given amount of milliseconds
* @param ms how long to pause for, eg: 5, 100, 200, 500, 1000, 2000
*/
//% blockId=timerPauseUntil block="%timer|pause until (ms) %ms"
//% help=control/timer/pause-until
pauseUntil(ms: number) {
const remaining = this.millis() - ms;
const remaining = ms - this.millis();
pause(Math.max(0, remaining));
}
}

View File

@ -37,11 +37,11 @@ namespace sensors {
* @param sensor the gyroscope to query the request
*/
//% help=sensors/gyro/angle
//% block="%sensor|angle"
//% block="**gyro** %this|angle"
//% blockId=gyroGetAngle
//% parts="gyroscope"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=64 blockGap=8
//% group="Gyro Sensor"
angle(): number {
@ -57,12 +57,12 @@ namespace sensors {
* @param sensor the gyroscope to query the request
*/
//% help=sensors/gyro/rate
//% block="%sensor|rate"
//% block="**gyro** %this|rate"
//% blockId=gyroGetRate
//% parts="gyroscope"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% weight=65 blockGap=8
//% this.fieldEditor="ports"
//% weight=65 blockGap=8
//% group="Gyro Sensor"
rate(): number {
if (this.calibrating)
@ -82,18 +82,18 @@ namespace sensors {
* Forces a calibration of the gyro. Must be called when the sensor is completely still.
*/
//% help=sensors/gyro/reset
//% block="reset %sensor|"
//% blockId=gyroReset
//% block="reset **gyro** %this|"
//% blockId=gyroReset
//% parts="gyroscope"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% weight=50
//% this.fieldEditor="ports"
//% weight=50
//% group="Gyro Sensor"
reset(): void {
if (this.calibrating) return; // already in calibration mode
this.calibrating = true;
// may be triggered by a button click,
// may be triggered by a button click,
// give time for robot to settle
pause(700);
// send a reset command
@ -127,7 +127,7 @@ namespace sensors {
/**
* Enables or disable drift correction
* @param enabled
* @param enabled
*/
//%
setDriftCorrection(enabled: boolean) {
@ -135,15 +135,15 @@ namespace sensors {
}
}
//% fixedInstance whenUsed block="gyro 2" weight=95 jres=icons.port2
//% fixedInstance whenUsed block="2" weight=95 jres=icons.port2
export const gyro2: GyroSensor = new GyroSensor(2)
//% fixedInstance whenUsed block="gyro 1" jres=icons.port1
//% fixedInstance whenUsed block="1" jres=icons.port1
export const gyro1: GyroSensor = new GyroSensor(1)
//% fixedInstance whenUsed block="gyro 3" jres=icons.port3
//% fixedInstance whenUsed block="3" jres=icons.port3
export const gyro3: GyroSensor = new GyroSensor(3)
//% fixedInstance whenUsed block="gyro 4" jres=icons.port4
//% fixedInstance whenUsed block="4" jres=icons.port4
export const gyro4: GyroSensor = new GyroSensor(4)
}

View File

@ -5,7 +5,7 @@ sensors.remoteButtonCenter.onEvent(ButtonEvent.Pressed, function () {})
sensors.remoteButtonCenter.pauseUntil(ButtonEvent.Pressed);
sensors.remoteButtonCenter.isPressed()
sensors.remoteButtonCenter.wasPressed()
sensors.infraredSensor1.setRemoteChannel(null)
sensors.infrared1.setRemoteChannel(null)
```
## See also

View File

@ -25,7 +25,7 @@ In order to recognize a button event signalled from a remote beacon, an infrared
If the beacon button ``center`` is pressed, show a `green` status light. Otherwise, set the status light to `orange`.
```blocks
sensors.infraredSensor1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.infrared1.setRemoteChannel(InfraredRemoteChannel.Ch0)
forever(function () {
if (sensors.remoteButtonCenter.isPressed()) {
brick.setStatusLight(StatusLight.Green)

View File

@ -29,7 +29,7 @@ In order to recognize a button event signalled from a remote beacon, an infrared
Check for an event on beacon button sensor ``center``. Put an expression on the screen when the button is released.
```blocks
sensors.infraredSensor1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.infrared1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.remoteButtonCenter.onEvent(ButtonEvent.Released, function () {
brick.showImage(images.expressionsSick)
})

View File

@ -34,7 +34,7 @@ brick.showString("We're going to wait", 1);
brick.showString("for you to bump the", 2);
brick.showString("touch sensor on port 1", 3);
waitTime = control.millis();
sensors.infraredSensor1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.infrared1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.remoteButtonCenter.pauseUntil(ButtonEvent.Bumped);
brick.clearScreen();
if (control.millis() - waitTime > 5000) {

View File

@ -3,7 +3,7 @@
Set the remote infrared signal channel for an infrared sensor.
```sig
sensors.infraredSensor1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.infrared1.setRemoteChannel(InfraredRemoteChannel.Ch0)
```
An infrared sensor connected to the @boardname@ can receive messages (signals for button events) from a remote infrared beacon. In order for the sensor to know which beacon to receive messages from, a _channel_ is used. The beacon has a switch on it to select a particular channel to transmit on. The sensor needs to know which channel to receive ("listen" for) messages from the beacon.
@ -18,7 +18,7 @@ A sensor is not automatically set to listen for infrared messages on a channel.
Select channel **2** on an infrared beacon. Set the remote channel for infrared sensor ``infrared 3`` to channel ``2``. Wait for the ``center`` button press on the beacon using channel ``2``.
```blocks
sensors.infraredSensor3.setRemoteChannel(InfraredRemoteChannel.Ch2);
sensors.infrared3.setRemoteChannel(InfraredRemoteChannel.Ch2);
sensors.remoteButtonCenter.pauseUntil(ButtonEvent.Pressed);
brick.clearScreen();
brick.showString("Center button on", 1);

View File

@ -27,7 +27,7 @@ In order to recognize a button event signalled from a remote beacon, an infrared
If the beacon button ``top left`` was pressed, show a `green` status light. Otherwise, set the status light to `orange`.
```blocks
sensors.infraredSensor1.setRemoteChannel(InfraredRemoteChannel.Ch0)
sensors.infrared1.setRemoteChannel(InfraredRemoteChannel.Ch0)
forever(function () {
if (sensors.remoteButtonTopLeft.wasPressed()) {
brick.setStatusLight(StatusLight.Green)

View File

@ -1,9 +1,9 @@
# Infrared sensor
```cards
sensors.infraredSensor1.onEvent(null, function () {});
sensors.infraredSensor1.pauseUntil(null);
sensors.infraredSensor1.proximity();
sensors.infrared1.onEvent(null, function () {});
sensors.infrared1.pauseUntil(null);
sensors.infrared1.proximity();
```
## See Also

View File

@ -3,7 +3,7 @@
Run some code when an object is detected by the infrared sensor.
```sig
sensors.infraredSensor4.onEvent(InfraredSensorEvent.ObjectNear, function () {});
sensors.infrared4.onEvent(InfraredSensorEvent.ObjectNear, function () {});
```
How an object is detected depends on the light _thresholds_ set for the sensor. A threshold is a number for relative distance of the a return of reflected infrared light. The brighter the light, the nearer the object is. The value for what _near_ means is determined by this threshold. A certain minimum amount of light returned is also set to determine that an object is detected. The two thresholds you can set are:
@ -23,9 +23,9 @@ How an object is detected depends on the light _thresholds_ set for the sensor.
When the ultrasonic sensor on port 4 detects a near object, display its distance on the screen.
```blocks
sensors.infraredSensor4.onEvent(InfraredSensorEvent.ObjectNear, function () {
sensors.infrared4.onEvent(InfraredSensorEvent.ObjectNear, function () {
brick.showString("Object detected at:", 1)
brick.showNumber(sensors.infraredSensor4.proximity(), 2)
brick.showNumber(sensors.infrared4.proximity(), 2)
brick.showString("percent of range", 3)
})
```

View File

@ -3,7 +3,7 @@
Make your program wait until an some object is detected in proximity of the infrared sensor.
```sig
sensors.infraredSensor1.pauseUntil(InfraredSensorEvent.ObjectDetected);
sensors.infrared1.pauseUntil(InfraredSensorEvent.ObjectDetected);
```
How an object is detected depends on the light _thresholds_ set for the sensor. A threshold is a number for relative distance of the a return of reflected infrared light. The brighter the light, the nearer the object is. The value for what _near_ means is determined by this threshold. A certain minimum amount of light returned is also set to determine that an object is detected. The two thresholds you can set are:
@ -24,7 +24,7 @@ Wait for another object sending out infrared light. Show a message on the screen
```blocks
brick.showString("Waiting for another", 1);
brick.showString("robot to appear...", 2);
sensors.infraredSensor1.pauseUntil(InfraredSensorEvent.ObjectDetected);
sensors.infrared1.pauseUntil(InfraredSensorEvent.ObjectDetected);
brick.showString("Hey, I just saw", 1)
brick.showString("Something!", 2);
```

View File

@ -3,7 +3,7 @@
Get the proximity threshold for when objects are near and detected.
```sig
sensors.infraredSensor1.proximityThreshold(InfraredSensorEvent.ObjectNear)
sensors.infrared1.proximityThreshold(InfraredSensorEvent.ObjectNear)
```
Infrared sensors determine proximity of an object by measuring the intensity of the infrared light reflected from it. The proximity range of measurment is from `0` to `100`. Proximity _thresholds_ use a value in this range to decide when a proximity event should happen for a detected object.
@ -21,8 +21,8 @@ Infrared sensors determine proximity of an object by measuring the intensity of
When an object with near proximity is detected, show what the threshold is.
```blocks
sensors.infraredSensor1.onEvent(InfraredSensorEvent.ObjectNear, function () {
brick.showValue("NearObjectThreshold", sensors.infraredSensor1.proximityThreshold(InfraredSensorEvent.ObjectNear)
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectNear, function () {
brick.showValue("NearObjectThreshold", sensors.infrared1.proximityThreshold(InfraredSensorEvent.ObjectNear)
, 1)
})
```

View File

@ -3,7 +3,7 @@
Get the promixity of an object measured by the infrared sensor.
```sig
sensors.infraredSensor1.proximity();
sensors.infrared1.proximity();
```
The proximity value returned is a number between `0` and `100` which is a _relative_ measurment of distance to an object. A value of `0` means something is very close and `100` means something is far away. The proximity is determined by the amount of infrared light reflected back by an object. The proximity value for an object that has a lighter color and smooth surface will be less than an object at the same distance with a darker color and a rough surface.
@ -19,9 +19,9 @@ Proximity isn't an actual measurement units of distance, like in centimeters or
When the infrared sensor on port 4 detects a near object, display its proximity value on the screen.
```blocks
sensors.infraredSensor4.onEvent(InfraredSensorEvent.ObjectNear, function () {
sensors.infrared4.onEvent(InfraredSensorEvent.ObjectNear, function () {
brick.clearScreen()
brick.showValue("proximity", sensors.infraredSensor4.proximity(), 1)
brick.showValue("proximity", sensors.infrared4.proximity(), 1)
})
```

View File

@ -3,7 +3,7 @@
Set the proximity threshold for when objects are near or detected.
```sig
sensors.infraredSensor1.setPromixityThreshold(InfraredSensorEvent.ObjectNear, 0)
sensors.infrared1.setPromixityThreshold(InfraredSensorEvent.ObjectNear, 0)
```
Infrared sensors determine proximity of an object by measuring the intensity of the infrared light reflected from it. The proximity range of measurment is from `0` to `100`. You can decide what value in that range you want mean that something is near or that something was detected.
@ -20,8 +20,8 @@ If you want a proximity value of `32` to mean that a detected object is near, th
Set a threshold for detecting something moving within a proximity `30`. Wait for an object to show up. When it does, flash the status light and make noise as an alarm.
```blocks
sensors.infraredSensor1.setPromixityThreshold(InfraredSensorEvent.ObjectDetected, 30)
sensors.infraredSensor1.pauseUntil(InfraredSensorEvent.ObjectDetected)
sensors.infrared1.setPromixityThreshold(InfraredSensorEvent.ObjectDetected, 30)
sensors.infrared1.pauseUntil(InfraredSensorEvent.ObjectDetected)
brick.clearScreen()
brick.showString("Perimeter Breach!!!", 3)
brick.setStatusLight(StatusLight.RedFlash)

View File

@ -84,7 +84,7 @@ namespace sensors {
* @param button the remote button to query the request
*/
//% help=sensors/beacon/is-pressed
//% block="%button|is pressed"
//% block="**remote button** %button|is pressed"
//% blockId=remoteButtonIsPressed
//% parts="remote"
//% blockNamespace=sensors
@ -99,7 +99,7 @@ namespace sensors {
* @param button the remote button to query the request
*/
//% help=sensors/beacon/was-pressed
//% block="%button|was pressed"
//% block="**remote button** %button|was pressed"
//% blockId=remotebuttonWasPressed
//% parts="remote"
//% blockNamespace=sensors
@ -116,7 +116,7 @@ namespace sensors {
* @param body code to run when the event is raised
*/
//% help=sensors/beacon/on-event
//% blockId=remotebuttonEvent block="on %button|%event"
//% blockId=remotebuttonEvent block="on **remote button** %button|%event"
//% parts="remote"
//% blockNamespace=sensors
//% weight=99 blockGap=8
@ -130,7 +130,7 @@ namespace sensors {
* @param ev the event to wait for
*/
//% help=sensors/beacon/pause-until
//% blockId=remoteButtonPauseUntil block="pause until %button|%event"
//% blockId=remoteButtonPauseUntil block="pause until **remote button** %button|%event"
//% parts="remote"
//% blockNamespace=sensors
//% weight=99 blockGap=8
@ -185,12 +185,13 @@ namespace sensors {
* @param handler the code to run when detected
*/
//% help=sensors/infrared/on-event
//% block="on %sensor|%event"
//% block="on **infrared** %this|%event"
//% blockId=infraredOn
//% parts="infraredsensor"
//% blockNamespace=sensors
//% weight=100 blockGap=8
//% group="Infrared Sensor"
//% this.fieldEditor="ports"
onEvent(event: InfraredSensorEvent, handler: () => void) {
this._setMode(InfraredSensorMode.Proximity)
control.onEvent(this._id, event, handler);
@ -200,12 +201,13 @@ namespace sensors {
* Wait until the infrared sensor detects something
*/
//% help=sensors/infrared/pause-until
//% block="pause until %sensor| %event"
//% block="pause until **infrared** %this| %event"
//% blockId=infraredwait
//% parts="infraredsensor"
//% blockNamespace=sensors
//% weight=99 blockGap=8
//% group="Infrared Sensor"
//% this.fieldEditor="ports"
pauseUntil(event: InfraredSensorEvent) {
this._setMode(InfraredSensorMode.Proximity)
control.waitForEvent(this._id, event);
@ -216,12 +218,13 @@ namespace sensors {
* @param sensor the infrared sensor
*/
//% help=sensors/infrared/proximity
//% block="%sensor|proximity"
//% block="**infrared** %this|proximity"
//% blockId=infraredGetProximity
//% parts="infrared"
//% blockNamespace=sensors
//% weight=98 blockGap=8
//% group="Infrared Sensor"
//% weight=98 blockGap=8
//% group="Infrared Sensor"
//% this.fieldEditor="ports"
proximity(): number {
this._setMode(InfraredSensorMode.Proximity)
return this.getNumber(NumberFormat.UInt8LE, 0)
@ -232,9 +235,10 @@ namespace sensors {
* @param channel the channel to listen
*/
//% blockNamespace=sensors
//% blockId=irSetRemoteChannel block="set %sensor|remote channel to %channel"
//% weight=99
//% blockId=irSetRemoteChannel block="set **infrared** %this|remote channel to %channel"
//% weight=99
//% group="Remote Infrared Beacon"
//% this.fieldEditor="ports"
//% help=sensors/beacon/set-remote-channel
setRemoteChannel(channel: InfraredRemoteChannel) {
this.setMode(InfraredSensorMode.RemoteControl)
@ -247,9 +251,10 @@ namespace sensors {
* @param condition the dark or bright light condition
* @param value the value threshold
*/
//% blockId=irSetThreshold block="set %sensor|%condition|to %value"
//% blockId=irSetThreshold block="set **infrared** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=49
//% value.min=0 value.max=100
//% this.fieldEditor="ports"
setPromixityThreshold(condition: InfraredSensorEvent, value: number) {
if (condition == InfraredSensorEvent.ObjectNear)
this._proximityThreshold.setLowThreshold(value)
@ -261,9 +266,9 @@ namespace sensors {
* Get a threshold value
* @param condition the proximity condition
*/
//% blockId=irGetThreshold block="%sensor|%condition"
//% blockId=irGetThreshold block="**infrared** %this|%condition"
//% group="Threshold" blockGap=8 weight=49
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
proximityThreshold(condition: InfraredSensorEvent): number {
return this._proximityThreshold.threshold(<ThresholdState><number>LightCondition.Dark);
}
@ -275,45 +280,45 @@ namespace sensors {
}
}
//% fixedInstance whenUsed block="infrared 1" jres=icons.port1
export const infraredSensor1: InfraredSensor = new InfraredSensor(1)
//% fixedInstance whenUsed block="1" jres=icons.port1
export const infrared1: InfraredSensor = new InfraredSensor(1)
//% fixedInstance whenUsed block="infrared 2" jres=icons.port2
export const infraredSensor2: InfraredSensor = new InfraredSensor(2)
//% fixedInstance whenUsed block="2" jres=icons.port2
export const infrared2: InfraredSensor = new InfraredSensor(2)
//% fixedInstance whenUsed block="infrared 3" jres=icons.port3
export const infraredSensor3: InfraredSensor = new InfraredSensor(3)
//% fixedInstance whenUsed block="3" jres=icons.port3
export const infrared3: InfraredSensor = new InfraredSensor(3)
//% fixedInstance whenUsed block="infrared 4" jres=icons.port4
export const infraredSensor4: InfraredSensor = new InfraredSensor(4)
//% fixedInstance whenUsed block="4" jres=icons.port4
export const infrared4: InfraredSensor = new InfraredSensor(4)
/**
* Remote beacon (center) button.
*/
//% whenUsed block="remote button center" weight=95 fixedInstance
//% whenUsed block="center" weight=95 fixedInstance
export const remoteButtonCenter = __irButton(InfraredRemoteButton.CenterBeacon)
/**
* Remote top-left button.
*/
//% whenUsed block="remote button top left" weight=95 fixedInstance
//% whenUsed block="top left" weight=95 fixedInstance
export const remoteButtonTopLeft = __irButton(InfraredRemoteButton.TopLeft)
/**
* Remote top-right button.
*/
//% whenUsed block="remote button top right" weight=95 fixedInstance
//% whenUsed block="top right" weight=95 fixedInstance
export const remoteButtonTopRight = __irButton(InfraredRemoteButton.TopRight)
/**
* Remote bottom-left button.
*/
//% whenUsed block="remote button bottom left" weight=95 fixedInstance
//% whenUsed block="bottom left" weight=95 fixedInstance
export const remoteButtonBottomLeft = __irButton(InfraredRemoteButton.BottomLeft)
/**
* Remote bottom-right button.
*/
//% whenUsed block="remote button bottom right" weight=95 fixedInstance
//% whenUsed block="bottom right" weight=95 fixedInstance
export const remoteButtonBottomRight = __irButton(InfraredRemoteButton.BottomRight)
}

View File

@ -0,0 +1,15 @@
# Music
```cards
music.playSoundEffect(null)
music.playSoundEffectUntilDone(null)
music.stopAllSounds()
music.playTone(0, 0)
music.ringTone(Note.C)
music.rest(100)
music.changeTempoBy(20)
music.setTempo(120)
music.noteFrequency(Note.C)
music.beat()
music.setVolume(50)
```

View File

@ -0,0 +1,54 @@
# play Sound Effect Until Done
Play a sound from one of the built-in sound effect until it completes.
```sig
music.playSoundEffectUntilDone(null)
```
There are several sound effects you can play. Use the sounds list in the block to pick the sound you want to play. The sound plays and this part of your program waits until the sound finishes. Other parts of your program, like code in **forever** loops and **runInParallel** blocks will continue to run though.
Many of the built-in sound effects make sounds match to the actions that your @boardname@ is doing. For example, you can add the ``mechanical motor start`` sound your program to indicate that your motors are running.
## Parameters
* **sound**: a built-in sound effect from the list of available sounds.
## Example
Make a game where the buttons on the brick are used to guess a number from `1` to `4` that your program randomly chooses. On the correct guess, flash a ``green`` status light and play a cheering sound. The ``enter`` button resets the game to play again.
```blocks
let pick = 0
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
pick = 0
music.stopAllSounds()
brick.setStatusLight(StatusLight.Off)
})
brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
pick = 1
})
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
pick = 2
})
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
pick = 3
})
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
pick = 4
})
forever(function () {
if (pick > 0) {
if (Math.randomRange(0, 3) + 1 == pick) {
brick.setStatusLight(StatusLight.GreenFlash)
music.playSoundEffectUntilDone(sounds.expressionsCheering)
}
pick = 0
}
pause(300)
})
```
## See also
[play sound effect](/reference/music/play-sound-effect), [stop all sounds](/reference/music/stop-all-sounds)

View File

@ -0,0 +1,29 @@
# play Sound Effect
Play a sound from one of the built-in sound effects.
```sig
music.playSoundEffect(null)
```
There are several sound effects you can play. Use the sounds list in the block to pick the sound you want to play. When the sounds starts, your program continues on and doesn't wait for the sound to finish. This lets your program do other things while your sound plays in the _background_.
Many of the built-in sound effects make sounds match to the actions that your @boardname@ is doing. For example, you can add the ``mechanical motor start`` sound to your program to indicate that your motors are running.
## Parameters
* **sound**: a built-in sound effect from the list of available sounds.
## Example
Drive the brick backwards and play a backup alert sound.
```blocks
music.playSoundEffect(sounds.mechanicalBackingAlert);
motors.largeBC.tank(-50, -50, 15, MoveUnit.Rotations);
music.stopAllSounds();
```
## See also
[play sound effect until done](/reference/music/play-sound-effect-until-done), [stop all sounds](/reference/music/stop-all-sounds)

View File

@ -260,11 +260,12 @@ namespace music {
const soundsLimit = 1;
/**
* Plays a sound
* Play a sound and wait until it finishes
* @param sound the sound to play
*/
//% blockId=music_play_sound_effect_until_done block="play sound effect %sound|until done"
//% weight=98 blockGap=8
//% help=music/play-sound-effect-until-done
export function playSoundEffectUntilDone(sound: Sound) {
if (!sound || numSoundsPlaying >= soundsLimit) return;
numSoundsPlaying++;
@ -288,6 +289,7 @@ namespace music {
*/
//% blockId=music_play_sound_effect block="play sound effect %sound"
//% weight=99 blockGap=8
//% help=music/play-sound-effect
export function playSoundEffect(sound: Sound) {
if (!sound || numSoundsPlaying >= soundsLimit) return;
numSoundsPlaying++;

View File

@ -30,10 +30,10 @@ namespace sensors {
* @param body code to run when the event is raised
*/
//% help=sensors/touch-sensor/on-event
//% blockId=touchEvent block="on %sensor|%event"
//% blockId=touchEvent block="on **touch** %this|%event"
//% parts="touch"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=99 blockGap=12
//% group="Touch Sensor"
onEvent(ev: ButtonEvent, body: () => void) {
@ -46,10 +46,10 @@ namespace sensors {
* @param event the kind of button gesture that needs to be detected
*/
//% help=sensors/touch-sensor/pause-until
//% blockId=touchWaitUntil block="pause until %sensor|%event"
//% blockId=touchWaitUntil block="pause until **touch** %this|%event"
//% parts="touch"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=98 blockGap=12
//% group="Touch Sensor"
pauseUntil(ev: ButtonEvent) {
@ -61,11 +61,11 @@ namespace sensors {
* @param sensor the port to query the request
*/
//% help=sensors/touch-sensor/is-pressed
//% block="%sensor|is pressed"
//% block="**touch** %this|is pressed"
//% blockId=touchIsPressed
//% parts="touch"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=81 blockGap=8
//% group="Touch Sensor"
isPressed() {
@ -77,11 +77,11 @@ namespace sensors {
* @param sensor the port to query the request
*/
//% help=sensors/touch-sensor/was-pressed
//% block="%sensor|was pressed"
//% block="**touch** %this|was pressed"
//% blockId=touchWasPressed
//% parts="touch"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=81
//% group="Touch Sensor"
wasPressed() {
@ -89,12 +89,12 @@ namespace sensors {
}
}
//% whenUsed block="touch 1" weight=95 fixedInstance jres=icons.port1
//% whenUsed block="1" weight=95 fixedInstance jres=icons.port1
export const touch1: TouchSensor = new TouchSensor(1)
//% whenUsed block="touch 2" weight=95 fixedInstance jres=icons.port2
//% whenUsed block="2" weight=95 fixedInstance jres=icons.port2
export const touch2: TouchSensor = new TouchSensor(2)
//% whenUsed block="touch 3" weight=95 fixedInstance jres=icons.port3
//% whenUsed block="3" weight=95 fixedInstance jres=icons.port3
export const touch3: TouchSensor = new TouchSensor(3)
//% whenUsed block="touch 4" weight=95 fixedInstance jres=icons.port4
//% whenUsed block="4" weight=95 fixedInstance jres=icons.port4
export const touch4: TouchSensor = new TouchSensor(4)
}

View File

@ -43,10 +43,10 @@ namespace sensors {
*/
//% help=sensors/ultrasonic/on-event
//% blockId=ultrasonicOn
//% block="on %sensor|%event"
//% block="on **ultrasonic** %this|%event"
//% parts="ultrasonicsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=100 blockGap=8
//% group="Ultrasonic Sensor"
onEvent(event: UltrasonicSensorEvent, handler: () => void) {
@ -57,13 +57,13 @@ namespace sensors {
* Waits for the event to occur
*/
//% help=sensors/ultrasonic/pause-until
//% block="pause until %sensor| %event"
//% block="pause until **ultrasonic** %this| %event"
//% blockId=ultrasonicWait
//% parts="ultrasonicsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=99 blockGap=8
//% group="Ultrasonic Sensor"
//% group="Ultrasonic Sensor"
pauseUntil(event: UltrasonicSensorEvent) {
control.waitForEvent(this._id, event);
}
@ -73,13 +73,13 @@ namespace sensors {
* @param sensor the ultrasonic sensor port
*/
//% help=sensors/ultrasonic/distance
//% block="%sensor|distance"
//% block="**ultrasonic** %this|distance"
//% blockId=sonarGetDistance
//% parts="ultrasonicsensor"
//% blockNamespace=sensors
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
//% weight=65
//% group="Ultrasonic Sensor"
//% group="Ultrasonic Sensor"
distance(): number {
// it supposedly also has an inch mode, but we stick to cm
this._setMode(0)
@ -92,9 +92,10 @@ namespace sensors {
* @param condition the dark or bright light condition
* @param value the value threshold
*/
//% blockId=ultrasonicSetThreshold block="set %sensor|%condition|to %value"
//% blockId=ultrasonicSetThreshold block="set **ultrasonic** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=80
//% value.min=0 value.max=255
//% this.fieldEditor="ports"
setThreshold(condition: UltrasonicSensorEvent, value: number) {
switch (condition) {
case UltrasonicSensorEvent.ObjectNear: this.promixityThreshold.setLowThreshold(value); break;
@ -107,9 +108,9 @@ namespace sensors {
* Gets the threshold value
* @param condition the proximity condition
*/
//% blockId=ultrasonicGetThreshold block="%sensor|%condition"
//% blockId=ultrasonicGetThreshold block="**ultrasonic** %this|%condition"
//% group="Threshold" blockGap=8 weight=79
//% sensor.fieldEditor="ports"
//% this.fieldEditor="ports"
threshold(condition: UltrasonicSensorEvent): number {
switch (condition) {
case UltrasonicSensorEvent.ObjectNear: this.promixityThreshold.threshold(ThresholdState.Low); break;
@ -120,15 +121,15 @@ namespace sensors {
}
}
//% fixedInstance whenUsed block="ultrasonic 4" jres=icons.port4
//% fixedInstance whenUsed block="4" jres=icons.port4
export const ultrasonic4: UltraSonicSensor = new UltraSonicSensor(4)
//% fixedInstance whenUsed block="ultrasonic 1" jres=icons.port1
//% fixedInstance whenUsed block="1" jres=icons.port1
export const ultrasonic1: UltraSonicSensor = new UltraSonicSensor(1)
//% fixedInstance whenUsed block="ultrasonic 2" jres=icons.port2
//% fixedInstance whenUsed block="2" jres=icons.port2
export const ultrasonic2: UltraSonicSensor = new UltraSonicSensor(2)
//% fixedInstance whenUsed block="ultrasonic 3" jres=icons.port3
//% fixedInstance whenUsed block="3" jres=icons.port3
export const ultrasonic3: UltraSonicSensor = new UltraSonicSensor(3)
}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "pxt-ev3",
"version": "0.0.105",
"version": "0.0.107",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "pxt-ev3",
"version": "0.0.105",
"version": "0.0.107",
"description": "LEGO Mindstorms EV3 for Microsoft MakeCode",
"private": true,
"keywords": [
@ -46,7 +46,7 @@
},
"dependencies": {
"pxt-common-packages": "0.19.5",
"pxt-core": "3.4.7"
"pxt-core": "3.4.8"
},
"scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis"

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="svg41" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 23 23" style="enable-background:new 0 0 23 23;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<title>color</title>
<path class="st0" d="M22.2,20.2L17,15c1.1-1.5,1.8-3.3,1.8-5.3c0-5-4-9-9-9c-5,0-9,4-9,9c0,5,4,9,9,9c1.9,0,3.6-0.6,5.1-1.6l5.2,5.2
L22.2,20.2z M9.8,15.7c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S13.1,15.7,9.8,15.7z"/>
</svg>

After

Width:  |  Height:  |  Size: 637 B

View File

@ -26,7 +26,8 @@ webfontsGenerator({
"./icons/check.svg",
"./icons/download.svg",
"./icons/save.svg",
"./icons/blocks.svg"
"./icons/blocks.svg",
"./categories/search.svg"
],
dest: '../docs/static/fonts/icons/',
round: 10

View File

@ -142,6 +142,10 @@ span.blocklyTreeIcon.blocklyTreeIconadvancedexpanded::before {
content: "\f114";
}
span.blocklyTreeIcon.blocklyTreeIconsearch::before {
content: "\f11a";
}
.save-editortools-btn .icon.save:before {
font-family: 'legoIcons';
content: "\f118";