Compare commits

..

31 Commits

Author SHA1 Message Date
724ac19281 0.1.23 2018-04-13 15:24:28 -07:00
3e193e97bf bump pxt-core to 3.8.14, 2018-04-13 15:24:23 -07:00
23c1789976 Fix IE11 for in bug in motor field (#513)
* Fix IE11 for in bug in motor field

* minor fix
2018-04-13 15:21:41 -07:00
87b08bf6f3 0.1.22 2018-04-13 14:02:04 -07:00
3e534f7329 Update state of the landscape brick view as well to be consistent with the portrait view (main) (#508) 2018-04-13 14:01:37 -07:00
7f8499bb5f Always show the motor value regardless if it's 0. (#509) 2018-04-13 14:01:25 -07:00
4bcde58c0c 0.1.21 2018-04-13 12:37:36 -07:00
dd5df88dea Update test 2018-04-13 14:50:20 -04:00
f35ed0205b 0.1.20 2018-04-13 11:47:55 -07:00
7379c8dfe7 Friday 13th using .13 builfd 2018-04-13 11:37:51 -07:00
574de3a15e bumping pxt 2018-04-13 11:29:00 -07:00
a3c08ddb01 branding fixes 2018-04-13 09:05:34 -07:00
070cc42d36 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-04-12 15:05:19 -07:00
77aa7b86d8 fixing summary 2018-04-12 15:05:14 -07:00
f912ea6104 0.1.19 2018-04-12 15:01:43 -07:00
b06bc6bc6c bump pxt-core to 3.8.11, 2018-04-12 15:01:38 -07:00
af3189d8b5 removing mindstorms from tutorial names (#496)
* removing mindstorms from tutorial names

* lego feedback

* file name issues

* bring back bang
2018-04-12 14:41:22 -07:00
661157f112 0.1.18 2018-04-12 14:29:52 -07:00
141bc6bddb bump pxt-core to 3.8.10, 2018-04-12 14:29:44 -07:00
bd06fb80f3 Threshold to calibration (#495)
* renaming threshold to calibration

* rename threshold to calibration
2018-04-12 14:25:44 -07:00
2c874570ce Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-04-12 10:33:27 -07:00
08ee2b2017 fixing branding 2018-04-12 10:33:21 -07:00
499d97b07c Update targetconfig.json 2018-04-12 13:26:02 -04:00
32b7400e9e Optimizing Logos. 2018-04-12 00:36:11 -07:00
90717cfc33 Change drive label to EV3 (#494) 2018-04-11 17:20:07 -06:00
bd3b149dcc Tutorial theming (#493)
* Tutorial theming

* no border
2018-04-11 13:22:21 -06:00
fafd3d37da Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-04-11 09:33:01 -07:00
138425c0fb missed renaming 2018-04-11 09:32:54 -07:00
231cd41f7a rename intruder to security (#492) 2018-04-11 10:31:53 -06:00
eb7cd5d97c 0.1.17 2018-04-11 08:59:01 -07:00
a4a9af28a4 Switch to reflected light when calling threshold (#489)
* fix typo

* fixing threshold functions

* switch to reflected mode when calling threshold
2018-04-11 09:58:34 -06:00
54 changed files with 450 additions and 372 deletions

View File

@ -1,4 +1,4 @@
# LEGO Mindstorms EV3 target for PXT
# LEGO® MINDSTORMS® Education EV3 for Microsoft MakeCode
[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_rainbow/master/pxt-ev3_Push)](https://ci2.dot.net/job/Private/job/pxt_project_rainbow/job/master/job/pxt-ev3_Push/)

View File

@ -16,7 +16,7 @@
* [Wake Up!](/tutorials/wake-up)
* [Make An Animation](/tutorials/make-an-animation)
* [What Animal Am I?](/tutorials/what-animal-am-i)
* [Music Brick](/tutorials/mindstorms-music)
* [Music Brick](/tutorials/music-brick)
* [Run Motors](/tutorials/run-motors)
* [Touch to Run](/tutorials/touch-to-run)
* [Touch Sensor Values](/tutorials/touch-sensor-values)
@ -24,7 +24,7 @@
* [Line Following](/tutorials/line-following)
* [Red Light, Green Light](/tutorials/redlight-greenlight)
* [Object Near?](/tutorials/object-near)
* [Intruder Alert](/tutorials/intruder-alert)
* [Security Alert](/tutorials/security-alert)
* [Coding](/coding)
* [Autonomous Parking](/coding/autonomous-parking)

View File

@ -16,7 +16,7 @@ Design cars that can park themselves safely without driver intervention.
### Build
Build a LEGO MINDSTORMS vehicle that can park itself safely without driver intervention. Start by constructing this model:
Build a @boardname@ vehicle that can park itself safely without driver intervention. Start by constructing this model:
[![EV3- Robot Driving Base](/static/coding/autonomous-parking/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)

View File

@ -16,7 +16,7 @@ Think about:
### Build
Build a LEGO MINDSTORMS vehicle that can help prevent drivers from falling asleep and causing an accident. Start by constructing this model:
Build a @boardname@ vehicle that can help prevent drivers from falling asleep and causing an accident. Start by constructing this model:
[![EV3 robot with color sensor](/static/coding/line-detection/ev3-robot-color-sensor-down.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-color-sensor-down-driving-base-d30ed30610c3d6647d56e17bc64cf6e2.pdf)

View File

@ -16,7 +16,7 @@ Think about:
### Build
Build a LEGO MINDSTORMS vehicle that can avoid accidents between vehicles and objects in the road. Start by constructing this model:
Build a @boardname@ vehicle that can avoid accidents between vehicles and objects in the road. Start by constructing this model:
[![EV3 Robot Driving Base](/static/coding/object-detection/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)

View File

@ -21,11 +21,11 @@ Here are some fun programs for your @boardname@!
"imageUrl": "/static/maker/security-gadget.png"
},
{
"name": "Intruder Detector",
"description": "Raise the alarm when an intruder sneaks in",
"url":"/maker/intruder-detector",
"name": "Movement Detector",
"description": "Raise the alarm when an movement sneaks in",
"url":"/maker/movement-detector",
"cardType": "example",
"imageUrl": "/static/maker/intruder-detector.png"
"imageUrl": "/static/maker/movement-detector.png"
},
{
"name": "Puppet",

View File

@ -7,7 +7,7 @@
{
"name": "Try",
"imageUrl": "/static/lessons/try.png",
"description": "Get a quick introduction to programming with EV3.",
"description": "Get a quick introduction to programming.",
"url": "/getting-started/try",
"cardType": "side"
},

View File

@ -4,7 +4,7 @@ Get a quick introduction to programming with EV3.
![Display on EV3 Brick with Music Notes](/static/getting-started/01_EyesOn_Intro.png)
We are excited to help you get started with LEGO MINDSTORMS Education EV3. In this project we will guide you through connecting your EV3 brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
We are excited to help you get started with @boardname@. In this project we will guide you through connecting your EV3 brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
## Turn on your EV3 Brick

View File

@ -106,4 +106,4 @@ sensors.ultrasonic4.setThreshold(UltrasonicSensorEvent.ObjectDetected, 10)
**Congratulations!**
You are ready to move on to the next steps.
Try a LEGO MINDSTORMS [Design Engineering](/design-engineering), [Coding](/coding), or [Maker](/maker) activity.
Try a [Design Engineering](/design-engineering), [Coding](/coding), or [Maker](/maker) activity.

View File

@ -1,6 +1,6 @@
# Coding in MakeCode
This guide helps users who are used to the LabView LEGO Minstorms editor quickly get familiar with using blocks in MakeCode.
This guide helps users who are used to work with @boardname@ to get familiar with using blocks in MakeCode.
## Snap together the blocks

View File

@ -4,7 +4,7 @@
### Required Materials
* [LEGO MINDSTORMS Education EV3 Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* Lesson plan
* Student Worksheet for each activity
* Inspirational images for each activity
@ -16,7 +16,7 @@ Each lesson is designed to take 90 minutes. If you work in shorter class periods
### Preparation
It is important to establish student groups. Groups of two work well. Ensure that each student has a copy of the Student Worksheet for recording their design process, or alternatively, they can use their own preferred method for recording their design journey. They will also need the LEGO MINDSTORMS Education EV3 Core Set (one set for every two students is recommended).
It is important to establish student groups. Groups of two work well. Ensure that each student has a copy of the Student Worksheet for recording their design process, or alternatively, they can use their own preferred method for recording their design journey. They will also need the @boardname@ Core Set (one set for every two students is recommended).
### Prior Learning

View File

@ -10,7 +10,7 @@ Your robot will:
* Use at least one motor
* Use NO wheels for locomotion
![LEGO MINDSTORMS brick with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
![@boardname@ with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
## Construct @unplugged
@ -25,7 +25,7 @@ The legs in the Walker Bot are designed to show how to change the rotary motion
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
![LEGO MINDSTORMS Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
![@boardname@ Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
## Program 1 @fullscreen

View File

@ -10,7 +10,7 @@ Your robot will:
* Use at least one motor
* Use NO wheels for locomotion
![LEGO MINDSTORMS brick with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
![@boardname@ with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
## Construct
@ -24,7 +24,7 @@ The legs in the Walker Bot are designed to show how to change the rotary motion
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
![LEGO MINDSTORMS Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
![@boardname@ Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
## Program

View File

@ -1,6 +1,6 @@
# Maker Activites
These six activities require the [LEGO® MINDSTORMS® Education EV3 Core Set (45544)](https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-core-set-/5003400). Supporting materials for teachers and middle school students are provided, offering everything teachers and students need to explore their inner makers as they follow the design process to solve open-ended, themed challenges...
These six activities require the [@boardname@ Core Set (45544)](https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-core-set-/5003400). Supporting materials for teachers and middle school students are provided, offering everything teachers and students need to explore their inner makers as they follow the design process to solve open-ended, themed challenges...
* [Download Curriculum Materials](https://education.lego.com/en-us/downloads/mindstorms-ev3/curriculum)

View File

@ -1,4 +1,4 @@
# Intruder Detector
# Movement Detector
This program will activate an alarm when an object moves in front of the Ultrasonic Sensor.

View File

@ -20,7 +20,7 @@ Look at the photos and think about:
### Things Youll Need
* [LEGO MINDSTORMS Education EV3 Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
Additional materials to add to your Security Gadget:
@ -72,7 +72,7 @@ Some things to do while brainstorming:
It is time to start making!
* Use the components from the LEGO® MINDSTORMS EV3 Core Set and additional materials to make your chosen solution.
* Use the components from the @boardname@ Core Set and additional materials to make your chosen solution.
* Test and analyze your design as you go and record any improvements that you make.
### Review and Revise Your Solution

View File

@ -19,7 +19,7 @@ Look at the photos and think about:
### Things Youll Need
* [LEGO MINDSTORMS Education EV3 Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
Additional materials to add to your Sound Machine:
@ -71,7 +71,7 @@ Some things to do while brainstorming:
It is time to start making!
* Use the components from the LEGO® MINDSTORMS EV3 Core Set and additional materials to make your chosen solution.
* Use the components from the @boardname@ Core Set and additional materials to make your chosen solution.
* Test and analyze your design as you go and record any improvements that you make.
### Review and Revise Your Solution

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,74 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="141.73"
height="141.731"
viewBox="0 0 141.73 141.73101"
enable-background="new 0 0 265.365 141.732"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="lego-logo.svg"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1199"
inkscape:window-height="604"
id="namedview22"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.6520876"
inkscape:cx="101.03204"
inkscape:cy="98.819336"
inkscape:window-x="372"
inkscape:window-y="149"
inkscape:window-maximized="0"
inkscape:current-layer="g6" /><g
id="product_logo" /><g
id="guides" /><g
id="LEGO_LOGO_SMALL_RGB"><g
id="g6"><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z m 130.536,58.127 c -0.23,4.356 -1.617,9.786 -2.839,13.414 -4.917,14.609 -10.618,23.666 -23.821,23.666 -3.887,0 -10.783,-1.031 -13.324,-7.947 l -0.602,-1.641 -1.082,1.371 C 85.7,93.168 79.564,96.186 72.998,96.217 67.96,96.24 63.912,94.553 61.293,91.334 l -0.718,-0.883 -0.765,0.844 c -2.797,3.088 -7.668,4.859 -13.364,4.859 -4.473,0 -8.335,-1.521 -10.876,-4.277 l -0.692,-0.752 -0.72,0.727 c -2.825,2.852 -7.276,4.289 -12.873,4.158 -6.79,-0.162 -10.924,-3.951 -11.058,-10.141 -0.205,-9.543 9.031,-29.622 12.854,-35.727 2.482,-4.078 5.895,-6.055 10.438,-6.055 3.092,0 5.207,0.646 6.463,1.977 1.144,1.211 1.37,2.232 1.472,4.688 l 0.131,3.175 1.676,-2.7 c 4.054,-6.532 10.773,-7.434 17.43,-7.434 4.628,0 8.667,1.702 10.289,4.336 l 0.599,0.971 0.866,-0.737 c 3.431,-2.916 8.271,-4.521 13.629,-4.521 5.849,0 10.099,1.454 12.634,4.322 0.576,0.651 0.957,1.106 1.486,2.219 l 0.651,1.366 0.977,-1.155 c 3.712,-4.39 8.779,-6.615 15.067,-6.615 4.98,0 8.761,1.324 11.235,3.935 3.104,3.271 3.547,7.875 3.373,11.161 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#f6ec36" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z M 135.435,64.44 c -0.633,5.089 -4.072,14.518 -5.899,18.286 -4.903,10.102 -11.453,17.863 -24.074,17.863 -6.742,0 -12.288,-2.15 -15.531,-6.283 -4.749,4.162 -10.627,6.342 -16.956,6.342 -4.876,0 -9.185,-1.408 -12.471,-4.012 -3.626,2.555 -8.52,3.98 -13.943,3.98 -4.53,0 -8.606,-1.244 -11.796,-3.543 -3.529,2.342 -8.154,3.506 -13.583,3.377 C 12.149,100.237 5.912,94.507 5.733,86.188 5.497,75.137 14.803,54.911 19.189,47.907 c 3.282,-5.392 8.292,-8.293 14.431,-8.293 6.663,0 9.078,1.903 10.267,4.326 5.141,-4.366 11.956,-4.617 16.808,-4.617 5.356,0 8.717,1.422 11.575,3.697 3.948,-2.368 8.477,-3.599 13.871,-3.599 6.897,0 12.021,1.604 15.595,5.137 4.168,-3.469 9.388,-5.05 15.23,-5.05 7.725,0 12.808,2.786 15.793,6.94 4.203,5.859 3.451,11.757 2.676,17.992 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#d01012" /><path
d="m 0,0 0,141.731 141.73,0 L 141.73,0 0,0 Z m 139.781,1.952 0,137.832 -137.83,0 0,-137.832 137.83,0 z"
id="path14"
inkscape:connector-curvature="0" /><path
d="m 134.752,42.53 0,-0.965 0.655,0 c 0.479,0 0.728,0.168 0.728,0.479 0,0.247 -0.16,0.486 -0.647,0.486 l -0.736,0 z m 2.351,2.002 -0.408,-0.708 c -0.354,-0.619 -0.452,-0.717 -0.755,-0.823 l 0,-0.019 c 0.596,-0.07 0.95,-0.453 0.95,-0.983 0,-0.56 -0.354,-0.984 -1.109,-0.984 l -1.754,0 0,3.519 0.727,0 0,-1.441 0.133,0 c 0.311,0 0.435,0.035 0.576,0.176 0.142,0.144 0.354,0.443 0.479,0.69 l 0.284,0.575 0.877,-0.002 0,0 z m -1.731,-4.497 c 1.51,0 2.737,1.218 2.737,2.726 0,1.508 -1.229,2.731 -2.737,2.731 -1.506,0 -2.72,-1.225 -2.72,-2.731 0,-1.506 1.214,-2.726 2.72,-2.726 z m 0,-0.67 c -1.877,0 -3.392,1.516 -3.392,3.396 0,1.879 1.515,3.394 3.392,3.394 1.883,0 3.397,-1.515 3.397,-3.394 0.002,-1.882 -1.514,-3.396 -3.397,-3.396 z"
id="path16"
inkscape:connector-curvature="0" /><path
d="m 116.889,43.002 c -7.325,0 -12.386,2.904 -15.812,6.961 -0.579,-1.214 -1.019,-1.746 -1.638,-2.447 -2.805,-3.17 -7.313,-4.649 -13.364,-4.649 -5.912,0 -10.841,1.846 -14.263,4.754 -1.777,-2.89 -6.013,-4.803 -11.121,-4.803 -6.674,0 -13.946,0.944 -18.261,7.896 -0.104,-2.503 -0.33,-3.828 -1.737,-5.317 -1.71,-1.81 -4.477,-2.282 -7.173,-2.282 -4.912,0 -8.605,2.146 -11.266,6.515 -3.859,6.163 -13.212,26.441 -13.001,36.263 0.137,6.344 4.393,10.916 12.01,11.096 5.952,0.143 10.62,-1.449 13.59,-4.447 2.665,2.896 6.731,4.594 11.596,4.594 5.417,0 10.868,-1.627 14.088,-5.182 2.712,3.332 6.979,5.271 12.468,5.244 7.175,-0.035 13.477,-3.438 17.593,-8.652 2.259,6.148 7.985,8.59 14.241,8.59 13.709,0 19.729,-9.428 24.748,-24.332 1.13,-3.357 2.639,-8.963 2.889,-13.672 0.413,-7.839 -2.903,-16.13 -15.587,-16.13 z M 25.672,80.477 c 7.093,-1.232 8.876,1.332 8.653,3.707 -0.669,7.109 -7.191,8.699 -12.854,8.566 -4.107,-0.1 -7.8,-1.98 -7.903,-6.748 -0.18,-8.342 8.328,-27.641 12.333,-34.038 1.85,-3.037 4.104,-4.539 7.698,-4.539 3.406,0 4.25,1.749 4.2,3.844 -0.134,5.589 -9.164,22.574 -12.127,29.208 z M 48.77,73.925 c -0.469,1.27 -1.357,3.93 -2.076,6.75 2.328,-0.582 4.074,-0.986 7.065,-0.914 3.408,0.084 5.586,1.496 5.586,4.314 0,6.832 -7.551,8.838 -12.789,8.838 -5.751,0 -10.803,-3.275 -10.803,-9.564 0,-7.373 3.997,-18.553 7.748,-26.001 4.606,-9.146 9.312,-10.362 17.419,-10.362 3.562,0 7.667,1.524 7.667,4.888 0,4.662 -3.95,6.44 -7.866,6.665 -1.672,0.096 -4.246,0.188 -5.786,0.079 0,0 -1.303,1.985 -2.688,5.523 7.252,-1.021 10.327,0.625 9.103,4.82 -1.657,5.667 -6.567,6.04 -12.58,4.964 z M 84.438,56.293 c -1.961,0 -3.244,1.242 -4.198,2.583 -2.102,2.952 -6.656,14.781 -7.365,19.64 -0.486,3.328 0.951,4.006 2.522,4.006 2.52,0 5.345,-2.666 6.309,-7.064 0,0 -4.797,-0.117 -3.475,-4.371 1.285,-4.128 3.723,-5.022 7.764,-5.188 7.961,-0.325 7.175,5.553 6.538,8.688 -2.069,10.18 -9.314,18.355 -19.562,18.355 -7.016,0 -11.371,-3.881 -11.371,-11.035 0,-5.098 2.529,-13.101 4.534,-17.784 4.267,-9.968 8.742,-16.944 20.143,-16.944 6.84,0 12.235,2.458 11.444,8.866 -0.58,4.703 -2.934,7.465 -7.21,7.799 -1.196,0.093 -6.089,-0.031 -4.466,-4.66 0.565,-1.619 0.799,-2.891 -1.607,-2.891 z m 43.057,8.413 c -1.205,6.002 -3.916,13.101 -6.859,18.392 -4.801,8.633 -10.633,9.842 -15.723,9.781 -5.093,-0.061 -10.83,-1.941 -10.874,-9.795 -0.031,-5.639 2.401,-13.598 4.466,-18.815 3.599,-9.458 7.277,-17.17 18.904,-17.031 13.559,0.161 11.141,12.219 10.086,17.468 z M 115.993,56.49 c -1.164,-0.016 -2.18,0.212 -3.093,1.62 -2.051,2.657 -8.047,19.042 -7.941,22.31 0.038,1.174 0.687,2.201 2.133,2.201 1.659,0.002 2.581,-1.145 3.396,-2.529 1.887,-3.193 7.193,-17.676 7.339,-21.297 0.043,-1.055 -0.133,-2.284 -1.834,-2.305 z"
id="path18"
inkscape:connector-curvature="0" /></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="141.7" height="141.7"><path d="M1 1v139.8h139.8V.9H1z" fill="#fff"/><path d="M1 1v139.8h139.8V.9H1zm130.5 58a56 56 0 0 1-2.8 13.5c-5 14.6-10.7 23.7-23.9 23.7-3.8 0-10.7-1-13.3-8l-.6-1.6-1 1.3A21.5 21.5 0 0 1 73 96.2c-5 0-9-1.6-11.7-4.9l-.7-.8-.8.8c-2.8 3-7.7 4.9-13.4 4.9-4.4 0-8.3-1.6-10.8-4.3l-.7-.8-.7.8c-2.9 2.8-7.3 4.2-13 4.1-6.7-.2-10.8-4-11-10.1-.2-9.6 9-29.7 12.9-35.8 2.5-4 5.9-6 10.4-6 3.1 0 5.2.6 6.5 2 1.1 1.2 1.4 2.2 1.5 4.7v3.1l1.8-2.7c4-6.5 10.7-7.4 17.4-7.4 4.6 0 8.7 1.7 10.3 4.3l.6 1 .8-.7a21 21 0 0 1 13.7-4.6c5.8 0 10 1.5 12.6 4.4a8 8 0 0 1 1.5 2.2l.6 1.3 1-1.1c3.7-4.4 8.8-6.6 15-6.6 5 0 8.9 1.3 11.3 4 3.1 3.2 3.6 7.8 3.4 11z" fill="#f6ec36"/><path d="M1 1v139.8h139.8V.9H1zm134.4 63.4a80 80 0 0 1-5.9 18.3c-4.9 10.1-11.4 17.9-24 17.9-6.8 0-12.3-2.2-15.6-6.3a25.4 25.4 0 0 1-17 6.3c-4.8 0-9.1-1.4-12.4-4a24.2 24.2 0 0 1-25.7.5 23.3 23.3 0 0 1-13.6 3.3c-9-.2-15.3-5.9-15.5-14.2-.2-11 9.1-31.3 13.5-38.3 3.3-5.4 8.3-8.3 14.4-8.3 6.7 0 9.1 2 10.3 4.3 5.1-4.3 12-4.6 16.8-4.6 5.4 0 8.7 1.4 11.6 3.7 4-2.3 8.4-3.6 13.8-3.6 7 0 12 1.6 15.6 5.2 4.2-3.5 9.4-5 15.3-5 7.7 0 12.8 2.7 15.8 6.8 4.2 6 3.4 11.8 2.6 18z" fill="#d01012"/><path d="M0 0v141.7h141.7V0H0zm139.8 2v137.8H2V2h137.8z"/><path d="M134.8 42.5v-1h.6c.5 0 .7.2.7.5s-.1.5-.6.5h-.7zm2.3 2l-.4-.7c-.4-.6-.5-.7-.8-.8.6 0 1-.5 1-1 0-.6-.4-1-1.1-1H134v3.5h.8v-1.4c.4 0 .5 0 .7.2l.4.7.3.5h.9zm-1.7-4.5a2.7 2.7 0 1 1 0 5.5 2.7 2.7 0 0 1 0-5.5zm0-.6a3.4 3.4 0 1 0 0 6.8 3.4 3.4 0 1 0 0-6.8zM116.9 43c-7.3 0-12.4 3-15.8 7a9 9 0 0 0-1.7-2.5c-2.8-3.2-7.3-4.6-13.3-4.6-6 0-10.9 1.8-14.3 4.7-1.8-2.9-6-4.8-11.1-4.8-6.7 0-14 1-18.3 8 0-2.6-.3-4-1.7-5.4-1.7-1.8-4.5-2.3-7.2-2.3-4.9 0-8.6 2.2-11.2 6.5-4 6.2-13.3 26.5-13 36.3 0 6.3 4.3 11 12 11 6 .2 10.6-1.4 13.6-4.4 2.6 3 6.7 4.6 11.5 4.6 5.5 0 11-1.6 14.1-5.1 2.7 3.3 7 5.2 12.5 5.2 7.2 0 13.5-3.4 17.6-8.7 2.3 6.2 8 8.6 14.2 8.6 13.7 0 19.8-9.4 24.8-24.3a57 57 0 0 0 2.9-13.7c.4-7.8-3-16.1-15.6-16.1zM25.7 80.5c7-1.3 8.8 1.3 8.6 3.7-.6 7-7.2 8.7-12.8 8.5-4.1 0-7.8-2-8-6.7-.1-8.3 8.4-27.6 12.4-34 1.9-3 4.1-4.6 7.7-4.6 3.4 0 4.2 1.8 4.2 3.9-.1 5.6-9.2 22.5-12.1 29.2zm23-6.6c-.4 1.3-1.3 4-2 6.8 2.3-.6 4-1 7-1 3.5.1 5.6 1.6 5.6 4.4 0 6.8-7.5 8.8-12.7 8.8-5.8 0-10.8-3.3-10.8-9.6 0-7.3 4-18.5 7.7-26C48.1 48.2 52.8 47 60.9 47c3.6 0 7.7 1.5 7.7 4.9 0 4.6-4 6.4-7.9 6.6a55 55 0 0 1-5.8.1s-1.3 2-2.7 5.5c7.3-1 10.4.7 9.1 4.9-1.6 5.6-6.5 6-12.5 5zm35.7-17.6c-2 0-3.2 1.2-4.2 2.6-2 3-6.6 14.8-7.3 19.6-.5 3.3 1 4 2.5 4 2.5 0 5.3-2.6 6.3-7 0 0-4.8-.2-3.5-4.4 1.3-4.1 3.8-5 7.8-5.2 8-.3 7.2 5.6 6.5 8.7-2 10.2-9.3 18.3-19.5 18.3-7 0-11.4-3.8-11.4-11 0-5 2.5-13 4.5-17.8 4.3-10 8.8-17 20.2-17 6.8 0 12.2 2.5 11.4 9-.6 4.6-3 7.4-7.2 7.7-1.2.1-6 0-4.5-4.6.6-1.6.8-3-1.6-3zm43 8.4c-1.1 6-3.8 13.1-6.8 18.4-4.8 8.6-10.6 9.8-15.7 9.8-5 0-10.8-2-10.9-9.8 0-5.7 2.4-13.6 4.5-18.8 3.6-9.5 7.3-17.2 19-17 13.5.1 11 12.2 10 17.4zM116 56.5c-1.2 0-2.2.2-3.1 1.6-2 2.7-8 19-8 22.3.1 1.2.7 2.2 2.2 2.2 1.7 0 2.6-1.1 3.4-2.5a95 95 0 0 0 7.3-21.3c0-1-.1-2.3-1.8-2.3z"/></svg>

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -2,13 +2,13 @@
If your're having trouble getting your code onto the @boardname@, try these steps to see if you can fix the problem.
## Can I see the LEGO drive on my computer?
## Can I see the **@drivename@** drive on my computer?
When your @boardname@ is connected to your computer, you should see a new drive called **@drivename@** attached.
On Windows, it looks like this in Explorer:
![LEGO Drive in Windwos Explorer](/static/setup/ev3-drive-windows.png)
![@drivename@ Drive in Windows Explorer](/static/setup/ev3-drive-windows.png)
If you don't see the **@drivename@** drive, make sure your brick is powered on and check that your USB connection is good.
@ -25,9 +25,9 @@ Make sure that one end of your USB cable is firmly inserted into the port on the
If you think your USB connection is good and you still can't see your **@drivename@** drive, try giving the brick a reset. You can follow these steps to reset:
1. Using a finger from one hand, press the **Back** button. Keep holding it.
2. With your other hand, use two fingers to hold down both the **Left** button and the **Enter** button. You hold these at the same time while your still pressing the **Back** button.
2. With your other hand, use two fingers to hold down both the **Left** button and the **Enter** button. You hold these at the same time while you're still pressing the **Back** button.
3. Now, release your finger from the **Back** button.
4. When the brick says "Starting..." you can let go of the **Left** and **Enter** buttons.
4. When the brick says "Starting.." you can let go of the **Left** and **Enter** buttons.
You can also watch this [How to Reset](https://www.lego.com/en-us/videos/themes/mindstorms/how-to-reset-the-ev3-p-brick-fbcbdbed398e4e12a7ce30fa662c54be) video to see how to do a reset.

View File

@ -27,8 +27,8 @@ Step by step guides to coding your @boardname@.
"name": "Music Brick",
"description": "Transform the brick into a musical instrument!",
"cardType": "tutorial",
"url":"/tutorials/mindstorms-music",
"imageUrl":"/static/tutorials/mindstorms-music.png"
"url":"/tutorials/music-brick",
"imageUrl":"/static/tutorials/music-brick.png"
}]
```
@ -102,11 +102,25 @@ Step by step guides to coding your @boardname@.
```codecard
[{
"name": "Intruder Alert",
"description": "Build an intruder alert using the infrared sensor.",
"name": "Security Alert",
"description": "Build an security alert using the infrared sensor.",
"cardType": "tutorial",
"url":"/tutorials/intruder-alert",
"imageUrl":"/static/tutorials/intruder-alert.png"
"url":"/tutorials/security-alert",
"imageUrl":"/static/tutorials/security-alert.png"
}]
```
## See Also
[Wake Up!](/tutorials/wake-up),
[Make An Animation](/tutorials/make-an-animation),
[What Animal Am I?](/tutorials/what-animal-am-i),
[Music Brick](/tutorials/music-brick),
[Run Motors](/tutorials/run-motors),
[Touch to Run](/tutorials/touch-to-run),
[Touch Sensor Values](/tutorials/touch-sensor-values),
[What Color?](/tutorials/what-color),
[Line Following](/tutorials/line-following),
[Red Light, Green Light](/tutorials/redlight-greenlight),
[Object Near?](/tutorials/object-near),
[Security Alert](/tutorials/security-alert)

View File

@ -4,7 +4,7 @@
Transform your @boardname@ into a musical instrument!
![Press my buttons message](/static/tutorials/mindstorms-music/press-my-buttons.png)
![Press my buttons message](/static/tutorials/music-brick/press-my-buttons.png)
## Step 1
@ -53,7 +53,7 @@ brick.showString("Press my buttons to make music!", 1)
In the ``||music:play tone||`` blocks, use the drop-down menu to select a note to play for each block. You can also set the duration to play each note for.
![Tone selector keyboard](/static/tutorials/mindstorms-music/play-tone-dropdown.png)
![Tone selector keyboard](/static/tutorials/music-brick/play-tone-dropdown.png)
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {

View File

@ -1,16 +1,16 @@
# Intruder Alert
# Security Alert
## Introduction @fullscreen
The Infrared Sensor uses infrared light waves to detect proximity to the robot. Build an intruder alert using the infrared sensor.
The Infrared Sensor uses infrared light waves to detect proximity to the robot. Build an security alert using the infrared sensor.
![Brick in simulator with infrared sensor](/static/tutorials/intruder-alert/intruder-alert.gif)
![Brick in simulator with infrared sensor](/static/tutorials/security-alert/security-alert.gif)
## Step 1
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out an ``||sensors:on infrared||`` block onto the Workspace (you can place this anywhere). Use the second drop-down menu to select ``detected``.
![Sensor detect method dropdown selections](/static/tutorials/intruder-alert/detect-method-dropdown.png)
![Sensor detect method dropdown selections](/static/tutorials/security-alert/detect-method-dropdown.png)
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
@ -32,7 +32,7 @@ sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
In the ``||brick:show image||`` block, use the drop-down menu to select the **STOP** sign image.
![Screen image selections](/static/tutorials/intruder-alert/show-image-dropdown.png)
![Screen image selections](/static/tutorials/security-alert/show-image-dropdown.png)
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
@ -55,7 +55,7 @@ sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
In the ``||brick:set status light||`` block, use the drop-down menu to select the ``red flash`` light
![Status light selection dropdown list](/static/tutorials/intruder-alert/set-status-light-dropdown.png)
![Status light selection dropdown list](/static/tutorials/security-alert/set-status-light-dropdown.png)
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
@ -96,7 +96,7 @@ sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
In the ``||music:play sound effect until done||`` block, use the drop-down menu to select ``information error alarm`` sound effect.
![Sound effect dropdown selections](/static/tutorials/intruder-alert/play-sound-effect-dropdown.png)
![Sound effect dropdown selections](/static/tutorials/security-alert/play-sound-effect-dropdown.png)
## Step 9

View File

@ -406,7 +406,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
let opts = {};
let conts = {};
let vals = {};
for (let opt in options) {
for (let opt = 0; opt < options.length; opt++) {
let text = options[opt][0].alt ? options[opt][0].alt : options[opt][0];
if (text.indexOf(' ') == -1) {
// Patch dual motors as they don't have prefixes.

View File

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg10"
width="236.9"
height="56.7"
version="1.1"
sodipodi:docname="lego-logo-white.svg"
inkscape:export-filename="C:\gh\pxt-ev3\docs\static\lego_education_logo_white.png"
inkscape:export-xdpi="138.33701"
inkscape:export-ydpi="138.33701"
inkscape:version="0.92.1 r15371">
<metadata
id="metadata54">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="837"
id="namedview52"
showgrid="false"
inkscape:zoom="4.8374843"
inkscape:cx="118.45"
inkscape:cy="28.35"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10" />
<defs
id="defs14">
<clipPath
id="clipPath26">
<path
d="M332 275.6h177.7v42.5H332z"
id="path24" />
</clipPath>
<clipPath
id="clipPath76">
<path
d="M332 275.6h177.7v42.5H332z"
id="path74" />
</clipPath>
</defs>
<g
id="g18"
transform="matrix(1.33333 0 0 -1.33333 0 56.7)"
inkscape:export-xdpi="138.33701"
inkscape:export-ydpi="138.33701">
<g
id="g130"
transform="translate(-332 -275.6)">
<g
id="g20">
<g
clip-path="url(#clipPath26)"
id="g22">
<g
transform="translate(387.6 297.7)"
id="g28">
<path
id="path30"
d="M0 0h6.3c0 1.4-.2 2.2-.5 2.6-.4.3-1.3.5-2.7.5C1.7 3 .8 2.9.5 2.5.2 2 0 1.3 0 0m6.3-4.1h3.4c0-2-.6-3.3-1.8-4-.8-.4-2.4-.6-4.8-.6-2.6 0-4.4.5-5.3 1.6-.8 1-1.2 2.8-1.2 5.5S-3 3-2.2 4C-1.4 5.1.4 5.7 3 5.7 6 5.7 7.8 5 8.6 4c.7-1 1.1-3 1.1-6.2H0c0-1.7.1-2.7.4-3.2.4-.6 1.3-.8 2.7-.8 1.2 0 2 0 2.3.2.6.3 1 .9 1 1.8"
fill="#fff" />
</g>
<g
transform="translate(406.4 300.7)"
id="g32">
<path
id="path34"
d="M0 0c-1.4 0-2.2-.4-2.6-1.1a7 7 0 0 1-.5-3c0-2 .2-3.3.4-3.8.4-.9 1.3-1.3 2.7-1.3 1.6 0 2.6.4 3 1.2.3.6.4 1.8.4 3.8a7 7 0 0 1-.5 3.1C2.4-.4 1.5 0 0 0m3.4-11.7v2.2C2.7-11 1.2-11.8-1-11.8c-2.4 0-4 .7-4.7 2.2-.5 1-.7 2.7-.7 5.4 0 2.3.3 4 .9 5C-4.8 2-3.3 2.5-1 2.5s3.7-.7 4.2-2h.2v7.9h3.3v-20.2z"
fill="#fff" />
</g>
<g
transform="translate(428.8 289)"
id="g36">
<path
id="path38"
d="M0 0h-3.3v2.2C-4 .6-5.6-.1-7.9-.1c-3.2 0-4.8 1.3-4.8 4v10.2h3.4V5.2c0-1 .1-1.8.4-2.1.3-.4 1-.7 2-.7 1.2 0 2.1.3 2.6.9.5.5.8 1.4.8 2.7v8H0z"
fill="#fff" />
</g>
<g
transform="translate(441 294.4)"
id="g40">
<path
id="path42"
d="M0 0h3.4c0-2.3-.5-3.8-1.6-4.6-.8-.6-2.4-1-4.8-1-2.7 0-4.4.6-5.2 1.7-.8 1-1.1 2.8-1.1 5.6 0 2.7.3 4.5 1 5.4C-7.3 8.3-5.6 9-3 9c2.3 0 3.9-.3 4.8-1 1-.6 1.6-2 1.6-4.1H0c0 1-.2 1.8-.7 2-.4.4-1.2.5-2.3.5-1.4 0-2.3-.3-2.6-1-.2-.5-.4-1.7-.4-3.6 0-2 .1-3.2.4-3.6.3-.7 1.2-1 2.6-1 1.3 0 2 .1 2.4.5.4.3.6 1.1.6 2.4"
fill="#fff" />
</g>
<g
transform="translate(452.8 295.4)"
id="g44">
<path
id="path46"
d="M0 0c-1.1 0-1.8 0-2.2-.2-.6-.3-1-1-1-1.8 0-1 .3-1.6.8-1.8.4-.3 1.2-.4 2.4-.4 1.1 0 1.8.1 2.2.3.6.3 1 1 1 1.9 0 .9-.4 1.4-1 1.7A6 6 0 0 1 0 0m3.1-6.3l.1 1.7c-.3-.8-1-1.3-1.9-1.6-.5-.2-1.4-.3-2.5-.3-1.8 0-3.1.3-4 .9C-6-5-6.4-3.8-6.4-2-6.5-.3-6 .8-5 1.5c.7.5 2 .8 3.8.8 1.1 0 2 0 2.5-.2C2 1.8 2.7 1.4 3 .7h.1v1.8c0 1.2-.1 2-.4 2.4-.4.5-1.3.7-2.6.7-.9 0-1.5 0-1.9-.3-.5-.3-.7-.8-.7-1.7H-6c0 1.9.6 3.1 1.8 3.7.8.4 2.2.6 4.2.6 2.4 0 4-.3 4.9-1 1-.7 1.5-2.2 1.5-4.4v-8.8z"
fill="#fff" />
</g>
<g
transform="translate(460.9 300.6)"
id="g48">
<path
id="path50"
d="M0 0v2.6h1.8v3.2H5V2.6h5.5V0H5v-7.2c0-.7 0-1.2.2-1.4.2-.3.6-.5 1.3-.5.8 0 1.3.3 1.5 1l.2 2h3c0-2-.3-3.4-.8-4.2-.7-.9-2-1.4-3.9-1.4-1.8 0-3 .3-3.7.9-.8.6-1.1 1.8-1.1 3.6V0z"
fill="#fff" />
</g>
<path
id="path52"
d="M478.2 289h-3.4v14.2h3.4zm0 17.3h-3.4v3h3.4z"
fill="#fff" />
<g
transform="translate(487.5 300.7)"
id="g54">
<path
id="path56"
d="M0 0c-1.4 0-2.4-.3-2.8-1-.3-.4-.5-1.7-.5-3.6 0-2 .2-3.2.5-3.7.4-.6 1.3-1 2.8-1 1.5 0 2.4.4 2.8 1 .3.5.5 1.7.5 3.7S3-1.4 2.8-1C2.4-.3 1.5 0 0 0m0 2.6C2.8 2.6 4.7 2 5.5 1c.8-.9 1.1-2.7 1.1-5.6 0-2.9-.3-4.8-1-5.6-1-1-2.8-1.6-5.6-1.6s-4.7.5-5.5 1.6c-.8.8-1.1 2.7-1.1 5.6 0 2.9.3 4.7 1 5.6 1 1 2.8 1.6 5.6 1.6"
fill="#fff" />
</g>
<g
transform="translate(497 303.2)"
id="g58">
<path
id="path60"
d="M0 0h3.4v-2.1A3 3 0 0 0 5.3-.2C6 0 6.7 0 8 0c1.8 0 3-.3 3.8-1 .7-.9 1-2.1 1-4v-9H9.4v9c0 1-.2 1.7-.6 2-.3.5-1 .7-2 .7-1.4 0-2.4-.4-2.8-1-.4-.6-.6-1.5-.6-3V-14H0z"
fill="#fff" />
</g>
<path
id="path62"
d="M384.5 316.4h125.2v1.7H384.5z"
fill="#006cb6" />
<path
id="path64"
d="M384.5 275.6H471v1.7h-86.5z"
fill="#006cb6" />
<path
id="path66"
d="M482.3 275.6h27.4v1.7h-27.4z"
fill="#006cb6" />
</g>
</g>
<path
id="path68"
d="M332.3 275.9h42v42h-42z"
fill="#fff" />
<g
id="g70">
<g
clip-path="url(#clipPath76)"
id="g72">
<g
transform="translate(371.5 300.4)"
id="g78">
<path
id="path80"
d="M0 0c0-1.3-.5-3-.9-4C-2.3-8.4-4-11.1-8-11.1c-1.2 0-3.2.3-4 2.4l-.2.5-.3-.5a6.5 6.5 0 0 0-5-2.4c-1.6 0-2.8.5-3.6 1.4l-.2.3-.2-.3c-.8-.9-2.3-1.4-4-1.4-1.4 0-2.5.4-3.3 1.3l-.2.2-.2-.2c-.8-.9-2.2-1.3-3.9-1.3-2 0-3.2 1.2-3.3 3 0 3 2.7 9 3.9 10.8a3.4 3.4 0 0 0 3.1 1.8c1 0 1.6-.2 2-.6.3-.4.4-.7.4-1.4v-1l.5.9c1.2 2 3.3 2.2 5.3 2.2 1.3 0 2.6-.5 3-1.3l.2-.3.3.2a6 6 0 0 0 4 1.4c1.8 0 3.1-.5 3.9-1.3l.4-.7.2-.4.3.3c1.1 1.4 2.6 2 4.5 2 1.5 0 2.6-.4 3.4-1.2C0 2.3 0 1 0 0m-39.2-24.5h42v42h-42z"
fill="#ffed00" />
</g>
<g
transform="translate(372.7 298.8)"
id="g82">
<path
id="path84"
d="M0 0a24 24 0 0 0-1.8-5.5c-1.4-3-3.4-5.3-7.2-5.3-2 0-3.7.6-4.7 1.8a7.6 7.6 0 0 0-5-1.9 6 6 0 0 0-3.8 1.2 7.3 7.3 0 0 0-7.7 0 7 7 0 0 0-4-1.1C-37-10.8-39-9-39-6.5c0 3.3 2.7 9.4 4 11.5a5 5 0 0 0 4.4 2.4c2 0 2.7-.5 3-1.3 1.6 1.4 3.6 1.4 5 1.4 1.7 0 2.7-.4 3.5-1 1.2.6 2.6 1 4.2 1 2 0 3.6-.5 4.7-1.5a7 7 0 0 0 4.6 1.5c2.3 0 3.8-.9 4.7-2.1C.5 3.6.2 1.9 0 0m-40.3-22.9h42v42h-42z"
fill="#e20614" />
</g>
<path
id="path86"
d="M374 276.2h-41.4v41.3H374zm-42-.6h42.6v42.5H332z"
fill="#1c1c1b" />
<g
transform="translate(372.7 306.3)"
id="g88">
<path
id="path90"
d="M0 0a1 1 0 0 1-1-1c0-.6.4-1 1-1s1 .4 1 1C1-.5.6 0 0 0m0-.2a.8.8 0 1 0 0-1.6.8.8 0 0 0 0 1.6m.5-1.4l-.1.3-.2.2.3.3c0 .2-.2.3-.4.3h-.5v-1h.2v.4H0l.2-.3v-.2zm-.7.7v.2H0l.2-.1L0-.9z"
fill="#1c1c1b" />
</g>
<g
transform="translate(367.4 300.5)"
id="g92">
<path
id="path94"
d="M0 0c0-1-1.6-5.4-2.2-6.4-.2-.4-.5-.7-1-.7s-.6.3-.7.6c0 1 1.8 6 2.4 6.7.3.4.6.5 1 .5C0 .7 0 .3 0 0m2.9-1.8c-.4-1.8-1.2-3.9-2-5.5-1.5-2.6-3.2-3-4.8-3-1.5 0-3.2.7-3.2 3 0 1.7.7 4 1.3 5.7 1 2.8 2.2 5.1 5.7 5 4 0 3.3-3.6 3-5.2m-13 2.5c-.5 0-.9-.3-1.2-.7-.6-1-2-4.5-2.2-6-.1-1 .3-1.1.8-1.1.7 0 1.6.8 1.9 2.1 0 0-1.5 0-1 1.3.3 1.3 1 1.5 2.2 1.6 2.4 0 2.2-1.7 2-2.6-.6-3-2.8-5.5-5.9-5.5-2 0-3.4 1.1-3.4 3.3 0 1.5.8 3.9 1.4 5.3 1.3 3 2.6 5 6 5 2 0 3.7-.7 3.5-2.6-.2-1.4-1-2.2-2.2-2.3-.4 0-1.8 0-1.3 1.4.1.5.2.8-.5.8m-10.7-5.2l-.6-2a7 7 0 0 0 2 .2c1.1 0 1.8-.4 1.8-1.3 0-2-2.3-2.6-3.9-2.6-1.7 0-3.2 1-3.2 2.8A21 21 0 0 0-22.3.4c1.4 2.8 2.8 3.1 5.2 3.1 1.1 0 2.3-.4 2.3-1.4 0-1.4-1.2-2-2.3-2H-19s-.4-.6-.8-1.7c2.2.3 3.1-.2 2.8-1.5-.5-1.7-2-1.8-3.8-1.4m-7-2c2.2.4 2.7-.4 2.6-1.1-.2-2.2-2.1-2.6-3.8-2.6-1.2 0-2.3.6-2.4 2 0 2.5 2.5 8.3 3.7 10.2.6 1 1.3 1.4 2.3 1.4 1 0 1.3-.5 1.3-1.1 0-1.7-2.8-6.8-3.6-8.8M-.3 4.7a6 6 0 0 1-4.7-2l-.5.7c-.9 1-2.2 1.4-4 1.4-1.8 0-3.3-.6-4.3-1.4-.5.8-1.8 1.4-3.3 1.4-2 0-4.2-.3-5.5-2.4 0 .8-.1 1.2-.5 1.6-.6.6-1.4.7-2.2.7-1.5 0-2.6-.6-3.4-2-1.1-1.8-4-7.9-3.9-10.8 0-2 1.3-3.3 3.6-3.4 1.8 0 3.2.5 4.1 1.4.8-.9 2-1.4 3.5-1.4 1.6 0 3.2.5 4.2 1.6.8-1 2.1-1.6 3.8-1.6 2.1 0 4 1 5.2 2.6.7-1.9 2.4-2.6 4.3-2.6 4.1 0 6 2.8 7.4 7.3.4 1 .8 2.7.9 4.1.1 2.4-.9 4.8-4.7 4.8"
fill="#1c1c1b" />
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="141.73"
height="141.731"
viewBox="0 0 141.73 141.73101"
enable-background="new 0 0 265.365 141.732"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="lego-logo.svg"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1199"
inkscape:window-height="604"
id="namedview22"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.6520876"
inkscape:cx="101.03204"
inkscape:cy="98.819336"
inkscape:window-x="372"
inkscape:window-y="149"
inkscape:window-maximized="0"
inkscape:current-layer="g6" /><g
id="product_logo" /><g
id="guides" /><g
id="LEGO_LOGO_SMALL_RGB"><g
id="g6"><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z m 130.536,58.127 c -0.23,4.356 -1.617,9.786 -2.839,13.414 -4.917,14.609 -10.618,23.666 -23.821,23.666 -3.887,0 -10.783,-1.031 -13.324,-7.947 l -0.602,-1.641 -1.082,1.371 C 85.7,93.168 79.564,96.186 72.998,96.217 67.96,96.24 63.912,94.553 61.293,91.334 l -0.718,-0.883 -0.765,0.844 c -2.797,3.088 -7.668,4.859 -13.364,4.859 -4.473,0 -8.335,-1.521 -10.876,-4.277 l -0.692,-0.752 -0.72,0.727 c -2.825,2.852 -7.276,4.289 -12.873,4.158 -6.79,-0.162 -10.924,-3.951 -11.058,-10.141 -0.205,-9.543 9.031,-29.622 12.854,-35.727 2.482,-4.078 5.895,-6.055 10.438,-6.055 3.092,0 5.207,0.646 6.463,1.977 1.144,1.211 1.37,2.232 1.472,4.688 l 0.131,3.175 1.676,-2.7 c 4.054,-6.532 10.773,-7.434 17.43,-7.434 4.628,0 8.667,1.702 10.289,4.336 l 0.599,0.971 0.866,-0.737 c 3.431,-2.916 8.271,-4.521 13.629,-4.521 5.849,0 10.099,1.454 12.634,4.322 0.576,0.651 0.957,1.106 1.486,2.219 l 0.651,1.366 0.977,-1.155 c 3.712,-4.39 8.779,-6.615 15.067,-6.615 4.98,0 8.761,1.324 11.235,3.935 3.104,3.271 3.547,7.875 3.373,11.161 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#f6ec36" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z M 135.435,64.44 c -0.633,5.089 -4.072,14.518 -5.899,18.286 -4.903,10.102 -11.453,17.863 -24.074,17.863 -6.742,0 -12.288,-2.15 -15.531,-6.283 -4.749,4.162 -10.627,6.342 -16.956,6.342 -4.876,0 -9.185,-1.408 -12.471,-4.012 -3.626,2.555 -8.52,3.98 -13.943,3.98 -4.53,0 -8.606,-1.244 -11.796,-3.543 -3.529,2.342 -8.154,3.506 -13.583,3.377 C 12.149,100.237 5.912,94.507 5.733,86.188 5.497,75.137 14.803,54.911 19.189,47.907 c 3.282,-5.392 8.292,-8.293 14.431,-8.293 6.663,0 9.078,1.903 10.267,4.326 5.141,-4.366 11.956,-4.617 16.808,-4.617 5.356,0 8.717,1.422 11.575,3.697 3.948,-2.368 8.477,-3.599 13.871,-3.599 6.897,0 12.021,1.604 15.595,5.137 4.168,-3.469 9.388,-5.05 15.23,-5.05 7.725,0 12.808,2.786 15.793,6.94 4.203,5.859 3.451,11.757 2.676,17.992 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#d01012" /><path
d="m 0,0 0,141.731 141.73,0 L 141.73,0 0,0 Z m 139.781,1.952 0,137.832 -137.83,0 0,-137.832 137.83,0 z"
id="path14"
inkscape:connector-curvature="0" /><path
d="m 134.752,42.53 0,-0.965 0.655,0 c 0.479,0 0.728,0.168 0.728,0.479 0,0.247 -0.16,0.486 -0.647,0.486 l -0.736,0 z m 2.351,2.002 -0.408,-0.708 c -0.354,-0.619 -0.452,-0.717 -0.755,-0.823 l 0,-0.019 c 0.596,-0.07 0.95,-0.453 0.95,-0.983 0,-0.56 -0.354,-0.984 -1.109,-0.984 l -1.754,0 0,3.519 0.727,0 0,-1.441 0.133,0 c 0.311,0 0.435,0.035 0.576,0.176 0.142,0.144 0.354,0.443 0.479,0.69 l 0.284,0.575 0.877,-0.002 0,0 z m -1.731,-4.497 c 1.51,0 2.737,1.218 2.737,2.726 0,1.508 -1.229,2.731 -2.737,2.731 -1.506,0 -2.72,-1.225 -2.72,-2.731 0,-1.506 1.214,-2.726 2.72,-2.726 z m 0,-0.67 c -1.877,0 -3.392,1.516 -3.392,3.396 0,1.879 1.515,3.394 3.392,3.394 1.883,0 3.397,-1.515 3.397,-3.394 0.002,-1.882 -1.514,-3.396 -3.397,-3.396 z"
id="path16"
inkscape:connector-curvature="0" /><path
d="m 116.889,43.002 c -7.325,0 -12.386,2.904 -15.812,6.961 -0.579,-1.214 -1.019,-1.746 -1.638,-2.447 -2.805,-3.17 -7.313,-4.649 -13.364,-4.649 -5.912,0 -10.841,1.846 -14.263,4.754 -1.777,-2.89 -6.013,-4.803 -11.121,-4.803 -6.674,0 -13.946,0.944 -18.261,7.896 -0.104,-2.503 -0.33,-3.828 -1.737,-5.317 -1.71,-1.81 -4.477,-2.282 -7.173,-2.282 -4.912,0 -8.605,2.146 -11.266,6.515 -3.859,6.163 -13.212,26.441 -13.001,36.263 0.137,6.344 4.393,10.916 12.01,11.096 5.952,0.143 10.62,-1.449 13.59,-4.447 2.665,2.896 6.731,4.594 11.596,4.594 5.417,0 10.868,-1.627 14.088,-5.182 2.712,3.332 6.979,5.271 12.468,5.244 7.175,-0.035 13.477,-3.438 17.593,-8.652 2.259,6.148 7.985,8.59 14.241,8.59 13.709,0 19.729,-9.428 24.748,-24.332 1.13,-3.357 2.639,-8.963 2.889,-13.672 0.413,-7.839 -2.903,-16.13 -15.587,-16.13 z M 25.672,80.477 c 7.093,-1.232 8.876,1.332 8.653,3.707 -0.669,7.109 -7.191,8.699 -12.854,8.566 -4.107,-0.1 -7.8,-1.98 -7.903,-6.748 -0.18,-8.342 8.328,-27.641 12.333,-34.038 1.85,-3.037 4.104,-4.539 7.698,-4.539 3.406,0 4.25,1.749 4.2,3.844 -0.134,5.589 -9.164,22.574 -12.127,29.208 z M 48.77,73.925 c -0.469,1.27 -1.357,3.93 -2.076,6.75 2.328,-0.582 4.074,-0.986 7.065,-0.914 3.408,0.084 5.586,1.496 5.586,4.314 0,6.832 -7.551,8.838 -12.789,8.838 -5.751,0 -10.803,-3.275 -10.803,-9.564 0,-7.373 3.997,-18.553 7.748,-26.001 4.606,-9.146 9.312,-10.362 17.419,-10.362 3.562,0 7.667,1.524 7.667,4.888 0,4.662 -3.95,6.44 -7.866,6.665 -1.672,0.096 -4.246,0.188 -5.786,0.079 0,0 -1.303,1.985 -2.688,5.523 7.252,-1.021 10.327,0.625 9.103,4.82 -1.657,5.667 -6.567,6.04 -12.58,4.964 z M 84.438,56.293 c -1.961,0 -3.244,1.242 -4.198,2.583 -2.102,2.952 -6.656,14.781 -7.365,19.64 -0.486,3.328 0.951,4.006 2.522,4.006 2.52,0 5.345,-2.666 6.309,-7.064 0,0 -4.797,-0.117 -3.475,-4.371 1.285,-4.128 3.723,-5.022 7.764,-5.188 7.961,-0.325 7.175,5.553 6.538,8.688 -2.069,10.18 -9.314,18.355 -19.562,18.355 -7.016,0 -11.371,-3.881 -11.371,-11.035 0,-5.098 2.529,-13.101 4.534,-17.784 4.267,-9.968 8.742,-16.944 20.143,-16.944 6.84,0 12.235,2.458 11.444,8.866 -0.58,4.703 -2.934,7.465 -7.21,7.799 -1.196,0.093 -6.089,-0.031 -4.466,-4.66 0.565,-1.619 0.799,-2.891 -1.607,-2.891 z m 43.057,8.413 c -1.205,6.002 -3.916,13.101 -6.859,18.392 -4.801,8.633 -10.633,9.842 -15.723,9.781 -5.093,-0.061 -10.83,-1.941 -10.874,-9.795 -0.031,-5.639 2.401,-13.598 4.466,-18.815 3.599,-9.458 7.277,-17.17 18.904,-17.031 13.559,0.161 11.141,12.219 10.086,17.468 z M 115.993,56.49 c -1.164,-0.016 -2.18,0.212 -3.093,1.62 -2.051,2.657 -8.047,19.042 -7.941,22.31 0.038,1.174 0.687,2.201 2.133,2.201 1.659,0.002 2.581,-1.145 3.396,-2.529 1.887,-3.193 7.193,-17.676 7.339,-21.297 0.043,-1.055 -0.133,-2.284 -1.834,-2.305 z"
id="path18"
inkscape:connector-curvature="0" /></g></g></svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -232,11 +232,17 @@ namespace sensors {
return this.getNumber(NumberFormat.UInt8LE, 0)
}
/**
* Gets the ambient light
*/
//%
ambientLight() {
return this.light(LightIntensityMode.Ambient);
}
/**
* Gets the reflected light value
*/
//%
reflectedLight() {
return this.light(LightIntensityMode.Reflected);
@ -245,14 +251,19 @@ namespace sensors {
/**
* Set a threshold value
* @param condition the dark or bright light condition
* @param value the value threshold
* @param value the value threshold, eg: 10
*/
//% blockId=colorSetThreshold block="set **color sensor** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=90
//% group="Calibration" blockGap=8 weight=90
//% value.min=0 value.max=100
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/set-threshold
setThreshold(condition: Light, value: number) {
// threshold is used in ambient or reflected modes
if (this.mode != LightIntensityMode.Ambient &&
this.mode != LightIntensityMode.Reflected)
this.setMode(ColorSensorMode.ReflectedLightIntensity);
if (condition == Light.Dark)
this.thresholdDetector.setLowThreshold(value)
else
@ -264,18 +275,23 @@ namespace sensors {
* @param condition the light condition
*/
//% blockId=colorGetThreshold block="**color sensor** %this|%condition"
//% group="Threshold" blockGap=8 weight=89
//% group="Calibration" weight=89
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/threshold
threshold(condition: Light): number {
return this.thresholdDetector.threshold(<ThresholdState><number>Light.Dark);
// threshold is used in ambient or reflected modes
if (this.mode != LightIntensityMode.Ambient &&
this.mode != LightIntensityMode.Reflected)
this.setMode(ColorSensorMode.ReflectedLightIntensity);
return this.thresholdDetector.threshold(<ThresholdState><number>condition);
}
/**
* Collects measurement of the light condition and adjusts the threshold to 10% / 90%.
*/
//% blockId=colorCalibrateLight block="calibrate **color sensor** %this|for %mode"
//% group="Threshold" weight=91 blockGap=8
//% group="Calibration" weight=91 blockGap=8
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/calibrate-light
calibrateLight(mode: LightIntensityMode, deviation: number = 8) {

View File

@ -8,7 +8,7 @@ namespace brick {
//% color="#C8509B" weight=95 icon="\uf10f"
//% labelLineWidth=100
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Threshold"]'
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Calibration"]'
namespace sensors {
}

View File

@ -261,7 +261,7 @@ namespace sensors {
* @param value the value threshold
*/
//% blockId=irSetThreshold block="set **infrared** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=49
//% group="Calibration" blockGap=8 weight=49
//% value.min=0 value.max=100
//% this.fieldEditor="ports"
setPromixityThreshold(condition: InfraredSensorEvent, value: number) {
@ -276,10 +276,10 @@ namespace sensors {
* @param condition the proximity condition
*/
//% blockId=irGetThreshold block="**infrared** %this|%condition"
//% group="Threshold" blockGap=8 weight=49
//% group="Calibration" weight=49
//% this.fieldEditor="ports"
proximityThreshold(condition: InfraredSensorEvent): number {
return this._proximityThreshold.threshold(<ThresholdState><number>Light.Dark);
return this._proximityThreshold.threshold(<ThresholdState><number>condition);
}
// TODO

View File

@ -96,7 +96,7 @@ namespace sensors {
* @param value the value threshold
*/
//% blockId=ultrasonicSetThreshold block="set **ultrasonic** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=80
//% group="Calibration" blockGap=8 weight=80
//% value.min=0 value.max=255
//% this.fieldEditor="ports"
setThreshold(condition: UltrasonicSensorEvent, value: number) {
@ -111,12 +111,12 @@ namespace sensors {
* @param condition the proximity condition
*/
//% blockId=ultrasonicGetThreshold block="**ultrasonic** %this|%condition"
//% group="Threshold" blockGap=8 weight=79
//% group="Calibration" weight=79
//% this.fieldEditor="ports"
threshold(condition: UltrasonicSensorEvent): number {
switch (condition) {
case UltrasonicSensorEvent.ObjectNear: this.promixityThreshold.threshold(ThresholdState.Low); break;
case UltrasonicSensorEvent.ObjectDetected: this.movementThreshold; break;
case UltrasonicSensorEvent.ObjectNear: return this.promixityThreshold.threshold(ThresholdState.Low);
case UltrasonicSensorEvent.ObjectDetected: return this.movementThreshold;
}
return 0;
}

2
package-lock.json generated
View File

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

View File

@ -1,7 +1,7 @@
{
"name": "pxt-ev3",
"version": "0.1.16",
"description": "LEGO Mindstorms EV3 for Microsoft MakeCode",
"version": "0.1.23",
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
"private": true,
"keywords": [
"JavaScript",
@ -46,7 +46,7 @@
},
"dependencies": {
"pxt-common-packages": "0.20.38",
"pxt-core": "3.8.8"
"pxt-core": "3.8.14"
},
"scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis"

View File

@ -2,9 +2,9 @@
"id": "ev3",
"platformid": "linux",
"nickname": "lego",
"name": "LEGO MINDSTORMS EV3",
"title": "LEGO MINDSTORMS EV3 - Blocks / Javascript editor",
"description": "A Blocks / JavaScript code editor for the LEGO MINDSTORMS EV3.",
"name": "LEGO® MINDSTORMS® Education EV3",
"title": "LEGO® MINDSTORMS® Education EV3 - Blocks / Javascript editor",
"description": "A Blocks / JavaScript code editor for the LEGO® MINDSTORMS® Education EV3.",
"corepkg": "ev3",
"bundleddirs": [
"libs/base",
@ -98,7 +98,7 @@
"githubUrl": "https://github.com/Microsoft/pxt-ev3",
"betaUrl": "https://makecode.legoeducation.com/about",
"driveDisplayName": "EV3",
"boardName": "LEGO MINDSTORMS EV3 Brick",
"boardName": "LEGO® MINDSTORMS® Education EV3",
"selectLanguage": true,
"availableLocales": [
"en"

View File

@ -1,10 +1,46 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 146.25 120.31">
<defs>
<linearGradient id="linear-gradient" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="translate(53145.53 916.09) scale(65.53 48.84)" gradientUnits="userSpaceOnUse">
<linearGradient id="linear-gradient-background" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="translate(53145.53 916.09) scale(65.53 48.84)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#6a6a6a"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient" x1="-374.89" y1="432.9" x2="-374.89" y2="432.82" gradientTransform="matrix(110.73, 0, 0, -106.94, 41567.45, 46425.3)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#f1f1f1"/>
<stop offset="1" stop-color="#7a7a7a"/>
</linearGradient>
<linearGradient id="linear-gradient-2" x1="-376" y1="450.74" x2="-376" y2="450.72" gradientTransform="matrix(100.11, 0, 0, -79.18, 37697.19, 35762.28)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#a8aaa8"/>
<stop offset="1" stop-color="gray"/>
</linearGradient>
<linearGradient id="linear-gradient-3" x1="-376.21" y1="614.94" x2="-376.21" y2="614.75" gradientTransform="matrix(98.29, 0, 0, -23.36, 37033.43, 14529.9)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#a8aaa8"/>
<stop offset="1" stop-color="#535453"/>
</linearGradient>
<linearGradient id="linear-gradient-black" x1="-382.07" y1="493.36" x2="-382.07" y2="494.25" gradientTransform="matrix(65.53, 0, 0, -48.84, 25091.11, 24228.69)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#6a6a6a"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-green" x1="0" y1="0" x2="145" y2="48" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#8CE300"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-red" x1="0" y1="0" x2="145" y2="48" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#D02E26"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-orange" x1="0" y1="0" x2="145" y2="48" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#F8D039"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-5" x1="-743.87" y1="1256.85" x2="-743.87" y2="1257.21" gradientTransform="matrix(3.03, 0, 0, -6.22, 2312.41, 7891.56)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#757575"/>
<stop offset="1" stop-color="#393939"/>
</linearGradient>
</defs>
<title>EV3Landscape</title>
<g id="EV3">
@ -17,7 +53,7 @@
</g>
<g id="buttons">
<path id="btn_grey" data-name="btn grey" d="M68.9,119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13H57.93a5.13,5.13,0,1,1-.35-10.25h2.47V97.79l8.76-8.94h8.75c3.94,4,8.74,8.75,8.74,8.75v1.32h2a5.13,5.13,0,0,1,.35,10.25H86.3v1.13c-4.66,4.79-8.68,8.84-8.68,8.84Z" style="fill: #6a6a6a"/>
<path id="btn_color" data-name="btn color" d="M68.9,119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13H57.93a5.13,5.13,0,1,1-.35-10.25h2.47V97.79l8.76-8.94h8.75c3.94,4,8.74,8.75,8.74,8.75v1.32h2a5.13,5.13,0,0,1,.35,10.25H86.3v1.13c-4.66,4.79-8.68,8.84-8.68,8.84Z" style="fill: url(#linear-gradient)"/>
<path id="btn_color" data-name="btn color" d="M68.9,119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13H57.93a5.13,5.13,0,1,1-.35-10.25h2.47V97.79l8.76-8.94h8.75c3.94,4,8.74,8.75,8.74,8.75v1.32h2a5.13,5.13,0,0,1,.35,10.25H86.3v1.13c-4.66,4.79-8.68,8.84-8.68,8.84Z" style="fill: url(#linear-gradient-background)"/>
<path id="btn_left" data-name="btn left" d="M57.85,100.14H64.3v7.62H57.85a3.81,3.81,0,0,1-3.8-3.81h0A3.81,3.81,0,0,1,57.85,100.14Z" style="fill: #a8aaa8"/>
<path id="btn_right" data-name="btn right" d="M88.32,107.76H81.88v-7.62h6.44a3.81,3.81,0,0,1,3.81,3.8h0a3.81,3.81,0,0,1-3.81,3.81Z" style="fill: #a8aaa8"/>
<path id="btn_enter" data-name="btn enter" d="M69.37,100.14h7.44a.29.29,0,0,1,.29.28v7.06a.29.29,0,0,1-.29.28H69.37a.29.29,0,0,1-.28-.28v-7.06A.29.29,0,0,1,69.37,100.14Z" style="fill: #393939"/>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,4 +1,4 @@
namespace pxsim.visuals {
export const EV3_LANDSCAPE_SVG = `<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146.25 120.31"><defs><linearGradient id="linear-gradient" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="matrix(65.53 0 0 48.84 53145.53 916.09)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#6a6a6a"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient></defs><g id="EV3"><g id="brick"><path id="ev3_body_2" data-name="ev3 body 2" d="M2.64 0h141a2.47 2.47 0 0 1 2.64 2.25v115.81a2.47 2.47 0 0 1-2.64 2.25h-141A2.47 2.47 0 0 1 0 118.06V2.25A2.47 2.47 0 0 1 2.64 0z" fill="#fff"/><path id="ev3_screenborder" data-name="ev3 screenborder" d="M8.47 1.54h129.31a6.58 6.58 0 0 1 6.58 6.58v72.67a6.6 6.6 0 0 1-6.58 6.6H8.47a6.6 6.6 0 0 1-6.58-6.6V8.12a6.58 6.58 0 0 1 6.58-6.58z" fill="#393939"/><path id="ev3_screen" data-name="ev3 screen" d="M19.06 5.07h106.8a4.6 4.6 0 0 1 4.69 4.52v68.25a4.61 4.61 0 0 1-4.61 4.62H19.06a4.61 4.61 0 0 1-4.61-4.62V9.68a4.6 4.6 0 0 1 4.61-4.61z" fill="#97b5a6"/></g><g id="buttons"><path id="btn_grey" data-name="btn grey" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="#6a6a6a"/><path id="btn_color" data-name="btn color" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="url(#linear-gradient)"/><path id="btn_left" data-name="btn left" d="M57.85 100.14h6.45v7.62h-6.45a3.81 3.81 0 0 1-3.8-3.81 3.81 3.81 0 0 1 3.8-3.81z" fill="#a8aaa8"/><path id="btn_right" data-name="btn right" d="M88.32 107.76h-6.44v-7.62h6.44a3.81 3.81 0 0 1 3.81 3.8 3.81 3.81 0 0 1-3.81 3.81z" fill="#a8aaa8"/><path id="btn_enter" data-name="btn enter" d="M69.37 100.14h7.44a.29.29 0 0 1 .29.28v7.06a.29.29 0 0 1-.29.28h-7.44a.29.29 0 0 1-.28-.28v-7.06a.29.29 0 0 1 .28-.28z" fill="#393939"/><path id="btn_up" data-name="btn up" d="M69.19 90.26l7.9-.09L83 96.28l-2.44 2.44v4.42h-2.25v-2.55a1.86 1.86 0 0 0-1.86-1.86h-6.87a1.54 1.54 0 0 0-1.6 1.46v3H65.7v-4.47l-2.44-2.49z" fill="#a8aaa8"/><path id="btn_down" data-name="btn down" d="M77.05 117.65l-7.85.06-5.94-6.1 2.48-2.43v-4.44H68v2.54a1.9 1.9 0 0 0 1.86 1.9h6.82a1.62 1.62 0 0 0 1.65-1.58v-2.86h2.27v4.44l2.4 2.43z" fill="#a8aaa8"/></g></g></svg>`;
export const EV3_LANDSCAPE_SVG = `<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146.25 120.31"><defs><linearGradient id="linear-gradient-background" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="matrix(65.53 0 0 48.84 53145.53 916.09)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#6a6a6a"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient" x1="-374.89" y1="432.9" x2="-374.89" y2="432.82" gradientTransform="matrix(110.73 0 0 -106.94 41567.45 46425.3)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#7a7a7a"/></linearGradient><linearGradient id="linear-gradient-2" x1="-376" y1="450.74" x2="-376" y2="450.72" gradientTransform="matrix(100.11 0 0 -79.18 37697.19 35762.28)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8aaa8"/><stop offset="1" stop-color="gray"/></linearGradient><linearGradient id="linear-gradient-3" x1="-376.21" y1="614.94" x2="-376.21" y2="614.75" gradientTransform="matrix(98.29 0 0 -23.36 37033.43 14529.9)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8aaa8"/><stop offset="1" stop-color="#535453"/></linearGradient><linearGradient id="linear-gradient-black" x1="-382.07" y1="493.36" x2="-382.07" y2="494.25" gradientTransform="matrix(65.53 0 0 -48.84 25091.11 24228.69)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#6a6a6a"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-green" x2="145" y2="48" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#8CE300"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-red" x2="145" y2="48" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#D02E26"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-orange" x2="145" y2="48" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#F8D039"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-5" x1="-743.87" y1="1256.85" x2="-743.87" y2="1257.21" gradientTransform="matrix(3.03 0 0 -6.22 2312.41 7891.56)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#757575"/><stop offset="1" stop-color="#393939"/></linearGradient></defs><g id="EV3"><g id="brick"><path id="ev3_body_2" data-name="ev3 body 2" d="M2.64 0h141a2.47 2.47 0 0 1 2.64 2.25v115.81a2.47 2.47 0 0 1-2.64 2.25h-141A2.47 2.47 0 0 1 0 118.06V2.25A2.47 2.47 0 0 1 2.64 0z" fill="#fff"/><path id="ev3_screenborder" data-name="ev3 screenborder" d="M8.47 1.54h129.31a6.58 6.58 0 0 1 6.58 6.58v72.67a6.6 6.6 0 0 1-6.58 6.6H8.47a6.6 6.6 0 0 1-6.58-6.6V8.12a6.58 6.58 0 0 1 6.58-6.58z" fill="#393939"/><path id="ev3_screen" data-name="ev3 screen" d="M19.06 5.07h106.8a4.6 4.6 0 0 1 4.69 4.52v68.25a4.61 4.61 0 0 1-4.61 4.62H19.06a4.61 4.61 0 0 1-4.61-4.62V9.68a4.6 4.6 0 0 1 4.61-4.61z" fill="#97b5a6"/></g><g id="buttons"><path id="btn_grey" data-name="btn grey" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="#6a6a6a"/><path id="btn_color" data-name="btn color" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="url(#linear-gradient-background)"/><path id="btn_left" data-name="btn left" d="M57.85 100.14h6.45v7.62h-6.45a3.81 3.81 0 0 1-3.8-3.81 3.81 3.81 0 0 1 3.8-3.81z" fill="#a8aaa8"/><path id="btn_right" data-name="btn right" d="M88.32 107.76h-6.44v-7.62h6.44a3.81 3.81 0 0 1 3.81 3.8 3.81 3.81 0 0 1-3.81 3.81z" fill="#a8aaa8"/><path id="btn_enter" data-name="btn enter" d="M69.37 100.14h7.44a.29.29 0 0 1 .29.28v7.06a.29.29 0 0 1-.29.28h-7.44a.29.29 0 0 1-.28-.28v-7.06a.29.29 0 0 1 .28-.28z" fill="#393939"/><path id="btn_up" data-name="btn up" d="M69.19 90.26l7.9-.09L83 96.28l-2.44 2.44v4.42h-2.25v-2.55a1.86 1.86 0 0 0-1.86-1.86h-6.87a1.54 1.54 0 0 0-1.6 1.46v3H65.7v-4.47l-2.44-2.49z" fill="#a8aaa8"/><path id="btn_down" data-name="btn down" d="M77.05 117.65l-7.85.06-5.94-6.1 2.48-2.43v-4.44H68v2.54a1.9 1.9 0 0 0 1.86 1.9h6.82a1.62 1.62 0 0 0 1.65-1.58v-2.86h2.27v4.44l2.4 2.43z" fill="#a8aaa8"/></g></g></svg>`;
}

View File

@ -388,7 +388,8 @@ namespace pxsim.visuals {
})
}
// Kill the brick
this.layoutView.getBrick().kill();
this.layoutView.getPortraitBrick().kill();
this.layoutView.getLandscapeBrick().kill();
// Save previous inputs for the next cycle
EV3View.previousSelectedInputs = ev3board().getInputNodes().map((node, index) => (this.getDisplayViewForNode(node.id, index).getSelected()) ? node.id : -1)
@ -474,7 +475,8 @@ namespace pxsim.visuals {
const brickNode = ev3board().getBrickNode();
if (brickNode.didChange()) {
this.getDisplayViewForNode(brickNode.id, -1).updateState();
this.layoutView.getPortraitBrick().updateState();
this.layoutView.getLandscapeBrick().updateState();
}
const outputNodes = ev3board().getMotors();

View File

@ -78,7 +78,7 @@ namespace pxsim.visuals {
this.brick.setSelected(false);
this.brickLandscape.setSelected(true);
this.brickLandscape.setVisible(false);
this.position();
this.position();
}
public isBrickLandscape() {
@ -86,7 +86,15 @@ namespace pxsim.visuals {
}
public getBrick() {
return this.brickInLandscape ? this.brickLandscape : this.brick;
return this.brickInLandscape ? this.getLandscapeBrick() : this.getPortraitBrick();
}
public getPortraitBrick() {
return this.brick;
}
public getLandscapeBrick() {
return this.brickLandscape;
}
public unselectBrick() {

View File

@ -18,7 +18,6 @@ namespace pxsim.visuals {
if (!motorState) return;
const speed = motorState.getSpeed();
if (!speed) return;
this.setMotorAngle(motorState.getAngle() % 360);
this.setMotorLabel(speed);
}
@ -42,13 +41,8 @@ namespace pxsim.visuals {
this.motorLabelGroup = pxsim.svg.child(this.content, "g") as SVGGElement;
this.motorLabel = pxsim.svg.child(this.motorLabelGroup, "text", { 'text-anchor': 'middle', 'x': '0', 'y': '0', 'class': 'sim-text number inverted' }) as SVGTextElement;
}
// If Motor speed is not 0
if (this.currentLabel) {
this.motorLabel.textContent = `${this.currentLabel}%`;
this.positionMotorLabel();
} else {
this.motorLabel.textContent = ``;
}
this.motorLabel.textContent = `${this.currentLabel}%`;
this.positionMotorLabel();
}
protected abstract positionMotorLabel(): void;

View File

@ -15,11 +15,6 @@
"Maker": "maker"
},
"electronManifest": {
"majorReleases": {
"0": {
"latest": "v0.1.5",
"promptVersion": "v0.1.5"
}
}
"latest": "v0.1.19"
}
}
}

View File

@ -184,3 +184,9 @@
@blocklyFlyoutColor: #3B3C3D;
@blocklyFlyoutColorOpacity: 1.0;
@monacoFlyoutColor: rgba(59, 60, 61, 1.0);
/*-------------------
Tutorial
--------------------*/
@tutorialSegmentBackground: #f2f2f2;

View File

@ -115,6 +115,11 @@
color: @blue;
}
/* Tutorial */
#tutorialcard .ui.tutorialsegment {
border-radius: 0;
}
/* Mobile */
@media only screen and (max-width: @largestMobileScreen) {
#filelist {