Compare commits
42 Commits
v1.2.9
...
offlineapp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fd0bf92fa | ||
|
|
a33bff0520 | ||
|
|
7549f865d6 | ||
|
|
a5de9d88bb | ||
|
|
0437df10de | ||
|
|
2079173dfa | ||
|
|
018a1e7528 | ||
|
|
757f95d984 | ||
|
|
8bc3fdc8ba | ||
|
|
e8a1e73cf5 | ||
|
|
e9b2b239ad | ||
|
|
5ad2288a9f | ||
|
|
92d13ef343 | ||
|
|
471ca5d915 | ||
|
|
f745079728 | ||
|
|
d179f18ef3 | ||
|
|
805fc6c787 | ||
|
|
374bbb8304 | ||
|
|
25452efc92 | ||
|
|
80b9c715b2 | ||
|
|
cb816c91ad | ||
|
|
3012068986 | ||
|
|
4c9c7d6a69 | ||
|
|
ad3652c290 | ||
|
|
d8971829e3 | ||
|
|
8ca4558fc2 | ||
|
|
d85b5c5129 | ||
|
|
95b1c6a50f | ||
|
|
4dc2872286 | ||
|
|
6c9ff804c8 | ||
|
|
7581b5af9e | ||
|
|
07504027f9 | ||
|
|
a0e133864a | ||
|
|
0285711954 | ||
|
|
91be998d7e | ||
|
|
e862869327 | ||
|
|
8047cb2612 | ||
|
|
8e2ffefd2c | ||
|
|
092e7b0522 | ||
|
|
42454ecd57 | ||
|
|
2563fd6031 | ||
|
|
e0c1f2dca0 |
@@ -6,13 +6,13 @@
|
|||||||
<a class="item" href="https://makecode.com/privacy" target="_blank" rel="noopener">Privacy & Cookies</a>
|
<a class="item" href="https://makecode.com/privacy" target="_blank" rel="noopener">Privacy & Cookies</a>
|
||||||
<a class="item" href="https://makecode.com/termsofuse" target="_blank" rel="noopener"> Terms Of Use</a>
|
<a class="item" href="https://makecode.com/termsofuse" target="_blank" rel="noopener"> Terms Of Use</a>
|
||||||
<a class="item" href="https://makecode.com/trademarks" target="_blank" rel="noopener">Trademarks</a>
|
<a class="item" href="https://makecode.com/trademarks" target="_blank" rel="noopener">Trademarks</a>
|
||||||
<div class="item">© 2018 Microsoft</div>
|
<div class="item">©2019 Microsoft</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui container horizontal small divided link list">
|
<div class="ui container horizontal small divided link list">
|
||||||
<a class="ui centered item" href="https://makecode.com/" title="Microsoft MakeCode" target="_blank" rel="noopener">Powered by Microsoft MakeCode</a>
|
<a class="ui centered item" href="https://makecode.com/" title="Microsoft MakeCode" target="_blank" rel="noopener">Powered by Microsoft MakeCode</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui centered container small list">
|
<div class="ui centered container small list">
|
||||||
<p class="item">LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are trademarks and/ or copyrights of the LEGO Group. ©2018 The LEGO Group. All rights reserved.</p>
|
<p class="item">@copyrightText@</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -16,10 +16,12 @@ or privacy.
|
|||||||
|
|
||||||
## ~
|
## ~
|
||||||
|
|
||||||
|
https://youtu.be/VIq8-6Egtqs
|
||||||
|
|
||||||
## Supported browsers
|
## Supported browsers
|
||||||
|
|
||||||
* Chrome desktop, version 77 and higher, Windows 10
|
* Chrome desktop, version 77 and higher, Windows 10 or Mac OS.
|
||||||
* [Edge Insider desktop](https://www.microsoftedgeinsider.com), version 77 and higher, Windows 10
|
* [Edge Insider desktop](https://www.microsoftedgeinsider.com), version 77 and higher, Windows 10 or Mac OS.
|
||||||
|
|
||||||
To make sure your browser is up to date, go to the '...' menu, click "Help" then "About".
|
To make sure your browser is up to date, go to the '...' menu, click "Help" then "About".
|
||||||
|
|
||||||
@@ -28,18 +30,15 @@ Next you need to enable the experimental features (this may change in the future
|
|||||||
* go to **chrome://flags/#enable-experimental-web-platform-features** and **enable**
|
* go to **chrome://flags/#enable-experimental-web-platform-features** and **enable**
|
||||||
**Experimental Web Platform features**
|
**Experimental Web Platform features**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Machine Setup
|
## Machine Setup
|
||||||
|
|
||||||
* pair your EV3 brick with your computer over Bluetooth. This is the usual pairing procedure.
|
* pair your EV3 brick with your computer over Bluetooth. This is the usual pairing procedure.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Download over Bluetooth
|
## Download over Bluetooth
|
||||||
|
|
||||||
* go to the **beta** editor https://makecode.mindstorms.com/beta
|
* go to https://makecode.mindstorms.com/
|
||||||
|
|
||||||
This feature is not yet released so make sure to use the beta editor.
|
|
||||||
|
|
||||||
* click on **Download** to start a file download as usual
|
* click on **Download** to start a file download as usual
|
||||||
* on the download dialog, you should see a **Bluetooth** button. Click on the
|
* on the download dialog, you should see a **Bluetooth** button. Click on the
|
||||||
**Bluetooth** button to enable the mode.
|
**Bluetooth** button to enable the mode.
|
||||||
@@ -49,12 +48,14 @@ This feature is not yet released so make sure to use the beta editor.
|
|||||||
## Choosing the correct serial port
|
## Choosing the correct serial port
|
||||||
|
|
||||||
Unfortunately, the browser dialog does not make it easy to select which serial port is the brick.
|
Unfortunately, the browser dialog does not make it easy to select which serial port is the brick.
|
||||||
On Windows, it typically reads "Standard Serial over Bluetooth" and you may
|
|
||||||
have multiple of those if you've paired different bricks.
|
* On Windows, choose ``Standard Serial over Bluetooth``. There might be multiple of those but only one works. Try your luck! Once you know the COM port number, remember it for the next time around.
|
||||||
|
* On Mac OS, choose ``cu.BRICKNAME-SerialPort``
|
||||||
|
|
||||||
## Known issues
|
## Known issues
|
||||||
|
|
||||||
* We do not detect properly that the program is running on the brick. Make sure to stop the program before starting the download procedure.
|
* We do not detect properly that the program is running on the brick. Make sure to stop the program before starting the download procedure.
|
||||||
|
* The list of programs on the brick screen is not updated when uploading via bluetooth.
|
||||||
|
|
||||||
## Feedback
|
## Feedback
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ Sharing programs is also shown in the [Tips and Tricks](https://legoeducation.vi
|
|||||||
|
|
||||||
The official answer is currently no. That being said, we have **Experimental support** for Bluetooth download. Please read the [Bluetooth](/bluetooth) page for more information.
|
The official answer is currently no. That being said, we have **Experimental support** for Bluetooth download. Please read the [Bluetooth](/bluetooth) page for more information.
|
||||||
|
|
||||||
|
https://youtu.be/VIq8-6Egtqs
|
||||||
|
|
||||||
### Why can't I delete my program (*.uf2) files from the Brick?
|
### Why can't I delete my program (*.uf2) files from the Brick?
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"appref": "v1.1.20"
|
"appref": "v1.2.22"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ motors.largeBC.steer(0, 50, 1, MoveUnit.Rotations);
|
|||||||
motors.largeBC.stop();
|
motors.largeBC.stop();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ~ hint
|
||||||
|
|
||||||
|
The **turn ratio range is -200, 200** unlike LabView who used -100,100.
|
||||||
|
|
||||||
|
### ~
|
||||||
|
|
||||||
## Tank
|
## Tank
|
||||||
|
|
||||||
The **tank** blocks control the speed of two motors. These are commonly used for a differential drive robot. The blocks can also specify the duration, angle, or number of rotations.
|
The **tank** blocks control the speed of two motors. These are commonly used for a differential drive robot. The blocks can also specify the duration, angle, or number of rotations.
|
||||||
|
|||||||
@@ -3,11 +3,20 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>LEGO® MINDSTORMS® Education EV3 Offline App</title>
|
<title>@name@ Offline App</title>
|
||||||
<meta name="Description" content="A MakeCode for LEGO® MINDSTORMS® Education EV3 offline app" />
|
<meta name="Description" content="A MakeCode for @name@ offline app" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<!-- @include indexhead.html -->
|
<link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/doccdn/semantic.css" />
|
||||||
|
<link rel="stylesheet" href="/docfiles/style.css" />
|
||||||
|
<link rel="stylesheet" href="/docfiles/target.css" />
|
||||||
|
|
||||||
|
<script src="/doccdn/jquery.js" type="text/javascript"></script>
|
||||||
|
<script src="/doccdn/semantic.js" type="text/javascript"></script>
|
||||||
|
<script src="/docfiles/target.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@targetstyle@
|
||||||
|
</style>
|
||||||
<style>
|
<style>
|
||||||
p.item {
|
p.item {
|
||||||
color: rgba(0, 0, 0, 0.4);
|
color: rgba(0, 0, 0, 0.4);
|
||||||
@@ -55,6 +64,10 @@
|
|||||||
background-color: rgb(250, 250, 250);
|
background-color: rgb(250, 250, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#legal-segment {
|
||||||
|
background:white;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 800px) {
|
@media only screen and (max-width: 800px) {
|
||||||
.grid .column .image {
|
.grid .column .image {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -368,34 +381,61 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
var electronLatestVersion = "";
|
||||||
tickEvent = function (id, data) {
|
function tickEvent(id, data) {
|
||||||
if (!pxt.aiTrackEvent) return;
|
if (!pxt.aiTrackEvent) return;
|
||||||
if (!data) pxt.aiTrackEvent(id);
|
if (!data) pxt.aiTrackEvent(id);
|
||||||
else {
|
else {
|
||||||
var props = {};
|
var props = {};
|
||||||
var measures = {};
|
var measures = {};
|
||||||
for (var k in data)
|
for (var k in data)
|
||||||
if (typeof data[k] == "string") props[k] = data[k];
|
if (typeof data[k] == "string") props[k] = data[k];
|
||||||
else measures[k] = data[k];
|
else measures[k] = data[k];
|
||||||
pxt.aiTrackEvent(id, props, measures);
|
pxt.aiTrackEvent(id, props, measures);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
function agreeCheckboxChanged() {
|
function agreeCheckboxChanged() {
|
||||||
var downloadSegment = document.getElementById("download-segment");
|
showDownloads();
|
||||||
downloadSegment.classList.toggle("hidden");
|
}
|
||||||
|
|
||||||
|
function showAgree() {
|
||||||
|
$("#agree-segment").removeClass("hidden");
|
||||||
|
$("#read-segment").removeClass("hidden");
|
||||||
|
$("#legal-segment").removeClass("hidden");
|
||||||
|
}
|
||||||
|
|
||||||
|
function showNoDownloads() {
|
||||||
|
$("#no-download-segment").removeClass("hidden");
|
||||||
|
$("#read-segment").addClass("hidden");
|
||||||
|
$("#legal-segment").addClass("hidden");
|
||||||
|
}
|
||||||
|
|
||||||
|
function showDownloads() {
|
||||||
|
$("#download-win64").attr("href", "https://makecode.com/api/release/@targetid@/" + electronLatestVersion + "/win64");
|
||||||
|
$("#download-mac64").attr("href", "https://makecode.com/api/release/@targetid@/" + electronLatestVersion + "/mac64");
|
||||||
|
$("#download-segment").removeClass("hidden");
|
||||||
}
|
}
|
||||||
function downloadWin64() {
|
function downloadWin64() {
|
||||||
// TODO: Keep this link up-to-date with the desired release version
|
tickEvent("offlineapp.download", { "target": "@targetid@", "platform": "win64" });
|
||||||
window.open("https://makecode.com/api/release/ev3/v1.1.20/win64");
|
|
||||||
tickEvent("offlineapp.download", { "target": "ev3", "platform": "win64" });
|
|
||||||
}
|
}
|
||||||
function downloadMac64() {
|
function downloadMac64() {
|
||||||
// TODO: Keep this link up-to-date with the desired release version
|
tickEvent("offlineapp.download", { "target": "@targetid@", "platform": "mac64" });
|
||||||
window.open("https://makecode.com/api/release/ev3/v1.1.20/mac64");
|
|
||||||
tickEvent("offlineapp.download", { "target": "ev3", "platform": "mac64" });
|
|
||||||
}
|
}
|
||||||
|
$(function () {
|
||||||
|
$.getJSON("https://makecode.com/api/config/@targetid@/targetconfig")
|
||||||
|
.then(function (data) {
|
||||||
|
if (data && data.electronManifest && data.electronManifest.latest) {
|
||||||
|
electronLatestVersion = data.electronManifest.latest;
|
||||||
|
showAgree();
|
||||||
|
} else {
|
||||||
|
showNoDownloads();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function () {
|
||||||
|
showNoDownloads();
|
||||||
|
})
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -406,35 +446,39 @@
|
|||||||
|
|
||||||
<div class="ui grid topbar">
|
<div class="ui grid topbar">
|
||||||
<div class="three wide column">
|
<div class="three wide column">
|
||||||
<img class="ui small image left" src="/static//lego_education_logo_white.png" />
|
<img class="ui small image left" src="@cardLogo@" />
|
||||||
</div>
|
</div>
|
||||||
<div class="ten wide column">
|
<div class="ten wide column">
|
||||||
<h1 class="ui inverted welcomeheader">MakeCode Offline App</h1>
|
<h1 class="ui inverted welcomeheader">@name@ Offline App</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="three wide column">
|
<div class="three wide column">
|
||||||
<img class="ui small image right" src="/static//Microsoft-logo_rgb_c-white.png" />
|
<img class="ui small image right" src="/static/Microsoft-logo_rgb_c-white.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui compact segments terms-container">
|
<div id="segments" class="ui compact segments terms-container">
|
||||||
<div class="ui secondary center aligned segment">
|
<div id="read-segment" class="ui secondary center aligned segment hidden">
|
||||||
Please read and accept the following terms to download the app.
|
Please read and accept the following terms to download the app.
|
||||||
</div>
|
</div>
|
||||||
<div class="ui left aligned segment terms">
|
<div id="legal-segment" class="ui left aligned segment terms hidden">
|
||||||
|
<div id="loader" class="ui active loader"></div>
|
||||||
<div class="c17">
|
<div class="c17">
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c4 c1">MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS</span>
|
<span class="c4 c1">MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c4 c1">MICROSOFT MAKECODE FOR LEGO MINDSTORMS EDUCATION EV3</span>
|
<span class="c4 c1">MICROSOFT MAKECODE SOFTWARE FOR @name@</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c7">
|
<p class="c7">
|
||||||
<span class="c4 c1"></span>
|
<span class="c4 c1"></span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c3 c1">These license terms are an agreement between Microsoft Corporation (or based on where you live, one
|
<span class="c3 c1">These license terms are an agreement between Microsoft Corporation (or based
|
||||||
of its affiliates) and you. They apply to the software named above. The terms also apply to any
|
on where you live, one
|
||||||
Microsoft services or updates for the software, except to the extent those have additional terms.</span>
|
of its affiliates) and you. They apply to the software named above. The terms also apply to
|
||||||
|
any
|
||||||
|
Microsoft services or updates for the software, except to the extent those have additional
|
||||||
|
terms.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c7">
|
<p class="c7">
|
||||||
<span class="c3 c1"></span>
|
<span class="c3 c1"></span>
|
||||||
@@ -446,27 +490,35 @@
|
|||||||
<span class="c5 c1">1.</span>
|
<span class="c5 c1">1.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">INSTALLATION AND USE RIGHTS. </span>
|
<span class="c5 c1">INSTALLATION AND USE RIGHTS. </span>
|
||||||
<span class="c3 c1">You may install and use any number of copies of the software to evaluate it as you develop and test
|
<span class="c3 c1">You may install and use any number of copies of the software to evaluate it
|
||||||
your software applications for use with Lego Mindstorms Education EV3 hardware.</span>
|
as you develop and test
|
||||||
|
your software applications for use with @name@ hardware.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">2.</span>
|
<span class="c5 c1">2.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">PRE-RELEASE SOFTWARE. </span>
|
<span class="c5 c1">PRE-RELEASE SOFTWARE. </span>
|
||||||
<span class="c3 c1">The software is a pre-release version. It may not work the way a final version of the software will.
|
<span class="c3 c1">The software is a pre-release version. It may not work the way a final
|
||||||
Microsoft may change it for the final, commercial version. We also may not release a commercial
|
version of the software will.
|
||||||
version. Microsoft is not obligated to provide maintenance, technical support or updates to you
|
Microsoft may change it for the final, commercial version. We also may not release a
|
||||||
|
commercial
|
||||||
|
version. Microsoft is not obligated to provide maintenance, technical support or updates to
|
||||||
|
you
|
||||||
for the software.</span>
|
for the software.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">3.</span>
|
<span class="c5 c1">3.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">ASSOCIATED ONLINE SERVICES.</span>
|
<span class="c5 c1">ASSOCIATED ONLINE SERVICES.</span>
|
||||||
<span class="c1"> Some features of the software provide access
|
<span class="c1"> Some features of the software
|
||||||
to, or rely on, online services to provide you information about updates to the software or extensions,
|
provide access
|
||||||
or to enable you to retrieve content, collaborate with others, or otherwise supplement your development
|
to, or rely on, online services to provide you information about updates to the software or
|
||||||
experience. As used throughout these license terms, the term <q>software</q> includes these online
|
extensions,
|
||||||
services and features. By using these online services and features you consent to the to the
|
or to enable you to retrieve content, collaborate with others, or otherwise supplement your
|
||||||
|
development
|
||||||
|
experience. As used throughout these license terms, the term <q>software</q> includes these
|
||||||
|
online
|
||||||
|
services and features. By using these online services and features you consent to the to the
|
||||||
transmission of information as described in Section 5, DATA.
|
transmission of information as described in Section 5, DATA.
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -474,9 +526,11 @@
|
|||||||
<span class="c5 c1">4.</span>
|
<span class="c5 c1">4.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">LICENSES FOR OTHER COMPONENTS.</span>
|
<span class="c5 c1">LICENSES FOR OTHER COMPONENTS.</span>
|
||||||
<span class="c3 c1"> The software may include third party components with separate legal notices or governed by
|
<span class="c3 c1"> The software may include third party components with separate legal
|
||||||
|
notices or governed by
|
||||||
other agreements, as described in the ThirdPartyNotices file accompanying the software. Even
|
other agreements, as described in the ThirdPartyNotices file accompanying the software. Even
|
||||||
if such components are governed by other agreements, the disclaimers and the limitations on and
|
if such components are governed by other agreements, the disclaimers and the limitations on
|
||||||
|
and
|
||||||
exclusions of damages below also apply.</span>
|
exclusions of damages below also apply.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
@@ -488,26 +542,35 @@
|
|||||||
<span class="c5 c1">a.</span>
|
<span class="c5 c1">a.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c1 c5">Data Collection. </span>
|
<span class="c1 c5">Data Collection. </span>
|
||||||
<span class="c1">The software may collect information about you and your use of the software, and send that to Microsoft.
|
<span class="c1">The software may collect information about you and your use of the software,
|
||||||
Microsoft may use this information to provide services and improve our products and services.
|
and send that to Microsoft.
|
||||||
You may opt out of many of these scenarios, but not all, as described in the product documentation.
|
Microsoft may use this information to provide services and improve our products and
|
||||||
In using the software, you must comply with applicable law. You can learn more about data collection
|
services.
|
||||||
|
You may opt out of many of these scenarios, but not all, as described in the product
|
||||||
|
documentation.
|
||||||
|
In using the software, you must comply with applicable law. You can learn more about data
|
||||||
|
collection
|
||||||
and use in the help documentation and the privacy statement at </span>
|
and use in the help documentation and the privacy statement at </span>
|
||||||
<span class="c14 c1">
|
<span class="c14 c1">
|
||||||
<a class="c9" href="http://go.microsoft.com/fwlink/?LinkId=398505">http://go.microsoft.com/fwlink/?LinkId=398505</a>
|
<a class="c9"
|
||||||
|
href="http://go.microsoft.com/fwlink/?LinkId=398505">http://go.microsoft.com/fwlink/?LinkId=398505</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="c1">.</span>
|
<span class="c1">.</span>
|
||||||
<span class="c3 c1"> Your use of the software operates as your consent to these practices.</span>
|
<span class="c3 c1"> Your use of the software operates as your consent to these
|
||||||
|
practices.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c5 c1">b.</span>
|
<span class="c5 c1">b.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">Processing of Personal Data. </span>
|
<span class="c5 c1">Processing of Personal Data. </span>
|
||||||
<span class="c1">To the extent Microsoft is a processor or subprocessor of personal data in connection with the software,
|
<span class="c1">To the extent Microsoft is a processor or subprocessor of personal data in
|
||||||
Microsoft makes the commitments in the European Union General Data Protection Regulation Terms
|
connection with the software,
|
||||||
|
Microsoft makes the commitments in the European Union General Data Protection Regulation
|
||||||
|
Terms
|
||||||
of the Online Services Terms to all customers effective May 25, 2018, at </span>
|
of the Online Services Terms to all customers effective May 25, 2018, at </span>
|
||||||
<span class="c1 c14">
|
<span class="c1 c14">
|
||||||
<a class="c9" href="http://go.microsoft.com/?linkid=9840733">http://go.microsoft.com/?linkid=9840733</a>
|
<a class="c9"
|
||||||
|
href="http://go.microsoft.com/?linkid=9840733">http://go.microsoft.com/?linkid=9840733</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="c3 c1">.</span>
|
<span class="c3 c1">.</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -515,48 +578,62 @@
|
|||||||
<span class="c5 c1">6.</span>
|
<span class="c5 c1">6.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">FEEDBACK. </span>
|
<span class="c5 c1">FEEDBACK. </span>
|
||||||
<span class="c3 c1">If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the
|
<span class="c3 c1">If you give feedback about the software to Microsoft, you give to Microsoft,
|
||||||
|
without charge, the
|
||||||
right to use, share and commercialize your feedback in any way and for any purpose. You will
|
right to use, share and commercialize your feedback in any way and for any purpose. You will
|
||||||
not give feedback that is subject to a license that requires Microsoft to license its software
|
not give feedback that is subject to a license that requires Microsoft to license its
|
||||||
or documentation to third parties because we include your feedback in them. These rights survive
|
software
|
||||||
|
or documentation to third parties because we include your feedback in them. These rights
|
||||||
|
survive
|
||||||
this agreement.</span>
|
this agreement.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">7.</span>
|
<span class="c5 c1">7.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">SCOPE OF LICENSE.</span>
|
<span class="c5 c1">SCOPE OF LICENSE.</span>
|
||||||
<span class="c3 c1"> The software is licensed, not sold. This agreement only gives you some rights to use the software.
|
<span class="c3 c1"> The software is licensed, not sold. This agreement only gives you some
|
||||||
Microsoft reserves all other rights. Unless applicable law gives you more rights despite this
|
rights to use the software.
|
||||||
|
Microsoft reserves all other rights. Unless applicable law gives you more rights despite
|
||||||
|
this
|
||||||
limitation, you may use the software only as expressly permitted in this agreement. In
|
limitation, you may use the software only as expressly permitted in this agreement. In
|
||||||
doing so, you must comply with any technical limitations in the software that only allow you
|
doing so, you must comply with any technical limitations in the software that only allow you
|
||||||
to use it in certain ways. You may not:</span>
|
to use it in certain ways. You may not:</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c3 c1">- work around any technical limitations in the software;</span>
|
<span class="c3 c1">- work around any technical limitations in the
|
||||||
|
software;</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c3 c1">- reverse engineer, decompile or disassemble the software, or attempt to do so, except
|
<span class="c3 c1">- reverse engineer, decompile or disassemble the software, or
|
||||||
|
attempt to do so, except
|
||||||
and only to the extent required by third party licensing terms governing use of certain open
|
and only to the extent required by third party licensing terms governing use of certain open
|
||||||
source components that may be included with the software;</span>
|
source components that may be included with the software;</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c3 c1">- remove, minimize, block or modify any notices of Microsoft or its suppliers in the
|
<span class="c3 c1">- remove, minimize, block or modify any notices of Microsoft
|
||||||
|
or its suppliers in the
|
||||||
software;
|
software;
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c3 c1">- use the software in any way that is against the law; or</span>
|
<span class="c3 c1">- use the software in any way that is against the law;
|
||||||
|
or</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c3 c1">- share, publish, rent or lease the software, or provide the software as a stand-alone
|
<span class="c3 c1">- share, publish, rent or lease the software, or provide the
|
||||||
|
software as a stand-alone
|
||||||
offering for others to use.</span>
|
offering for others to use.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">8. UPDATES. </span>
|
<span class="c5 c1">8. UPDATES. </span>
|
||||||
<span class="c3 c1">The software may periodically check for updates and download and install them for you. You may obtain
|
<span class="c3 c1">The software may periodically check for updates and download and install
|
||||||
updates only from Microsoft or authorized sources. Microsoft may need to update your system to
|
them for you. You may obtain
|
||||||
provide you with updates. You agree to receive these automatic updates without any additional
|
updates only from Microsoft or authorized sources. Microsoft may need to update your system
|
||||||
notice. Updates may not include or support all existing software features, services, or peripheral
|
to
|
||||||
|
provide you with updates. You agree to receive these automatic updates without any
|
||||||
|
additional
|
||||||
|
notice. Updates may not include or support all existing software features, services, or
|
||||||
|
peripheral
|
||||||
devices.
|
devices.
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -564,57 +641,74 @@
|
|||||||
<span class="c5 c1">9.</span>
|
<span class="c5 c1">9.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">EXPORT RESTRICTIONS.</span>
|
<span class="c5 c1">EXPORT RESTRICTIONS.</span>
|
||||||
<span class="c3 c1"> You must comply with all domestic and international export laws and regulations that apply
|
<span class="c3 c1"> You must comply with all domestic and international export laws and
|
||||||
to the software, which include restrictions on destinations, end users and end use. For further
|
regulations that apply
|
||||||
|
to the software, which include restrictions on destinations, end users and end use. For
|
||||||
|
further
|
||||||
information on export restrictions, visit (aka.ms/exporting).</span>
|
information on export restrictions, visit (aka.ms/exporting).</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">10.</span>
|
<span class="c5 c1">10.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">SUPPORT SERVICES. </span>
|
<span class="c5 c1">SUPPORT SERVICES. </span>
|
||||||
<span class="c3 c1">Because the software is “as is,” we may not provide support services for it.</span>
|
<span class="c3 c1">Because the software is “as is,” we may not provide support
|
||||||
|
services for it.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">11.</span>
|
<span class="c5 c1">11.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">ENTIRE AGREEMENT.</span>
|
<span class="c5 c1">ENTIRE AGREEMENT.</span>
|
||||||
<span class="c3 c1"> This agreement, and the terms for supplements, updates, Internet-based services and support
|
<span class="c3 c1"> This agreement, and the terms for supplements, updates, Internet-based
|
||||||
services that you use, are the entire agreement for the software and support services.</span>
|
services and support
|
||||||
|
services that you use, are the entire agreement for the software and support
|
||||||
|
services.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">12.</span>
|
<span class="c5 c1">12.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">APPLICABLE LAW. </span>
|
<span class="c5 c1">APPLICABLE LAW. </span>
|
||||||
<span class="c3 c1">If you acquired the software in the United States, Washington State law applies to interpretation
|
<span class="c3 c1">If you acquired the software in the United States, Washington State law
|
||||||
of and claims for breach of this agreement, and the laws of the state where you live apply to
|
applies to interpretation
|
||||||
|
of and claims for breach of this agreement, and the laws of the state where you live apply
|
||||||
|
to
|
||||||
all other claims. If you acquired the software in any other country, its laws apply.</span>
|
all other claims. If you acquired the software in any other country, its laws apply.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">13.</span>
|
<span class="c5 c1">13.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">CONSUMER RIGHTS; REGIONAL VARIATIONS. </span>
|
<span class="c5 c1">CONSUMER RIGHTS; REGIONAL VARIATIONS. </span>
|
||||||
<span class="c3 c1">This agreement describes certain legal rights. You may have other rights, including consumer rights,
|
<span class="c3 c1">This agreement describes certain legal rights. You may have other rights,
|
||||||
under the laws of your state or country. Separate and apart from your relationship with Microsoft,
|
including consumer rights,
|
||||||
you may also have rights with respect to the party from which you acquired the software. This
|
under the laws of your state or country. Separate and apart from your relationship with
|
||||||
agreement does not change those other rights if the laws of your state or country do not permit
|
Microsoft,
|
||||||
it to do so. For example, if you acquired the software in one of the below regions, or mandatory
|
you may also have rights with respect to the party from which you acquired the software.
|
||||||
|
This
|
||||||
|
agreement does not change those other rights if the laws of your state or country do not
|
||||||
|
permit
|
||||||
|
it to do so. For example, if you acquired the software in one of the below regions, or
|
||||||
|
mandatory
|
||||||
country law applies, then the following provisions apply to you:</span>
|
country law applies, then the following provisions apply to you:</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c5 c1">a.</span>
|
<span class="c5 c1">a.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">Australia. </span>
|
<span class="c5 c1">Australia. </span>
|
||||||
<span class="c3 c1">You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is
|
<span class="c3 c1">You have statutory guarantees under the Australian Consumer Law and nothing
|
||||||
|
in this agreement is
|
||||||
intended to affect those rights.</span>
|
intended to affect those rights.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
<span class="c5 c1">b.</span>
|
<span class="c5 c1">b.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">Canada. </span>
|
<span class="c5 c1">Canada. </span>
|
||||||
<span class="c3 c1">If you acquired the software in Canada, you may stop receiving updates by turning off the automatic
|
<span class="c3 c1">If you acquired the software in Canada, you may stop receiving updates by
|
||||||
update feature, disconnecting your device from the Internet (if and when you re-connect to the
|
turning off the automatic
|
||||||
Internet, however, the software will resume checking for and installing updates), or uninstalling
|
update feature, disconnecting your device from the Internet (if and when you re-connect to
|
||||||
the software. The product documentation, if any, may also specify how to turn off updates for
|
the
|
||||||
|
Internet, however, the software will resume checking for and installing updates), or
|
||||||
|
uninstalling
|
||||||
|
the software. The product documentation, if any, may also specify how to turn off updates
|
||||||
|
for
|
||||||
your specific device or software.</span>
|
your specific device or software.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c8">
|
<p class="c8">
|
||||||
@@ -627,8 +721,10 @@
|
|||||||
<span class="c5 c1">(i)</span>
|
<span class="c5 c1">(i)</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">Warranty</span>
|
<span class="c5 c1">Warranty</span>
|
||||||
<span class="c3 c1">. The properly licensed software will perform substantially as described in any Microsoft materials
|
<span class="c3 c1">. The properly licensed software will perform substantially as described in
|
||||||
that accompany the software. However, Microsoft gives no contractual guarantee in relation to
|
any Microsoft materials
|
||||||
|
that accompany the software. However, Microsoft gives no contractual guarantee in relation
|
||||||
|
to
|
||||||
the licensed software.</span>
|
the licensed software.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c6">
|
<p class="c6">
|
||||||
@@ -638,74 +734,103 @@
|
|||||||
<span class="c5 c1">(ii)</span>
|
<span class="c5 c1">(ii)</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">Limitation of Liability</span>
|
<span class="c5 c1">Limitation of Liability</span>
|
||||||
<span class="c3 c1">. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as
|
<span class="c3 c1">. In case of intentional conduct, gross negligence, claims based on the
|
||||||
well as, in case of death or personal or physical injury, Microsoft is liable according to the
|
Product Liability Act, as
|
||||||
|
well as, in case of death or personal or physical injury, Microsoft is liable according to
|
||||||
|
the
|
||||||
statutory law.</span>
|
statutory law.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c10">
|
<p class="c10">
|
||||||
<span class="c3 c1">Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft
|
<span class="c3 c1">Subject to the foregoing clause (ii), Microsoft will only be liable for
|
||||||
is in breach of such material contractual obligations, the fulfillment of which facilitate the
|
slight negligence if Microsoft
|
||||||
due performance of this agreement, the breach of which would endanger the purpose of this agreement
|
is in breach of such material contractual obligations, the fulfillment of which facilitate
|
||||||
and the compliance with which a party may constantly trust in (so-called "cardinal obligations").
|
the
|
||||||
In other cases of slight negligence, Microsoft will not be liable for slight negligence.</span>
|
due performance of this agreement, the breach of which would endanger the purpose of this
|
||||||
|
agreement
|
||||||
|
and the compliance with which a party may constantly trust in (so-called "cardinal
|
||||||
|
obligations").
|
||||||
|
In other cases of slight negligence, Microsoft will not be liable for slight
|
||||||
|
negligence.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">14.</span>
|
<span class="c5 c1">14.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c5 c1">LEGAL EFFECT.</span>
|
<span class="c5 c1">LEGAL EFFECT.</span>
|
||||||
<span class="c3 c1"> This agreement describes certain legal rights. You may have other rights under the laws of
|
<span class="c3 c1"> This agreement describes certain legal rights. You may have other
|
||||||
your country. You may also have rights with respect to the party from whom you acquired the software.
|
rights under the laws of
|
||||||
This agreement does not change your rights under the laws of your country if the laws of your
|
your country. You may also have rights with respect to the party from whom you acquired the
|
||||||
|
software.
|
||||||
|
This agreement does not change your rights under the laws of your country if the laws of
|
||||||
|
your
|
||||||
country do not permit it to do so.</span>
|
country do not permit it to do so.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">15.</span>
|
<span class="c5 c1">15.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c4 c1">DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF
|
<span class="c4 c1">DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.”
|
||||||
USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED
|
YOU BEAR THE RISK OF
|
||||||
|
USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT
|
||||||
|
PERMITTED
|
||||||
UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
|
UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.</span>
|
FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c5 c1">16.</span>
|
<span class="c5 c1">16.</span>
|
||||||
<span class="c1"> </span>
|
<span class="c1"> </span>
|
||||||
<span class="c4 c1">LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT
|
<span class="c4 c1">LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND
|
||||||
DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST
|
ITS SUPPLIERS ONLY DIRECT
|
||||||
|
DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL,
|
||||||
|
LOST
|
||||||
PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.</span>
|
PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c0">
|
<p class="c0">
|
||||||
<span class="c3 c1">This limitation applies to (a) anything related to the software, services, content (including code)
|
<span class="c3 c1">This limitation applies to (a) anything related to the software, services,
|
||||||
on third party Internet sites, or third party programs; and (b) claims for breach of contract,
|
content (including code)
|
||||||
breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the
|
on third party Internet sites, or third party programs; and (b) claims for breach of
|
||||||
|
contract,
|
||||||
|
breach of warranty, guarantee or condition, strict liability, negligence, or other tort to
|
||||||
|
the
|
||||||
extent permitted by applicable law.</span>
|
extent permitted by applicable law.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c0">
|
<p class="c0">
|
||||||
<span class="c3 c1">It also applies even if Microsoft knew or should have known about the possibility of the damages.
|
<span class="c3 c1">It also applies even if Microsoft knew or should have known about the
|
||||||
The above limitation or exclusion may not apply to you because your country may not allow the
|
possibility of the damages.
|
||||||
|
The above limitation or exclusion may not apply to you because your country may not allow
|
||||||
|
the
|
||||||
exclusion or limitation of incidental, consequential or other damages.</span>
|
exclusion or limitation of incidental, consequential or other damages.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c12">
|
<p class="c12">
|
||||||
<span class="c4 c1">Please note: As the software is distributed in Quebec, Canada, some of the clauses in this agreement
|
<span class="c4 c1">Please note: As the software is distributed in Quebec, Canada, some of the
|
||||||
|
clauses in this agreement
|
||||||
are provided below in French.</span>
|
are provided below in French.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c12">
|
<p class="c12">
|
||||||
<span class="c4 c1">Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses
|
<span class="c4 c1">Remarque : Ce logiciel étant distribué au Québec,
|
||||||
|
Canada, certaines des clauses
|
||||||
dans ce contrat sont fournies ci-dessous en français.</span>
|
dans ce contrat sont fournies ci-dessous en français.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c5 c1">EXONÉRATION DE GARANTIE.</span>
|
<span class="c5 c1">EXONÉRATION DE GARANTIE.</span>
|
||||||
<span class="c1 c3"> Le logiciel visé par une licence est offert « tel quel ». Toute utilisation
|
<span class="c1 c3"> Le logiciel visé par une licence est offert « tel quel
|
||||||
de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune
|
». Toute utilisation
|
||||||
autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu
|
de ce logiciel est à votre seule risque et péril. Microsoft n’accorde
|
||||||
du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles
|
aucune
|
||||||
sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation
|
autre garantie expresse. Vous pouvez bénéficier de droits additionnels en
|
||||||
|
vertu
|
||||||
|
du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou
|
||||||
|
elles
|
||||||
|
sont permises par le droit locale, les garanties implicites de qualité marchande,
|
||||||
|
d’adéquation
|
||||||
à un usage particulier et d’absence de contrefaçon sont exclues.
|
à un usage particulier et d’absence de contrefaçon sont exclues.
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c5 c1">LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES.</span>
|
<span class="c5 c1">LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE
|
||||||
<span class="c3 c1"> Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages
|
RESPONSABILITÉ POUR LES DOMMAGES.</span>
|
||||||
directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune
|
<span class="c3 c1"> Vous pouvez obtenir de Microsoft et de ses fournisseurs une
|
||||||
|
indemnisation en cas de dommages
|
||||||
|
directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à
|
||||||
|
aucune
|
||||||
indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou
|
indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou
|
||||||
accessoires et pertes de bénéfices.</span>
|
accessoires et pertes de bénéfices.</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -713,26 +838,36 @@
|
|||||||
<span class="c3 c1">Cette limitation concerne :</span>
|
<span class="c3 c1">Cette limitation concerne :</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c3 c1">- tout ce qui est relié au logiciel, aux services ou au contenu
|
<span class="c3 c1">- tout ce qui est relié au logiciel, aux
|
||||||
(y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et</span>
|
services ou au contenu
|
||||||
|
(y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ;
|
||||||
|
et</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c2">
|
<p class="c2">
|
||||||
<span class="c3 c1">- les réclamations au titre de violation de contrat ou de garantie,
|
<span class="c3 c1">- les réclamations au titre de violation
|
||||||
ou au titre de responsabilité stricte, de négligence ou d’une autre faute
|
de contrat ou de garantie,
|
||||||
|
ou au titre de responsabilité stricte, de négligence ou d’une autre
|
||||||
|
faute
|
||||||
dans la limite autorisée par la loi en vigueur.</span>
|
dans la limite autorisée par la loi en vigueur.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c12">
|
<p class="c12">
|
||||||
<span class="c3 c1">Elle s’applique également, même si Microsoft connaissait ou devrait connaître
|
<span class="c3 c1">Elle s’applique également, même si Microsoft connaissait
|
||||||
|
ou devrait connaître
|
||||||
l’éventualité d’un tel dommage. Si votre pays n’autorise pas
|
l’éventualité d’un tel dommage. Si votre pays n’autorise pas
|
||||||
l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires
|
l’exclusion ou la limitation de responsabilité pour les dommages indirects,
|
||||||
ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus
|
accessoires
|
||||||
|
ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion
|
||||||
|
ci-dessus
|
||||||
ne s’appliquera pas à votre égard.</span>
|
ne s’appliquera pas à votre égard.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c16">
|
<p class="c16">
|
||||||
<span class="c5 c1">EFFET JURIDIQUE.</span>
|
<span class="c5 c1">EFFET JURIDIQUE.</span>
|
||||||
<span class="c3 c1"> Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres
|
<span class="c3 c1"> Le présent contrat décrit certains droits juridiques.
|
||||||
droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les
|
Vous pourriez avoir d’autres
|
||||||
droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.</span>
|
droits prévus par les lois de votre pays. Le présent contrat ne modifie pas
|
||||||
|
les
|
||||||
|
droits que vous confèrent les lois de votre pays si celles-ci ne le permettent
|
||||||
|
pas.</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="c15">
|
<p class="c15">
|
||||||
<span class="c3 c1"></span>
|
<span class="c3 c1"></span>
|
||||||
@@ -740,9 +875,9 @@
|
|||||||
<p class="c16">
|
<p class="c16">
|
||||||
<span class="c3 c1"> </span>
|
<span class="c3 c1"> </span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c3 c1">LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are trademarks and/ or copyrights of
|
<span class="c3 c1">@copyrightText@</span>
|
||||||
the LEGO Group. ©2018 The LEGO Group. All rights reserved.</span>
|
|
||||||
</p>
|
</p>
|
||||||
<p class="c11">
|
<p class="c11">
|
||||||
<span class="c3 c1"> </span>
|
<span class="c3 c1"> </span>
|
||||||
@@ -755,27 +890,30 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui center aligned segment">
|
<div id="agree-segment" class="ui center aligned segment hidden">
|
||||||
<input id="agree-checkbox" type="checkbox" autocomplete="off" onchange="agreeCheckboxChanged(this)">
|
<input id="agree-checkbox" type="checkbox" autocomplete="off" onchange="agreeCheckboxChanged(this)">
|
||||||
<label for="agree-checkbox">I agree to these Microsoft Software License Terms and to the
|
<label for="agree-checkbox">I agree to these Microsoft Software License Terms and to the
|
||||||
<a href="https://privacy.microsoft.com/en-us/privacystatement">Microsoft Privacy Statement.</a>
|
<a href="https://privacy.microsoft.com/en-us/privacystatement">Microsoft Privacy Statement.</a>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="no-download-segment" class="ui center aligned segment hidden">
|
||||||
|
<p>Sorry, there is no Offline App available for this editor.</p>
|
||||||
|
</div>
|
||||||
<div id="download-segment" class="ui center aligned segment hidden">
|
<div id="download-segment" class="ui center aligned segment hidden">
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<h3 class="ui">Windows</h3>
|
<h3 class="ui">Windows</h3>
|
||||||
<button class="ui icon button" onclick="downloadWin64()">
|
<a id="download-win64" class="ui icon button" onclick="downloadWin64()">
|
||||||
<i class="download icon"></i>
|
<i class="download icon"></i>
|
||||||
makecode-ev3-setup-win64.exe
|
makecode-@targetid@-setup-win64.exe
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<h3 class="ui">Mac OS</h3>
|
<h3 class="ui">Mac OS</h3>
|
||||||
<button class="ui icon button" onclick="downloadMac64()">
|
<a id="download-mac64" class="ui icon button" onclick="downloadMac64()">
|
||||||
<i class="download icon"></i>
|
<i class="download icon"></i>
|
||||||
makecode-ev3-mac64.zip
|
makecode-@targetid@-mac64.zip
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -788,4 +926,4 @@
|
|||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -10,12 +10,12 @@ You can find out what's connected to the ports on the brick and show its status.
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
Show the status of the ports on the brick when the ``enter`` button is pressed.
|
Show the status of the ports on the brick. Resets all motors when ENTER is pressed.
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
brick.showString("Press ENTER for port status", 1)
|
brick.showPorts()
|
||||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||||
brick.showPorts()
|
motors.resetAll()
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
25
docs/reference/motors/reset-all.md
Normal file
25
docs/reference/motors/reset-all.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# reset All Motors
|
||||||
|
|
||||||
|
Reset all motors currently running on the brick.
|
||||||
|
|
||||||
|
```sig
|
||||||
|
motors.resetAll();
|
||||||
|
```
|
||||||
|
|
||||||
|
The motors counters are resetted.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Tank the EV3 Brick forward at half speed for 5 seconds and then stop.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
motors.largeAB.tank(50, 50);
|
||||||
|
pause(5000);
|
||||||
|
motors.stopAll();
|
||||||
|
motors.resetAll();
|
||||||
|
```
|
||||||
|
|
||||||
|
## See also
|
||||||
|
|
||||||
|
[stop all](/reference/motors/motor/stop-all),
|
||||||
|
[reset](/reference/motors/motor/reset)
|
||||||
@@ -22,4 +22,5 @@ motors.stopAll();
|
|||||||
|
|
||||||
[stop](/reference/motors/motor/stop),
|
[stop](/reference/motors/motor/stop),
|
||||||
[reset](/reference/motors/motor/reset),
|
[reset](/reference/motors/motor/reset),
|
||||||
|
[reset-all](/reference/motors/motor/reset-all),
|
||||||
[set brake](/reference/motors/motor/set-brake)
|
[set brake](/reference/motors/motor/set-brake)
|
||||||
@@ -22,7 +22,7 @@ If you decide to use a **value** of rotation distance, you need to choose a type
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
* **turnRatio**: a [number](/types/number) that is the percentage of speed of the drive motor. The follower motor runs at this speed. A negative number steers to the left and a positive number steers to the right. This is a number between `-100` and `100`.
|
* **turnRatio**: a [number](/types/number) that is the percentage of speed of the drive motor. The follower motor runs at this speed. A negative number steers to the left and a positive number steers to the right. This is a number between `-200` and `200`.
|
||||||
* **speed**: a [number](/types/number) that is the percentage of full speed. A negative value runs the motors in the reverse direction. This is the speed that the drive motor runs at.
|
* **speed**: a [number](/types/number) that is the percentage of full speed. A negative value runs the motors in the reverse direction. This is the speed that the drive motor runs at.
|
||||||
* **value**: the [number](/types/number) of movement units to rotate for. A value of `0` means run the motor continuously.
|
* **value**: the [number](/types/number) of movement units to rotate for. A value of `0` means run the motor continuously.
|
||||||
* **unit**: the movement unit of rotation. This can be `milliseconds`, `seconds`, `degrees`, or `rotations`. If the number for **value** is `0`, this parameter isn't used.
|
* **unit**: the movement unit of rotation. This can be `milliseconds`, `seconds`, `degrees`, or `rotations`. If the number for **value** is `0`, this parameter isn't used.
|
||||||
|
|||||||
BIN
docs/static/tutorials/calibrate-gyro.png
vendored
Normal file
BIN
docs/static/tutorials/calibrate-gyro.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
docs/static/tutorials/drifter.png
vendored
Normal file
BIN
docs/static/tutorials/drifter.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
docs/static/tutorials/move-straight-with-gyro.png
vendored
Normal file
BIN
docs/static/tutorials/move-straight-with-gyro.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
docs/static/tutorials/turn-with-gyro.png
vendored
Normal file
BIN
docs/static/tutorials/turn-with-gyro.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -25,6 +25,11 @@ Step by step guides to coding your @boardname@.
|
|||||||
"description": "Use the color sensor to follow line or detect colors",
|
"description": "Use the color sensor to follow line or detect colors",
|
||||||
"url":"/tutorials/color-sensor",
|
"url":"/tutorials/color-sensor",
|
||||||
"imageUrl":"/static/tutorials/what-color.png"
|
"imageUrl":"/static/tutorials/what-color.png"
|
||||||
|
}, {
|
||||||
|
"name": "Gyro",
|
||||||
|
"description": "Drive straight or turn more precisely with the gyro",
|
||||||
|
"url":"/tutorials/gyro",
|
||||||
|
"imageUrl":"/static/tutorials/calibrate-gyro.png"
|
||||||
}, {
|
}, {
|
||||||
"name": "Ultrasonic Sensor",
|
"name": "Ultrasonic Sensor",
|
||||||
"description": "Use the ultrasonic sensor to detect obstacles",
|
"description": "Use the ultrasonic sensor to detect obstacles",
|
||||||
|
|||||||
37
docs/tutorials/calibrate-gyro.md
Normal file
37
docs/tutorials/calibrate-gyro.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Calibrate Gyro
|
||||||
|
|
||||||
|
## Introduction @fullscreen
|
||||||
|
|
||||||
|
The gyroscope is a very useful sensor in the EV3 system. It detects the rotation rate
|
||||||
|
which can be very useful to correct the trajectory of the robot and do precise turns.
|
||||||
|
|
||||||
|
However, the sensor can be imprecise and subject to drifting. It is recommend to
|
||||||
|
calibrate your sensor at least once after starting your brick. You don't have to
|
||||||
|
recalibrate on every run.
|
||||||
|
|
||||||
|
* [EV3 Driving Base](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)
|
||||||
|
* [EV3 Driving Base with Gyro](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-gyro-sensor-driving-base-a521f8ebe355c281c006418395309e15.pdf)
|
||||||
|
|
||||||
|
|
||||||
|
## Step 1 Show ports
|
||||||
|
|
||||||
|
Add the ``||brick:show ports||`` to see the status of the gyroscope.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
brick.showPorts()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Step 2 Calibration
|
||||||
|
|
||||||
|
Add a ``||sensors:calibrate gyro||`` block to calibrate the gyro. The block
|
||||||
|
detects if the sensor is present and does a full reset of the sensor if necessary.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
brick.showPorts()
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 3 Download and run @fullscreen
|
||||||
|
|
||||||
|
Download this program to your brick and press the ENTER button.
|
||||||
@@ -20,8 +20,31 @@
|
|||||||
"name": "Crane Mission / Video 1",
|
"name": "Crane Mission / Video 1",
|
||||||
"description": "A video of the Robot 1 tutorial",
|
"description": "A video of the Robot 1 tutorial",
|
||||||
"youTubeId": "IqL0Pyeu5Ng"
|
"youTubeId": "IqL0Pyeu5Ng"
|
||||||
}
|
}, {
|
||||||
]
|
"name": "Bluetooth download (beta)",
|
||||||
|
"description": "EXPERIMENTAL! Learn how to download code via Bluetooth.",
|
||||||
|
"youTubeId": "VIq8-6Egtqs"
|
||||||
|
}, {
|
||||||
|
"name": "Turn with Gyro",
|
||||||
|
"description": "Use the gyro for precise turns.",
|
||||||
|
"youTubeId": "I7ncuXAfBwk"
|
||||||
|
}, {
|
||||||
|
"name": "Moving with Gyro",
|
||||||
|
"description": "Use the gyro for correct the robot trajectory.",
|
||||||
|
"youTubeId": "ufiOPvW37xc"
|
||||||
|
}, {
|
||||||
|
"name": "Line following with 1 color sensor",
|
||||||
|
"description": "Simple line following using the color sensor.",
|
||||||
|
"youTubeId": "_LeduyKQVjg"
|
||||||
|
}, {
|
||||||
|
"name": "Proportional line following with 1 color sensor",
|
||||||
|
"description": "Proportional line following using the color sensor.",
|
||||||
|
"youTubeId": "-AirqwC9DL4"
|
||||||
|
}, {
|
||||||
|
"name": "Proportional line following with 2 color sensors",
|
||||||
|
"description": "Proportional line following using two color sensor.",
|
||||||
|
"youTubeId": "QWOflBuu9Oo"
|
||||||
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
## See Also
|
## See Also
|
||||||
|
|||||||
34
docs/tutorials/drifter.md
Normal file
34
docs/tutorials/drifter.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Drifter
|
||||||
|
|
||||||
|
Use this program to try out the gyro sensor and the effect of drifting.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// this loop shows the rate, angle and drift of the robot
|
||||||
|
forever(() => {
|
||||||
|
brick.showValue("rate", sensors.gyro2.rate(), 1)
|
||||||
|
brick.showValue("angle", sensors.gyro2.angle(), 2)
|
||||||
|
brick.showValue("drift", sensors.gyro2.drift(), 3)
|
||||||
|
})
|
||||||
|
// this loop shows wheter the sensor is calibrating
|
||||||
|
forever(() => {
|
||||||
|
brick.showString(sensors.gyro2.isCalibrating() ? "calibrating..." : "", 4)
|
||||||
|
})
|
||||||
|
// instructions on how to use the buttons
|
||||||
|
brick.showString("ENTER: calibrate", 7)
|
||||||
|
brick.showString(" (reset+drift)", 8)
|
||||||
|
brick.showString("LEFT: reset", 9)
|
||||||
|
brick.showString("RIGHT: compute drift", 10)
|
||||||
|
|
||||||
|
// enter -> calibrate
|
||||||
|
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
})
|
||||||
|
// right -> compute drift
|
||||||
|
brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||||
|
sensors.gyro2.computeDrift()
|
||||||
|
})
|
||||||
|
// left -> reset
|
||||||
|
brick.buttonLeft.onEvent(ButtonEvent.Pressed, function () {
|
||||||
|
sensors.gyro2.reset()
|
||||||
|
})
|
||||||
|
```
|
||||||
31
docs/tutorials/gyro.md
Normal file
31
docs/tutorials/gyro.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Gyro tutorials
|
||||||
|
|
||||||
|
## Tutorials
|
||||||
|
|
||||||
|
```codecard
|
||||||
|
[{
|
||||||
|
"name": "Calibrate",
|
||||||
|
"description": "Make sure you gyro sensor is ready to use",
|
||||||
|
"cardType": "tutorial",
|
||||||
|
"url":"/tutorials/calibrate-gyro",
|
||||||
|
"imageUrl":"/static/tutorials/calibrate-gyro.png"
|
||||||
|
}, {
|
||||||
|
"name": "Turn",
|
||||||
|
"description": "Use the gyro to turn precisely",
|
||||||
|
"cardType": "tutorial",
|
||||||
|
"url":"/tutorials/turn-with-gyro",
|
||||||
|
"imageUrl":"/static/tutorials/turn-with-gyro.png"
|
||||||
|
}, {
|
||||||
|
"name": "Move Straight",
|
||||||
|
"description": "Use the gyro to correct the trajectory of the robot",
|
||||||
|
"cardType": "tutorial",
|
||||||
|
"url":"/tutorials/move-straight-with-gyro",
|
||||||
|
"imageUrl":"/static/tutorials/move-straight-with-gyro.png"
|
||||||
|
}, {
|
||||||
|
"name": "Drifter",
|
||||||
|
"description": "Explore how the gyro is drifting",
|
||||||
|
"cardType": "example",
|
||||||
|
"url":"/tutorials/drifter",
|
||||||
|
"imageUrl":"/static/tutorials/drifter.png"
|
||||||
|
}]
|
||||||
|
```
|
||||||
61
docs/tutorials/move-straight-with-gyro.md
Normal file
61
docs/tutorials/move-straight-with-gyro.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Move Straight With Gyro
|
||||||
|
|
||||||
|
## Introduction @fullscreen
|
||||||
|
|
||||||
|
Rotating using a wheel is not precise. The wheel can slip or the motors
|
||||||
|
can be slightly different.
|
||||||
|
With the help of the gyro you can detect and correct deviations in your trajectory.
|
||||||
|
|
||||||
|
* [EV3 Driving Base](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)
|
||||||
|
* [EV3 Driving Base with Gyro](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-gyro-sensor-driving-base-a521f8ebe355c281c006418395309e15.pdf)
|
||||||
|
|
||||||
|
|
||||||
|
## Step 1 Calibration
|
||||||
|
|
||||||
|
Add a ``||sensors:calibrate gyro||`` block in a ``||brick:on button enter pressed||`` block so that you can manually start a calibration process. Run the calibration
|
||||||
|
at least once after connecting the gyro.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
brick.showPorts()
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 2 Compute the error
|
||||||
|
|
||||||
|
Make a new **error** variable and drag the ``||sensors:gyro rate||``
|
||||||
|
and multiply it by -1. Since the rate shows the rotation rate, we will
|
||||||
|
counter it by negating it.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
let error = 0
|
||||||
|
brick.showPorts()
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
while (true) {
|
||||||
|
error = sensors.gyro2.rate() * -1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 3 Steer with feedback
|
||||||
|
|
||||||
|
Drag a ``||motors:steer motors||`` block under the variable and pass
|
||||||
|
the **error** variable into the turn ratio section.
|
||||||
|
|
||||||
|
If the robot is turning right, the gyro will report a positive rotation rate
|
||||||
|
and the turn ratio will be negative which will the turn the robot left!
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
let error = 0
|
||||||
|
brick.showPorts()
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
while (true) {
|
||||||
|
error = sensors.gyro2.rate() * -1
|
||||||
|
motors.largeBC.steer(error, 50)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 4 Run it!
|
||||||
|
|
||||||
|
Download to your brick and test out if the robot is going straight.
|
||||||
|
|
||||||
|
This kind of technique is called a proportional controller;
|
||||||
|
it corrects the inputs (motor speed) with a feedback proportional to the output (rotation rate).
|
||||||
43
docs/tutorials/turn-with-gyro.md
Normal file
43
docs/tutorials/turn-with-gyro.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Turn With Gyro
|
||||||
|
|
||||||
|
## Introduction @fullscreen
|
||||||
|
|
||||||
|
Use the gyro to measure how much the robot is turning, regardless if your wheels are slipping.
|
||||||
|
|
||||||
|
## Step 1 Calibrate
|
||||||
|
|
||||||
|
Add the ``||sensors:calibrate gyro||`` block to make sure your gyro is ready to use.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 2 Turn
|
||||||
|
|
||||||
|
Use motor blocks to make the robot turn. Don't go too fast!
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
motors.largeBC.steer(200, 20)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 3 Pause for turn
|
||||||
|
|
||||||
|
Use the ``||sensors:pause until rotated||`` block to wait until the desired amount of rotation has occured.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
motors.largeBC.steer(200, 20)
|
||||||
|
sensors.gyro2.pauseUntilRotated(90)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 4 Stop
|
||||||
|
|
||||||
|
Stop the motors!
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
motors.largeBC.steer(200, 20)
|
||||||
|
sensors.gyro2.pauseUntilRotated(90)
|
||||||
|
motors.stopAll()
|
||||||
|
```
|
||||||
111
editor/deploy.ts
111
editor/deploy.ts
@@ -4,7 +4,12 @@
|
|||||||
import UF2 = pxtc.UF2;
|
import UF2 = pxtc.UF2;
|
||||||
import { Ev3Wrapper } from "./wrap";
|
import { Ev3Wrapper } from "./wrap";
|
||||||
|
|
||||||
export let ev3: Ev3Wrapper
|
export let ev3: Ev3Wrapper;
|
||||||
|
let confirmAsync: (options: any) => Promise<number>;
|
||||||
|
|
||||||
|
export function setConfirmAsync(cf: (options: any) => Promise<number>) {
|
||||||
|
confirmAsync = cf;
|
||||||
|
}
|
||||||
|
|
||||||
export function debug() {
|
export function debug() {
|
||||||
return initHidAsync()
|
return initHidAsync()
|
||||||
@@ -59,14 +64,9 @@ class WebSerialPackageIO implements pxt.HF2.PacketIO {
|
|||||||
private _writer: any;
|
private _writer: any;
|
||||||
|
|
||||||
constructor(private port: SerialPort, private options: SerialOptions) {
|
constructor(private port: SerialPort, private options: SerialOptions) {
|
||||||
|
|
||||||
// start reading
|
|
||||||
this.readSerialAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async readSerialAsync() {
|
async readSerialAsync() {
|
||||||
if (this._reader) return;
|
|
||||||
|
|
||||||
this._reader = this.port.readable.getReader();
|
this._reader = this.port.readable.getReader();
|
||||||
let buffer: Uint8Array;
|
let buffer: Uint8Array;
|
||||||
const reader = this._reader;
|
const reader = this._reader;
|
||||||
@@ -100,9 +100,7 @@ class WebSerialPackageIO implements pxt.HF2.PacketIO {
|
|||||||
baudrate: 460800,
|
baudrate: 460800,
|
||||||
buffersize: 4096
|
buffersize: 4096
|
||||||
};
|
};
|
||||||
await port.open(options);
|
return new WebSerialPackageIO(port, options);
|
||||||
if (port)
|
|
||||||
return new WebSerialPackageIO(port, options);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(`connection error`, e)
|
console.log(`connection error`, e)
|
||||||
}
|
}
|
||||||
@@ -115,27 +113,32 @@ class WebSerialPackageIO implements pxt.HF2.PacketIO {
|
|||||||
throw new Error(lf("error on brick ({0})", msg))
|
throw new Error(lf("error on brick ({0})", msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
private close() {
|
private openAsync() {
|
||||||
if (this.port.readable) {// it's open
|
console.log(`serial: opening port`)
|
||||||
this.port.close();
|
if (!!this._reader) return Promise.resolve();
|
||||||
this._reader = undefined;
|
this._reader = undefined;
|
||||||
this._writer = undefined;
|
this._writer = undefined;
|
||||||
}
|
return this.port.open(this.options)
|
||||||
|
.then(() => {
|
||||||
|
this.readSerialAsync();
|
||||||
|
return Promise.resolve();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async reconnectAsync(): Promise<void> {
|
private closeAsync() {
|
||||||
if (!this.port.readable) {
|
console.log(`serial: closing port`);
|
||||||
this._reader = undefined;
|
this.port.close();
|
||||||
this._writer = undefined;
|
this._reader = undefined;
|
||||||
await this.port.open(this.options);
|
this._writer = undefined;
|
||||||
this.readSerialAsync();
|
return Promise.delay(500);
|
||||||
}
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async disconnectAsync(): Promise<void> {
|
reconnectAsync(): Promise<void> {
|
||||||
this.close();
|
return this.openAsync();
|
||||||
return Promise.resolve();
|
}
|
||||||
|
|
||||||
|
disconnectAsync(): Promise<void> {
|
||||||
|
return this.closeAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPacketAsync(pkt: Uint8Array): Promise<void> {
|
sendPacketAsync(pkt: Uint8Array): Promise<void> {
|
||||||
@@ -169,7 +172,7 @@ export function initAsync(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (WebSerialPackageIO.isSupported())
|
if (WebSerialPackageIO.isSupported())
|
||||||
pxt.tickEvent("bluetooth.supported");
|
pxt.tickEvent("webserial.supported");
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
@@ -178,12 +181,23 @@ export function canUseWebSerial() {
|
|||||||
return WebSerialPackageIO.isSupported();
|
return WebSerialPackageIO.isSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function enableWebSerial() {
|
export function enableWebSerialAsync() {
|
||||||
initPromise = undefined;
|
initPromise = undefined;
|
||||||
useWebSerial = WebSerialPackageIO.isSupported();
|
useWebSerial = WebSerialPackageIO.isSupported();
|
||||||
useHID = useWebSerial;
|
useHID = useWebSerial;
|
||||||
if (useWebSerial)
|
if (useWebSerial)
|
||||||
initHidAsync().done();
|
return initHidAsync().then(() => { });
|
||||||
|
else return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanupAsync() {
|
||||||
|
if (ev3) {
|
||||||
|
console.log('cleanup previous port')
|
||||||
|
return ev3.disconnectAsync()
|
||||||
|
.catch(e => { })
|
||||||
|
.finally(() => { ev3 = undefined; });
|
||||||
|
}
|
||||||
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
let initPromise: Promise<Ev3Wrapper>
|
let initPromise: Promise<Ev3Wrapper>
|
||||||
@@ -191,15 +205,14 @@ function initHidAsync() { // needs to run within a click handler
|
|||||||
if (initPromise)
|
if (initPromise)
|
||||||
return initPromise
|
return initPromise
|
||||||
if (useHID) {
|
if (useHID) {
|
||||||
initPromise = hf2Async()
|
initPromise = cleanupAsync()
|
||||||
|
.then(() => hf2Async())
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
initPromise = null
|
initPromise = null
|
||||||
useHID = false;
|
useHID = false;
|
||||||
useWebSerial = false;
|
useWebSerial = false;
|
||||||
// cleanup
|
return Promise.reject(err);
|
||||||
let p = ev3 ? ev3.disconnectAsync().catch(e => { }) : Promise.resolve();
|
|
||||||
return p.then(() => Promise.reject(err))
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
useHID = false
|
useHID = false
|
||||||
@@ -210,6 +223,7 @@ function initHidAsync() { // needs to run within a click handler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this comes from aux/pxt.lms
|
// this comes from aux/pxt.lms
|
||||||
|
const fspath = "../prjs/BrkProg_SAVE/"
|
||||||
const rbfTemplate = `
|
const rbfTemplate = `
|
||||||
4c45474f580000006d000100000000001c000000000000000e000000821b038405018130813e8053
|
4c45474f580000006d000100000000001c000000000000000e000000821b038405018130813e8053
|
||||||
74617274696e672e2e2e0084006080XX00448581644886488405018130813e80427965210084000a
|
74617274696e672e2e2e0084006080XX00448581644886488405018130813e80427965210084000a
|
||||||
@@ -218,8 +232,6 @@ export function deployCoreAsync(resp: pxtc.CompileResult) {
|
|||||||
let filename = resp.downloadFileBaseName || "pxt"
|
let filename = resp.downloadFileBaseName || "pxt"
|
||||||
filename = filename.replace(/^lego-/, "")
|
filename = filename.replace(/^lego-/, "")
|
||||||
|
|
||||||
let fspath = "../prjs/BrkProg_SAVE/"
|
|
||||||
|
|
||||||
let elfPath = fspath + filename + ".elf"
|
let elfPath = fspath + filename + ".elf"
|
||||||
let rbfPath = fspath + filename + ".rbf"
|
let rbfPath = fspath + filename + ".rbf"
|
||||||
|
|
||||||
@@ -261,7 +273,7 @@ export function deployCoreAsync(resp: pxtc.CompileResult) {
|
|||||||
|
|
||||||
if (!useHID) return saveUF2Async()
|
if (!useHID) return saveUF2Async()
|
||||||
|
|
||||||
pxt.tickEvent("bluetooth.flash");
|
pxt.tickEvent("webserial.flash");
|
||||||
let w: Ev3Wrapper;
|
let w: Ev3Wrapper;
|
||||||
return initHidAsync()
|
return initHidAsync()
|
||||||
.then(w_ => {
|
.then(w_ => {
|
||||||
@@ -269,18 +281,41 @@ export function deployCoreAsync(resp: pxtc.CompileResult) {
|
|||||||
if (w.isStreaming)
|
if (w.isStreaming)
|
||||||
pxt.U.userError("please stop the program first")
|
pxt.U.userError("please stop the program first")
|
||||||
return w.reconnectAsync(false)
|
return w.reconnectAsync(false)
|
||||||
|
.catch(e => {
|
||||||
|
// user easily forgets to stop robot
|
||||||
|
if (confirmAsync)
|
||||||
|
return confirmAsync({
|
||||||
|
header: lf("Bluetooth download failed..."),
|
||||||
|
htmlBody:
|
||||||
|
`<ul>
|
||||||
|
<li>${lf("Make sure to stop your program or exit portview on the EV3.")}</li>
|
||||||
|
<li>${lf("Check your battery level.")}</li>
|
||||||
|
<li>${lf("Close EV3 LabView or other MakeCode editor tabs.")}
|
||||||
|
</ul>`,
|
||||||
|
hasCloseIcon: true,
|
||||||
|
hideCancel: true,
|
||||||
|
hideAgree: false,
|
||||||
|
agreeLbl: lf("Try again"),
|
||||||
|
}).then(() => w.disconnectAsync())
|
||||||
|
.then(() => Promise.delay(1000))
|
||||||
|
.then(() => w.reconnectAsync());
|
||||||
|
|
||||||
|
// nothing we can do
|
||||||
|
return Promise.reject(e);
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then(() => w.stopAsync())
|
.then(() => w.stopAsync())
|
||||||
.then(() => w.rmAsync(elfPath))
|
.then(() => w.rmAsync(elfPath))
|
||||||
.then(() => w.flashAsync(elfPath, UF2.readBytes(origElfUF2, 0, origElfUF2.length * 256)))
|
.then(() => w.flashAsync(elfPath, UF2.readBytes(origElfUF2, 0, origElfUF2.length * 256)))
|
||||||
.then(() => w.flashAsync(rbfPath, rbfBIN))
|
.then(() => w.flashAsync(rbfPath, rbfBIN))
|
||||||
.then(() => w.runAsync(rbfPath))
|
.then(() => w.runAsync(rbfPath))
|
||||||
|
.then(() => Promise.delay(500))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
pxt.tickEvent("bluetooth.success");
|
pxt.tickEvent("webserial.success");
|
||||||
return w.disconnectAsync()
|
return w.disconnectAsync()
|
||||||
//return Promise.delay(1000).then(() => w.dmesgAsync())
|
//return Promise.delay(1000).then(() => w.dmesgAsync())
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
pxt.tickEvent("bluetooth.fail");
|
pxt.tickEvent("webserial.fail");
|
||||||
useHID = false;
|
useHID = false;
|
||||||
useWebSerial = false;
|
useWebSerial = false;
|
||||||
// if we failed to initalize, tell the user to retry
|
// if we failed to initalize, tell the user to retry
|
||||||
|
|||||||
@@ -1,13 +1,23 @@
|
|||||||
/// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts"/>
|
/// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts"/>
|
||||||
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
|
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
|
||||||
|
|
||||||
import { deployCoreAsync, initAsync, canUseWebSerial, enableWebSerial } from "./deploy";
|
import { deployCoreAsync, initAsync, canUseWebSerial, enableWebSerialAsync, setConfirmAsync } from "./deploy";
|
||||||
|
|
||||||
|
let bluetoothDialogShown = false;
|
||||||
pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
|
pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
|
||||||
|
const projectView = opts.projectView;
|
||||||
pxt.debug('loading pxt-ev3 target extensions...')
|
pxt.debug('loading pxt-ev3 target extensions...')
|
||||||
|
|
||||||
|
function enableWebSerialAndCompileAsync() {
|
||||||
|
return enableWebSerialAsync()
|
||||||
|
.then(() => Promise.delay(500))
|
||||||
|
.then(() => projectView.compile());
|
||||||
|
}
|
||||||
|
|
||||||
const res: pxt.editor.ExtensionResult = {
|
const res: pxt.editor.ExtensionResult = {
|
||||||
deployCoreAsync,
|
deployCoreAsync,
|
||||||
showUploadInstructionsAsync: (fn: string, url: string, confirmAsync: (options: any) => Promise<number>) => {
|
showUploadInstructionsAsync: (fn: string, url: string, confirmAsync: (options: any) => Promise<number>) => {
|
||||||
|
setConfirmAsync(confirmAsync);
|
||||||
// https://msdn.microsoft.com/en-us/library/cc848897.aspx
|
// https://msdn.microsoft.com/en-us/library/cc848897.aspx
|
||||||
// "For security reasons, data URIs are restricted to downloaded resources.
|
// "For security reasons, data URIs are restricted to downloaded resources.
|
||||||
// Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements"
|
// Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements"
|
||||||
@@ -80,29 +90,30 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
|||||||
className: "bluetooth focused",
|
className: "bluetooth focused",
|
||||||
onclick: () => {
|
onclick: () => {
|
||||||
pxt.tickEvent("bluetooth.enable");
|
pxt.tickEvent("bluetooth.enable");
|
||||||
confirmAsync({
|
if (bluetoothDialogShown) {
|
||||||
header: lf("Bluetooth enabled"),
|
enableWebSerialAndCompileAsync().done();
|
||||||
hasCloseIcon: true,
|
} else {
|
||||||
hideCancel: true,
|
bluetoothDialogShown = true;
|
||||||
buttons: [{
|
confirmAsync({
|
||||||
label: lf("Help"),
|
header: lf("Bluetooth pairing"),
|
||||||
icon: "question circle",
|
hasCloseIcon: true,
|
||||||
className: "lightgrey",
|
hideCancel: true,
|
||||||
url: "/bluetooth"
|
buttons: [{
|
||||||
}],
|
label: lf("Help"),
|
||||||
htmlBody: `
|
icon: "question circle",
|
||||||
<p>
|
className: "lightgrey",
|
||||||
${lf("Download again to send your code to the EV3 over Bluetooth. Make sure to stop your program!")}
|
url: "/bluetooth"
|
||||||
</p>
|
}],
|
||||||
<p>
|
htmlBody: `<p>
|
||||||
${lf("You will be prompted to select a serial port.")}
|
${lf("You will be prompted to select a serial port.")}
|
||||||
${lf("On Windows, look for 'Standard Serial over Bluetooth link'.")}
|
${pxt.BrowserUtils.isWindows()
|
||||||
|
? lf("Look for 'Standard Serial over Bluetooth link'.")
|
||||||
|
: lf("Loop for 'cu.EV3-SerialPort'.")}
|
||||||
${lf("If you have paired multiple EV3, you might have to try out multiple ports until you find the correct one.")}
|
${lf("If you have paired multiple EV3, you might have to try out multiple ports until you find the correct one.")}
|
||||||
</p>
|
</p>
|
||||||
`
|
`
|
||||||
}).then(() => {
|
}).then(() => enableWebSerialAndCompileAsync())
|
||||||
enableWebSerial();
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} : undefined, downloadAgain ? {
|
} : undefined, downloadAgain ? {
|
||||||
label: fn,
|
label: fn,
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* See https://www.lego.com/cdn/cs/set/assets/blt6879b00ae6951482/LEGO_MINDSTORMS_EV3_Communication_Developer_Kit.pdf
|
||||||
|
* https://github.com/mindboards/ev3sources/blob/master/lms2012/lms2012/source/bytecodes.h#L146
|
||||||
|
*/
|
||||||
import HF2 = pxt.HF2
|
import HF2 = pxt.HF2
|
||||||
import U = pxt.U
|
import U = pxt.U
|
||||||
|
|
||||||
function log(msg: string) {
|
function log(msg: string) {
|
||||||
pxt.debug("EWRAP: " + msg)
|
pxt.log("serial: " + msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DirEntry {
|
export interface DirEntry {
|
||||||
@@ -13,13 +17,14 @@ export interface DirEntry {
|
|||||||
|
|
||||||
const runTemplate = "C00882010084XX0060640301606400"
|
const runTemplate = "C00882010084XX0060640301606400"
|
||||||
const usbMagic = 0x3d3f
|
const usbMagic = 0x3d3f
|
||||||
|
const DIRECT_COMMAND_NO_REPLY = 0x80
|
||||||
|
|
||||||
export class Ev3Wrapper {
|
export class Ev3Wrapper {
|
||||||
msgs = new U.PromiseBuffer<Uint8Array>()
|
msgs = new U.PromiseBuffer<Uint8Array>()
|
||||||
private cmdSeq = U.randomUint32() & 0xffff;
|
private cmdSeq = U.randomUint32() & 0xffff;
|
||||||
private lock = new U.PromiseQueue();
|
private lock = new U.PromiseQueue();
|
||||||
isStreaming = false;
|
isStreaming = false;
|
||||||
dataDump = false;
|
dataDump = /talkdbg=1/.test(window.location.href);
|
||||||
|
|
||||||
constructor(public io: pxt.HF2.PacketIO) {
|
constructor(public io: pxt.HF2.PacketIO) {
|
||||||
io.onData = buf => {
|
io.onData = buf => {
|
||||||
@@ -89,7 +94,7 @@ export class Ev3Wrapper {
|
|||||||
runAsync(path: string) {
|
runAsync(path: string) {
|
||||||
let codeHex = runTemplate.replace("XX", U.toHex(U.stringToUint8Array(path)))
|
let codeHex = runTemplate.replace("XX", U.toHex(U.stringToUint8Array(path)))
|
||||||
let code = U.fromHex(codeHex)
|
let code = U.fromHex(codeHex)
|
||||||
let pkt = this.allocCore(2 + code.length, 0)
|
let pkt = this.allocCore(2 + code.length, DIRECT_COMMAND_NO_REPLY)
|
||||||
HF2.write16(pkt, 5, 0x0800)
|
HF2.write16(pkt, 5, 0x0800)
|
||||||
U.memcpy(pkt, 7, code)
|
U.memcpy(pkt, 7, code)
|
||||||
log(`run ${path}`)
|
log(`run ${path}`)
|
||||||
|
|||||||
@@ -76,9 +76,10 @@ export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCust
|
|||||||
};
|
};
|
||||||
|
|
||||||
setReadout_(readout: Element, value: string) {
|
setReadout_(readout: Element, value: string) {
|
||||||
this.updateSpeed(parseFloat(value));
|
let x = parseFloat(value) || 0;
|
||||||
|
this.updateSpeed(x);
|
||||||
// Update reporter
|
// Update reporter
|
||||||
this.reporter.textContent = `${value}%`;
|
this.reporter.textContent = `${x}%`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateSpeed(speed: number) {
|
private updateSpeed(speed: number) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class FieldTurnRatio extends Blockly.FieldSlider implements Blockly.Field
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
constructor(value_: any, params: FieldTurnRatioOptions, opt_validator?: Function) {
|
constructor(value_: any, params: FieldTurnRatioOptions, opt_validator?: Function) {
|
||||||
super(String(value_), '-100', '100', null, '10', 'TurnRatio', opt_validator);
|
super(String(value_), '-200', '200', null, '10', 'TurnRatio', opt_validator);
|
||||||
this.params = params;
|
this.params = params;
|
||||||
(this as any).sliderColor_ = '#a8aaa8';
|
(this as any).sliderColor_ = '#a8aaa8';
|
||||||
}
|
}
|
||||||
@@ -76,26 +76,26 @@ export class FieldTurnRatio extends Blockly.FieldSlider implements Blockly.Field
|
|||||||
if (!this.path_) {
|
if (!this.path_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let v = goog.math.clamp(parseFloat(this.getText()), -100, 100);
|
let v = goog.math.clamp(parseFloat(this.getText()), -200, 200);
|
||||||
if (isNaN(v)) {
|
if (isNaN(v)) {
|
||||||
v = 0;
|
v = 0;
|
||||||
}
|
}
|
||||||
|
const x = v / 100;
|
||||||
const x = goog.math.clamp(parseFloat(this.getText()), -100, 100) / 100;
|
const nx = Math.max(-1, Math.min(1, x));
|
||||||
const theta = x * Math.PI / 2;
|
const theta = Math.max(nx) * Math.PI / 2;
|
||||||
const cx = FieldTurnRatio.HALF;
|
const r = FieldTurnRatio.RADIUS - 6;
|
||||||
const cy = FieldTurnRatio.HALF - 14;
|
let cx = FieldTurnRatio.HALF;
|
||||||
const gamma = Math.PI - 2 * theta;
|
const cy = FieldTurnRatio.HALF - 22;
|
||||||
const r = FieldTurnRatio.RADIUS;
|
if (Math.abs(x) > 1) {
|
||||||
const alpha = 0.2 + Math.abs(x) * 0.5;
|
cx -= (x - (x > 0 ? 1 : -1)) * r / 2; // move center of circle
|
||||||
const x1 = 0;
|
}
|
||||||
|
const alpha = 0.2 + Math.abs(nx) * 0.5;
|
||||||
const y1 = r * alpha;
|
const y1 = r * alpha;
|
||||||
const y2 = r * Math.sin(Math.PI / 2 - theta);
|
const y2 = r * Math.sin(Math.PI / 2 - theta);
|
||||||
const x2 = r * Math.cos(Math.PI / 2 - theta);
|
const x2 = r * Math.cos(Math.PI / 2 - theta);
|
||||||
const y3 = y2 - r * alpha * Math.cos(2 * theta);
|
const y3 = y2 - r * alpha * Math.cos(2 * theta);
|
||||||
const x3 = x2 - r * alpha * Math.sin(2 * theta);
|
const x3 = x2 - r * alpha * Math.sin(2 * theta);
|
||||||
|
|
||||||
|
|
||||||
const d = `M ${cx} ${cy} C ${cx} ${cy - y1} ${cx + x3} ${cy - y3} ${cx + x2} ${cy - y2}`;
|
const d = `M ${cx} ${cy} C ${cx} ${cy - y1} ${cx + x3} ${cy - y3} ${cx + x2} ${cy - y2}`;
|
||||||
this.path_.setAttribute('d', d);
|
this.path_.setAttribute('d', d);
|
||||||
|
|
||||||
|
|||||||
@@ -73,13 +73,7 @@ namespace sensors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setMode(m: ColorSensorMode) {
|
setMode(m: ColorSensorMode) {
|
||||||
if (m == ColorSensorMode.AmbientLightIntensity) {
|
// don't change threshold after initialization
|
||||||
this.thresholdDetector.setLowThreshold(5);
|
|
||||||
this.thresholdDetector.setHighThreshold(20);
|
|
||||||
} else {
|
|
||||||
this.thresholdDetector.setLowThreshold(20);
|
|
||||||
this.thresholdDetector.setHighThreshold(80);
|
|
||||||
}
|
|
||||||
this._setMode(m)
|
this._setMode(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +105,9 @@ namespace sensors {
|
|||||||
"red",
|
"red",
|
||||||
"white",
|
"white",
|
||||||
"brown"][this._query()];
|
"brown"][this._query()];
|
||||||
|
case ColorSensorMode.AmbientLightIntensity:
|
||||||
|
case ColorSensorMode.ReflectedLightIntensity:
|
||||||
|
return `${this._query()}%`;
|
||||||
default:
|
default:
|
||||||
return this._query().toString();
|
return this._query().toString();
|
||||||
}
|
}
|
||||||
@@ -253,7 +250,7 @@ namespace sensors {
|
|||||||
light(mode: LightIntensityMode) {
|
light(mode: LightIntensityMode) {
|
||||||
this.poke();
|
this.poke();
|
||||||
this.setMode(<ColorSensorMode><number>mode)
|
this.setMode(<ColorSensorMode><number>mode)
|
||||||
switch(mode) {
|
switch (mode) {
|
||||||
case LightIntensityMode.ReflectedRaw:
|
case LightIntensityMode.ReflectedRaw:
|
||||||
return this.reflectedLightRaw();
|
return this.reflectedLightRaw();
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ namespace sensors.internal {
|
|||||||
this.devType = DAL.DEVICE_TYPE_NONE
|
this.devType = DAL.DEVICE_TYPE_NONE
|
||||||
this.iicid = ''
|
this.iicid = ''
|
||||||
this.sensors = []
|
this.sensors = []
|
||||||
this.poller = new Poller(50, () => this.query(), (prev, curr) => this.update(prev, curr));
|
this.poller = new Poller(25, () => this.query(), (prev, curr) => this.update(prev, curr));
|
||||||
}
|
}
|
||||||
|
|
||||||
poke() {
|
poke() {
|
||||||
@@ -121,7 +121,7 @@ namespace sensors.internal {
|
|||||||
|
|
||||||
powerMM = control.mmap("/dev/lms_power", 2, 0)
|
powerMM = control.mmap("/dev/lms_power", 2, 0)
|
||||||
|
|
||||||
devPoller = new Poller(500, () => { return hashDevices(); },
|
devPoller = new Poller(250, () => { return hashDevices(); },
|
||||||
(prev, curr) => {
|
(prev, curr) => {
|
||||||
detectDevices();
|
detectDevices();
|
||||||
});
|
});
|
||||||
@@ -814,10 +814,10 @@ namespace sensors {
|
|||||||
|
|
||||||
export class ThresholdDetector {
|
export class ThresholdDetector {
|
||||||
public id: number;
|
public id: number;
|
||||||
public min: number;
|
private min: number;
|
||||||
public max: number;
|
private max: number;
|
||||||
public lowThreshold: number;
|
private lowThreshold: number;
|
||||||
public highThreshold: number;
|
private highThreshold: number;
|
||||||
public level: number;
|
public level: number;
|
||||||
public state: ThresholdState;
|
public state: ThresholdState;
|
||||||
|
|
||||||
|
|||||||
26
libs/core/integrator.ts
Normal file
26
libs/core/integrator.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
namespace control {
|
||||||
|
export class EulerIntegrator {
|
||||||
|
public value: number;
|
||||||
|
private t: number;
|
||||||
|
private v: number;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public integrate(derivative: number): void {
|
||||||
|
let now = control.millis();
|
||||||
|
let dt = (now -this.t) / 1000.0;
|
||||||
|
this.value += dt * (this.v + derivative) / 2;
|
||||||
|
|
||||||
|
this.t = now;
|
||||||
|
this.v = derivative;
|
||||||
|
}
|
||||||
|
|
||||||
|
public reset() {
|
||||||
|
this.value = 0;
|
||||||
|
this.v = 0;
|
||||||
|
this.t = control.millis();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -524,6 +524,7 @@ void stopProgram() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void target_reset() {
|
extern "C" void target_reset() {
|
||||||
|
pthread_mutex_trylock(&execMutex);
|
||||||
stopMotors();
|
stopMotors();
|
||||||
stopProgram();
|
stopProgram();
|
||||||
if (lmsPid)
|
if (lmsPid)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace motors {
|
|||||||
motorMM = control.mmap("/dev/lms_motor", MotorDataOff.Size * DAL.NUM_OUTPUTS, 0)
|
motorMM = control.mmap("/dev/lms_motor", MotorDataOff.Size * DAL.NUM_OUTPUTS, 0)
|
||||||
if (!motorMM) control.fail("no motor file")
|
if (!motorMM) control.fail("no motor file")
|
||||||
|
|
||||||
resetAllMotors()
|
resetAll()
|
||||||
|
|
||||||
const buf = output.createBuffer(1)
|
const buf = output.createBuffer(1)
|
||||||
buf[0] = DAL.opProgramStart
|
buf[0] = DAL.opProgramStart
|
||||||
@@ -118,7 +118,7 @@ namespace motors {
|
|||||||
* Stops all motors
|
* Stops all motors
|
||||||
*/
|
*/
|
||||||
//% blockId=motorStopAll block="stop all motors"
|
//% blockId=motorStopAll block="stop all motors"
|
||||||
//% weight=1
|
//% weight=2
|
||||||
//% group="Move"
|
//% group="Move"
|
||||||
//% help=motors/stop-all
|
//% help=motors/stop-all
|
||||||
export function stopAll() {
|
export function stopAll() {
|
||||||
@@ -130,8 +130,11 @@ namespace motors {
|
|||||||
/**
|
/**
|
||||||
* Resets all motors
|
* Resets all motors
|
||||||
*/
|
*/
|
||||||
|
//% blockId=motorResetAll block="reset all motors"
|
||||||
|
//% weight=1
|
||||||
//% group="Move"
|
//% group="Move"
|
||||||
export function resetAllMotors() {
|
//% help=motors/reset-all
|
||||||
|
export function resetAll() {
|
||||||
reset(Output.ALL)
|
reset(Output.ALL)
|
||||||
pause(1);
|
pause(1);
|
||||||
}
|
}
|
||||||
@@ -261,8 +264,9 @@ namespace motors {
|
|||||||
// allow 500ms for robot to settle
|
// allow 500ms for robot to settle
|
||||||
if (this._brake && this._brakeSettleTime > 0)
|
if (this._brake && this._brakeSettleTime > 0)
|
||||||
pause(this._brakeSettleTime);
|
pause(this._brakeSettleTime);
|
||||||
else
|
else {
|
||||||
pause(1); // give a tiny breather
|
pause(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected pauseOnRun(stepsOrTime: number) {
|
protected pauseOnRun(stepsOrTime: number) {
|
||||||
@@ -272,7 +276,6 @@ namespace motors {
|
|||||||
// allow robot to settle
|
// allow robot to settle
|
||||||
this.settle();
|
this.settle();
|
||||||
} else {
|
} else {
|
||||||
// give a breather to the event system in tight loops
|
|
||||||
pause(1);
|
pause(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -301,9 +304,17 @@ namespace motors {
|
|||||||
case MoveUnit.Rotations:
|
case MoveUnit.Rotations:
|
||||||
scale = 360;
|
scale = 360;
|
||||||
r.useSteps = true;
|
r.useSteps = true;
|
||||||
|
if (r.steps[1] < 0) {
|
||||||
|
r.speed = -r.speed;
|
||||||
|
r.steps[1] = -r.steps[1];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MoveUnit.Degrees:
|
case MoveUnit.Degrees:
|
||||||
r.useSteps = true;
|
r.useSteps = true;
|
||||||
|
if (r.steps[1] < 0) {
|
||||||
|
r.speed = -r.speed;
|
||||||
|
r.steps[1] = -r.steps[1];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MoveUnit.Seconds:
|
case MoveUnit.Seconds:
|
||||||
scale = 1000;
|
scale = 1000;
|
||||||
@@ -416,28 +427,28 @@ namespace motors {
|
|||||||
temp = Math.max(0, (value * 360) | 0);
|
temp = Math.max(0, (value * 360) | 0);
|
||||||
if (phase == MovePhase.Acceleration)
|
if (phase == MovePhase.Acceleration)
|
||||||
this._accelerationSteps = temp;
|
this._accelerationSteps = temp;
|
||||||
else
|
else
|
||||||
this._decelerationSteps = temp;
|
this._decelerationSteps = temp;
|
||||||
break;
|
break;
|
||||||
case MoveUnit.Degrees:
|
case MoveUnit.Degrees:
|
||||||
temp = Math.max(0, value | 0);
|
temp = Math.max(0, value | 0);
|
||||||
if (phase == MovePhase.Acceleration)
|
if (phase == MovePhase.Acceleration)
|
||||||
this._accelerationSteps = temp;
|
this._accelerationSteps = temp;
|
||||||
else
|
else
|
||||||
this._decelerationSteps = temp;
|
this._decelerationSteps = temp;
|
||||||
break;
|
break;
|
||||||
case MoveUnit.Seconds:
|
case MoveUnit.Seconds:
|
||||||
temp = Math.max(0, (value * 1000) | 0);
|
temp = Math.max(0, (value * 1000) | 0);
|
||||||
if (phase == MovePhase.Acceleration)
|
if (phase == MovePhase.Acceleration)
|
||||||
this._accelerationTime = temp;
|
this._accelerationTime = temp;
|
||||||
else
|
else
|
||||||
this._decelerationTime = temp;
|
this._decelerationTime = temp;
|
||||||
break;
|
break;
|
||||||
case MoveUnit.MilliSeconds:
|
case MoveUnit.MilliSeconds:
|
||||||
temp = Math.max(0, value | 0);
|
temp = Math.max(0, value | 0);
|
||||||
if (phase == MovePhase.Acceleration)
|
if (phase == MovePhase.Acceleration)
|
||||||
this._accelerationTime = temp;
|
this._accelerationTime = temp;
|
||||||
else
|
else
|
||||||
this._decelerationTime = temp;
|
this._decelerationTime = temp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -741,10 +752,18 @@ namespace motors {
|
|||||||
let stepsOrTime: number;
|
let stepsOrTime: number;
|
||||||
switch (unit) {
|
switch (unit) {
|
||||||
case MoveUnit.Rotations:
|
case MoveUnit.Rotations:
|
||||||
|
if (value < 0) {
|
||||||
|
value = -value;
|
||||||
|
speed = -speed;
|
||||||
|
}
|
||||||
stepsOrTime = (value * 360) >> 0;
|
stepsOrTime = (value * 360) >> 0;
|
||||||
useSteps = true;
|
useSteps = true;
|
||||||
break;
|
break;
|
||||||
case MoveUnit.Degrees:
|
case MoveUnit.Degrees:
|
||||||
|
if (value < 0) {
|
||||||
|
value = -value;
|
||||||
|
speed = -speed;
|
||||||
|
}
|
||||||
stepsOrTime = value >> 0;
|
stepsOrTime = value >> 0;
|
||||||
useSteps = true;
|
useSteps = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
"dal.d.ts",
|
"dal.d.ts",
|
||||||
"icons.jres",
|
"icons.jres",
|
||||||
"ns.ts",
|
"ns.ts",
|
||||||
"platform.h"
|
"platform.h",
|
||||||
|
"integrator.ts"
|
||||||
],
|
],
|
||||||
"testFiles": [
|
"testFiles": [
|
||||||
"test.ts"
|
"test.ts"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# calibrate
|
# calibrate
|
||||||
|
|
||||||
Reset the zero reference for the gyro to current position of the brick.
|
Detects if the gyro is drifting and performs a full reset if needed.
|
||||||
|
|
||||||
```sig
|
```sig
|
||||||
sensors.gyro2.calibrate()
|
sensors.gyro2.calibrate()
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# compute Drift
|
||||||
|
|
||||||
|
Called when the sensor is completely still, computes the current rate drift
|
||||||
|
```sig
|
||||||
|
sensors.gyro2.computeDrift()
|
||||||
|
```
|
||||||
|
|
||||||
|
The gyroscope sensor is subject to rate drifting. This means that the measurement reported by the sensor is off by a few degrees per second over time: it is drifting.
|
||||||
|
|
||||||
|
To counter the effect of drifting, call the ``||sensors:compute drift||`` block when the sensor is still to compute the current drift. The rate meansurements will automatically be corrected based on that drift.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
This example uses a gyro sensor to
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
let error = 0
|
||||||
|
sensors.gyro2.computeDrift()
|
||||||
|
while (sensors.color3.color() != ColorSensorColor.White) {
|
||||||
|
error = sensors.gyro2.rate() * -1
|
||||||
|
motors.largeBC.steer(error, 50)
|
||||||
|
}
|
||||||
|
motors.stopAll()
|
||||||
|
pause(1000)
|
||||||
|
sensors.gyro2.computeDrift()
|
||||||
|
while (sensors.color3.color() != ColorSensorColor.Blue) {
|
||||||
|
error = sensors.gyro2.rate() * -1
|
||||||
|
motors.largeBC.steer(error, 50)
|
||||||
|
}
|
||||||
|
motors.stopAll()
|
||||||
|
```
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
[rate](/reference/sensors/gyro/rate),
|
||||||
|
[compute drift](/reference/sensors/gyro/compute-drift)
|
||||||
|
|
||||||
39
libs/gyro-sensor/docs/reference/sensors/gyro/drift.md
Normal file
39
libs/gyro-sensor/docs/reference/sensors/gyro/drift.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# drift
|
||||||
|
|
||||||
|
Get the computed rate drift
|
||||||
|
|
||||||
|
```sig
|
||||||
|
sensors.gyro2.drift()
|
||||||
|
```
|
||||||
|
|
||||||
|
The gyroscope sensor is subject to rate drifting. This means that the measurement reported by the sensor is off by a few degrees per second over time: it is drifting.
|
||||||
|
|
||||||
|
To counter the effect of drifting, call the ``||sensors:compute drift||`` block when the sensor is still to compute the current drift. The rate meansurements will automatically be corrected based on that drift.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
This example uses a gyro sensor to drive straight until while color is detected.
|
||||||
|
The robot is stopped, the drift is computed and another movement is done.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
let error = 0
|
||||||
|
sensors.gyro2.computeDrift()
|
||||||
|
while (sensors.color3.color() != ColorSensorColor.White) {
|
||||||
|
error = sensors.gyro2.rate() * -1
|
||||||
|
motors.largeBC.steer(error, 50)
|
||||||
|
}
|
||||||
|
motors.stopAll()
|
||||||
|
pause(1000)
|
||||||
|
sensors.gyro2.computeDrift()
|
||||||
|
while (sensors.color3.color() != ColorSensorColor.Blue) {
|
||||||
|
error = sensors.gyro2.rate() * -1
|
||||||
|
motors.largeBC.steer(error, 50)
|
||||||
|
}
|
||||||
|
motors.stopAll()
|
||||||
|
```
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
[rate](/reference/sensors/gyro/rate),
|
||||||
|
[compute drift](/reference/sensors/gyro/compute-drift)
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Pause Until Rotated
|
||||||
|
|
||||||
|
Pauses the program until the gyro sensors detect that the desired amount of rotation
|
||||||
|
has been acheived.
|
||||||
|
|
||||||
|
```
|
||||||
|
sensors.gyro2.pauseUntilRotated(90)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
This program performs a square turn left, then right.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
sensors.gyro2.calibrate()
|
||||||
|
motors.largeBC.steer(200, 10)
|
||||||
|
sensors.gyro2.pauseUntilRotated(90)
|
||||||
|
motors.largeBC.steer(-200, 10)
|
||||||
|
sensors.gyro2.pauseUntilRotated(-90)
|
||||||
|
motors.largeBC.stop()
|
||||||
|
```
|
||||||
@@ -7,14 +7,15 @@ const enum GyroSensorMode {
|
|||||||
namespace sensors {
|
namespace sensors {
|
||||||
//% fixedInstances
|
//% fixedInstances
|
||||||
export class GyroSensor extends internal.UartSensor {
|
export class GyroSensor extends internal.UartSensor {
|
||||||
private calibrating: boolean;
|
private _calibrating: boolean;
|
||||||
private _drift: number;
|
private _drift: number;
|
||||||
private _driftCorrection: boolean;
|
private _angle: control.EulerIntegrator;
|
||||||
constructor(port: number) {
|
constructor(port: number) {
|
||||||
super(port)
|
super(port)
|
||||||
this.calibrating = false;
|
this._calibrating = false;
|
||||||
this._drift = 0;
|
this._drift = 0;
|
||||||
this._driftCorrection = false;
|
this._angle = new control.EulerIntegrator();
|
||||||
|
this._setMode(GyroSensorMode.Rate);
|
||||||
this.setMode(GyroSensorMode.Rate);
|
this.setMode(GyroSensorMode.Rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,13 +24,17 @@ namespace sensors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_query(): number {
|
_query(): number {
|
||||||
return this.getNumber(NumberFormat.Int16LE, 0);
|
const v = this.getNumber(NumberFormat.Int16LE, 0);
|
||||||
|
this._angle.integrate(v - this._drift);
|
||||||
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
setMode(m: GyroSensorMode) {
|
setMode(m: GyroSensorMode) {
|
||||||
if (m == GyroSensorMode.Rate && this.mode != m)
|
// decrecated
|
||||||
this._drift = 0;
|
}
|
||||||
this._setMode(m)
|
|
||||||
|
isCalibrating(): boolean {
|
||||||
|
return this._calibrating;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,11 +51,10 @@ namespace sensors {
|
|||||||
//% group="Gyro Sensor"
|
//% group="Gyro Sensor"
|
||||||
angle(): number {
|
angle(): number {
|
||||||
this.poke();
|
this.poke();
|
||||||
if (this.calibrating)
|
if (this._calibrating)
|
||||||
pauseUntil(() => !this.calibrating, 2000);
|
pauseUntil(() => !this._calibrating, 2000);
|
||||||
|
|
||||||
this.setMode(GyroSensorMode.Angle);
|
return Math.round(this._angle.value);
|
||||||
return this._query();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,21 +71,13 @@ namespace sensors {
|
|||||||
//% group="Gyro Sensor"
|
//% group="Gyro Sensor"
|
||||||
rate(): number {
|
rate(): number {
|
||||||
this.poke();
|
this.poke();
|
||||||
if (this.calibrating)
|
if (this._calibrating)
|
||||||
pauseUntil(() => !this.calibrating, 2000);
|
pauseUntil(() => !this._calibrating, 2000);
|
||||||
|
return this._query() - this._drift;
|
||||||
this.setMode(GyroSensorMode.Rate);
|
|
||||||
let curr = this._query();
|
|
||||||
if (Math.abs(curr) < 4 && this._driftCorrection) {
|
|
||||||
const p = 0.01;
|
|
||||||
this._drift = (1 - p) * this._drift + p * curr;
|
|
||||||
curr = Math.round(curr - this._drift);
|
|
||||||
}
|
|
||||||
return curr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forces a calibration of the with light progress indicators.
|
* Detects if calibration is necessary and performs a full reset, drift computation.
|
||||||
* Must be called when the sensor is completely still.
|
* Must be called when the sensor is completely still.
|
||||||
*/
|
*/
|
||||||
//% help=sensors/gyro/calibrate
|
//% help=sensors/gyro/calibrate
|
||||||
@@ -93,16 +89,30 @@ namespace sensors {
|
|||||||
//% weight=51 blockGap=8
|
//% weight=51 blockGap=8
|
||||||
//% group="Gyro Sensor"
|
//% group="Gyro Sensor"
|
||||||
calibrate(): void {
|
calibrate(): void {
|
||||||
if (this.calibrating) return; // already in calibration mode
|
if (this._calibrating) return; // already in calibration mode
|
||||||
|
|
||||||
const statusLight = brick.statusLight(); // save current status light
|
const statusLight = brick.statusLight(); // save current status light
|
||||||
brick.setStatusLight(StatusLight.Orange);
|
brick.setStatusLight(StatusLight.Orange);
|
||||||
|
|
||||||
this.calibrating = true;
|
this._calibrating = true;
|
||||||
// may be triggered by a button click,
|
// may be triggered by a button click,
|
||||||
// give time for robot to settle
|
// give time for robot to settle
|
||||||
pause(700);
|
pause(700);
|
||||||
|
|
||||||
|
// compute drift
|
||||||
|
this.computeDriftNoCalibration();
|
||||||
|
if (Math.abs(this.drift()) < 0.1) {
|
||||||
|
// no drift, skipping calibration
|
||||||
|
brick.setStatusLight(StatusLight.Green); // success
|
||||||
|
pause(1000);
|
||||||
|
brick.setStatusLight(statusLight); // resture previous light
|
||||||
|
|
||||||
|
// and we're done
|
||||||
|
this._angle.reset();
|
||||||
|
this._calibrating = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// calibrating
|
// calibrating
|
||||||
brick.setStatusLight(StatusLight.OrangePulse);
|
brick.setStatusLight(StatusLight.OrangePulse);
|
||||||
|
|
||||||
@@ -111,37 +121,31 @@ namespace sensors {
|
|||||||
// wait till sensor is live
|
// wait till sensor is live
|
||||||
pauseUntil(() => this.isActive(), 7000);
|
pauseUntil(() => this.isActive(), 7000);
|
||||||
// mode toggling
|
// mode toggling
|
||||||
this.setMode(GyroSensorMode.Rate);
|
this._setMode(GyroSensorMode.Rate);
|
||||||
this.setMode(GyroSensorMode.Angle);
|
this._setMode(GyroSensorMode.Angle);
|
||||||
// switch back to the desired mode
|
this._setMode(GyroSensorMode.Rate);
|
||||||
this.setMode(this.mode);
|
|
||||||
|
|
||||||
// check sensor is ready
|
// check sensor is ready
|
||||||
if (!this.isActive()) {
|
if (!this.isActive()) {
|
||||||
brick.setStatusLight(StatusLight.RedFlash); // didn't work
|
brick.setStatusLight(StatusLight.RedFlash); // didn't work
|
||||||
pause(2000);
|
pause(2000);
|
||||||
brick.setStatusLight(statusLight); // restore previous light
|
brick.setStatusLight(statusLight); // restore previous light
|
||||||
this.calibrating = false;
|
this._angle.reset();
|
||||||
|
this._calibrating = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute drift
|
// switch to rate mode
|
||||||
this._drift = 0;
|
this.computeDriftNoCalibration();
|
||||||
if (this._driftCorrection && this.mode == GyroSensorMode.Rate) {
|
|
||||||
const n = 100;
|
|
||||||
for (let i = 0; i < n; ++i) {
|
|
||||||
this._drift += this._query();
|
|
||||||
pause(4);
|
|
||||||
}
|
|
||||||
this._drift /= n;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// and done
|
||||||
brick.setStatusLight(StatusLight.Green); // success
|
brick.setStatusLight(StatusLight.Green); // success
|
||||||
pause(1000);
|
pause(1000);
|
||||||
brick.setStatusLight(statusLight); // resture previous light
|
brick.setStatusLight(statusLight); // resture previous light
|
||||||
|
|
||||||
// and we're done
|
// and we're done
|
||||||
this.calibrating = false;
|
this._angle.reset();
|
||||||
|
this._calibrating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,34 +157,117 @@ namespace sensors {
|
|||||||
//% parts="gyroscope"
|
//% parts="gyroscope"
|
||||||
//% blockNamespace=sensors
|
//% blockNamespace=sensors
|
||||||
//% this.fieldEditor="ports"
|
//% this.fieldEditor="ports"
|
||||||
//% weight=50
|
//% weight=50 blockGap=8
|
||||||
//% group="Gyro Sensor"
|
//% group="Gyro Sensor"
|
||||||
reset(): void {
|
reset(): void {
|
||||||
if (this.calibrating) return; // already in calibration mode
|
if (this._calibrating) return; // already in calibration mode
|
||||||
|
|
||||||
|
this._calibrating = true;
|
||||||
|
const statusLight = brick.statusLight(); // save current status light
|
||||||
|
brick.setStatusLight(StatusLight.Orange);
|
||||||
|
|
||||||
this.calibrating = true;
|
|
||||||
// send a reset command
|
// send a reset command
|
||||||
super.reset();
|
super.reset();
|
||||||
|
this._drift = 0;
|
||||||
|
this._angle.reset();
|
||||||
|
pauseUntil(() => this.isActive(), 7000);
|
||||||
|
|
||||||
|
// check sensor is ready
|
||||||
|
if (!this.isActive()) {
|
||||||
|
brick.setStatusLight(StatusLight.RedFlash); // didn't work
|
||||||
|
pause(2000);
|
||||||
|
brick.setStatusLight(statusLight); // restore previous light
|
||||||
|
this._angle.reset();
|
||||||
|
this._calibrating = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._setMode(GyroSensorMode.Rate);
|
||||||
|
|
||||||
// and done
|
// and done
|
||||||
this.calibrating = false;
|
brick.setStatusLight(StatusLight.Green); // success
|
||||||
|
pause(1000);
|
||||||
|
brick.setStatusLight(statusLight); // resture previous light
|
||||||
|
// and done
|
||||||
|
this._angle.reset();
|
||||||
|
this._calibrating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the computed rate drift
|
* Gets the computed rate drift
|
||||||
*/
|
*/
|
||||||
//%
|
//% help=sensors/gyro/drift
|
||||||
|
//% block="**gyro** %this|drift"
|
||||||
|
//% blockId=gyroDrift
|
||||||
|
//% parts="gyroscope"
|
||||||
|
//% blockNamespace=sensors
|
||||||
|
//% this.fieldEditor="ports"
|
||||||
|
//% weight=9 blockGap=8
|
||||||
|
//% group="Gyro Sensor"
|
||||||
drift(): number {
|
drift(): number {
|
||||||
return this._drift;
|
return this._drift;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables or disable drift correction
|
* Computes the current sensor drift when using rate measurements.
|
||||||
* @param enabled
|
|
||||||
*/
|
*/
|
||||||
//%
|
//% help=sensors/gyro/compute-drift
|
||||||
setDriftCorrection(enabled: boolean) {
|
//% block="compute **gyro** %this|drift"
|
||||||
this._driftCorrection = enabled;
|
//% blockId=gyroComputeDrift
|
||||||
|
//% parts="gyroscope"
|
||||||
|
//% blockNamespace=sensors
|
||||||
|
//% this.fieldEditor="ports"
|
||||||
|
//% weight=10 blockGap=8
|
||||||
|
//% group="Gyro Sensor"
|
||||||
|
computeDrift() {
|
||||||
|
if (this._calibrating)
|
||||||
|
pauseUntil(() => !this._calibrating, 2000);
|
||||||
|
pause(1000); // let the robot settle
|
||||||
|
this.computeDriftNoCalibration();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pauses the program until the gyro detected
|
||||||
|
* that the angle changed by the desired amount of degrees.
|
||||||
|
* @param degrees the degrees to turn
|
||||||
|
*/
|
||||||
|
//% help=sensors/gyro/pause-until-rotated
|
||||||
|
//% block="pause until **gyro** %this|rotated %degrees=rotationPicker|degrees"
|
||||||
|
//% blockId=gyroPauseUntilRotated
|
||||||
|
//% parts="gyroscope"
|
||||||
|
//% blockNamespace=sensors
|
||||||
|
//% this.fieldEditor="ports"
|
||||||
|
//% degrees.defl=90
|
||||||
|
//% weight=63
|
||||||
|
//% group="Gyro Sensor"
|
||||||
|
pauseUntilRotated(degrees: number, timeOut?: number): void {
|
||||||
|
let a = this.angle();
|
||||||
|
const end = a + degrees;
|
||||||
|
const direction = (end - a) > 0 ? 1 : -1;
|
||||||
|
pauseUntil(() => (end - this.angle()) * direction <= 0, timeOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
private computeDriftNoCalibration() {
|
||||||
|
// clear drift
|
||||||
this._drift = 0;
|
this._drift = 0;
|
||||||
|
const n = 10;
|
||||||
|
let d = 0;
|
||||||
|
for (let i = 0; i < n; ++i) {
|
||||||
|
d += this._query();
|
||||||
|
pause(20);
|
||||||
|
}
|
||||||
|
this._drift = d / n;
|
||||||
|
this._angle.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
_info(): string {
|
||||||
|
if (this._calibrating)
|
||||||
|
return "cal...";
|
||||||
|
|
||||||
|
let r = `${this._query()}r`;
|
||||||
|
if (this._drift != 0)
|
||||||
|
r += `-${this._drift | 0}`;
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,4 +282,17 @@ namespace sensors {
|
|||||||
|
|
||||||
//% fixedInstance whenUsed block="4" jres=icons.port4
|
//% fixedInstance whenUsed block="4" jres=icons.port4
|
||||||
export const gyro4: GyroSensor = new GyroSensor(4)
|
export const gyro4: GyroSensor = new GyroSensor(4)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the rotation angle field editor
|
||||||
|
* @param degrees angle in degrees, eg: 90
|
||||||
|
*/
|
||||||
|
//% blockId=rotationPicker block="%degrees"
|
||||||
|
//% blockHidden=true shim=TD_ID
|
||||||
|
//% colorSecondary="#FFFFFF"
|
||||||
|
//% degrees.fieldEditor="numberdropdown" degrees.fieldOptions.decompileLiterals=true
|
||||||
|
//% degrees.fieldOptions.data='[["30", 30], ["45", 45], ["60", 60], ["90", 90], ["180", 180], ["-30", -30], ["-45", -45], ["-60", -60], ["-90", -90], ["-180", -180]]'
|
||||||
|
export function __rotationPicker(degrees: number): number {
|
||||||
|
return degrees;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace brick {
|
|||||||
None,
|
None,
|
||||||
ShowLines,
|
ShowLines,
|
||||||
Image,
|
Image,
|
||||||
|
Ports,
|
||||||
Custom
|
Custom
|
||||||
}
|
}
|
||||||
let screenMode = ScreenMode.None;
|
let screenMode = ScreenMode.None;
|
||||||
@@ -124,15 +125,30 @@ namespace brick {
|
|||||||
//% help=brick/show-ports blockGap=8
|
//% help=brick/show-ports blockGap=8
|
||||||
//% weight=10 group="Screen"
|
//% weight=10 group="Screen"
|
||||||
export function showPorts() {
|
export function showPorts() {
|
||||||
screenMode = ScreenMode.Custom;
|
if (screenMode == ScreenMode.Ports) return;
|
||||||
|
|
||||||
|
screenMode = ScreenMode.Ports;
|
||||||
|
renderPorts();
|
||||||
|
control.runInParallel(function() {
|
||||||
|
while(screenMode == ScreenMode.Ports) {
|
||||||
|
renderPorts();
|
||||||
|
pause(50);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderPorts() {
|
||||||
const col = 44;
|
const col = 44;
|
||||||
const lineHeight8 = image.font8.charHeight + 2;
|
const lineHeight8 = image.font8.charHeight + 2;
|
||||||
clearScreen();
|
clearScreen();
|
||||||
|
|
||||||
function scale(x: number) {
|
function scale(x: number) {
|
||||||
if (Math.abs(x) > 1000) return Math.round(x / 100) / 10 + "k";
|
if (Math.abs(x) >= 5000) {
|
||||||
return ("" + (x >> 0));
|
const k = Math.floor(x / 1000);
|
||||||
|
const r = Math.round((x - 1000 * k) / 100);
|
||||||
|
return `${k}.${r}k`
|
||||||
|
}
|
||||||
|
return ("" + (x || 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// motors
|
// motors
|
||||||
@@ -143,7 +159,7 @@ namespace brick {
|
|||||||
const x = i * col;
|
const x = i * col;
|
||||||
screen.print("ABCD"[i], x + 2, 1 * lineHeight8, 1, image.font8)
|
screen.print("ABCD"[i], x + 2, 1 * lineHeight8, 1, image.font8)
|
||||||
screen.print(`${scale(data.actualSpeed)}%`, x + 2, 3 * lineHeight8, 1, image.font8)
|
screen.print(`${scale(data.actualSpeed)}%`, x + 2, 3 * lineHeight8, 1, image.font8)
|
||||||
screen.print(`${scale(data.count)}>`, x + 2, 4 * lineHeight8, 1, image.font5)
|
screen.print(`${scale(data.count)}>`, x + 2, 4 * lineHeight8, 1, image.font8)
|
||||||
}
|
}
|
||||||
screen.drawLine(0, 5 * lineHeight8, screen.width, 5 * lineHeight8, 1);
|
screen.drawLine(0, 5 * lineHeight8, screen.width, 5 * lineHeight8, 1);
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ tests.onEvent(TestEvent.RunSetUp, function() {
|
|||||||
})
|
})
|
||||||
tests.onEvent(TestEvent.TestSetUp, function() {
|
tests.onEvent(TestEvent.TestSetUp, function() {
|
||||||
motors.stopAll();
|
motors.stopAll();
|
||||||
motors.resetAllMotors();
|
motors.resetAll();
|
||||||
})
|
})
|
||||||
tests.onEvent(TestEvent.TestTearDown, function() {
|
tests.onEvent(TestEvent.TestTearDown, function() {
|
||||||
motors.stopAll();
|
motors.stopAll();
|
||||||
motors.resetAllMotors();
|
motors.resetAll();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pxt-ev3",
|
"name": "pxt-ev3",
|
||||||
"version": "1.2.9",
|
"version": "1.2.22",
|
||||||
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
|
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
|
||||||
"private": false,
|
"private": false,
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-common-packages": "0.23.61",
|
"pxt-common-packages": "0.23.61",
|
||||||
"pxt-core": "4.0.10"
|
"pxt-core": "4.0.11"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace pxsim {
|
namespace pxsim {
|
||||||
const enum GyroSensorMode {
|
export const enum GyroSensorMode {
|
||||||
None = -1,
|
None = -1,
|
||||||
Angle = 0,
|
Angle = 0,
|
||||||
Rate = 1,
|
Rate = 1,
|
||||||
@@ -8,7 +8,6 @@ namespace pxsim {
|
|||||||
export class GyroSensorNode extends UartSensorNode {
|
export class GyroSensorNode extends UartSensorNode {
|
||||||
id = NodeType.GyroSensor;
|
id = NodeType.GyroSensor;
|
||||||
|
|
||||||
private angle: number = 0;
|
|
||||||
private rate: number = 0;
|
private rate: number = 0;
|
||||||
|
|
||||||
constructor(port: number) {
|
constructor(port: number) {
|
||||||
@@ -19,23 +18,20 @@ namespace pxsim {
|
|||||||
return DAL.DEVICE_TYPE_GYRO;
|
return DAL.DEVICE_TYPE_GYRO;
|
||||||
}
|
}
|
||||||
|
|
||||||
setAngle(angle: number) {
|
|
||||||
if (this.angle != angle) {
|
|
||||||
this.angle = angle;
|
|
||||||
this.setChangedState();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setRate(rate: number) {
|
setRate(rate: number) {
|
||||||
|
rate = rate | 0;
|
||||||
if (this.rate != rate) {
|
if (this.rate != rate) {
|
||||||
this.rate = rate;
|
this.rate = rate;
|
||||||
this.setChangedState();
|
this.setChangedState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRate() {
|
||||||
|
return this.rate;
|
||||||
|
}
|
||||||
|
|
||||||
getValue() {
|
getValue() {
|
||||||
return this.mode == GyroSensorMode.Angle ? this.angle :
|
return this.getRate();
|
||||||
this.mode == GyroSensorMode.Rate ? this.rate : 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,11 +49,13 @@ namespace pxsim.visuals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateDimensions(width: number, height: number, strict?: boolean) {
|
private updateDimensions(width: number, height: number, strict?: boolean) {
|
||||||
|
width = Math.max(0, width);
|
||||||
|
height = Math.max(0, height);
|
||||||
if (this.content) {
|
if (this.content) {
|
||||||
const currentWidth = this.getInnerWidth();
|
const currentWidth = this.getInnerWidth();
|
||||||
const currentHeight = this.getInnerHeight();
|
const currentHeight = this.getInnerHeight();
|
||||||
const newHeight = currentHeight / currentWidth * width;
|
const newHeight = Math.max(0, currentHeight / currentWidth * width);
|
||||||
const newWidth = currentWidth / currentHeight * height;
|
const newWidth = Math.max(0, currentWidth / currentHeight * height);
|
||||||
if (strict) {
|
if (strict) {
|
||||||
this.content.setAttribute('width', `${width}`);
|
this.content.setAttribute('width', `${width}`);
|
||||||
this.content.setAttribute('height', `${height}`);
|
this.content.setAttribute('height', `${height}`);
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace pxsim.visuals {
|
namespace pxsim.visuals {
|
||||||
|
const MAX_RATE = 40;
|
||||||
|
|
||||||
export class RotationSliderControl extends ControlView<GyroSensorNode> {
|
export class RotationSliderControl extends ControlView<GyroSensorNode> {
|
||||||
private group: SVGGElement;
|
private group: SVGGElement;
|
||||||
private slider: SVGGElement;
|
private slider: SVGGElement;
|
||||||
|
private rateText: SVGTextElement;
|
||||||
|
|
||||||
private static SLIDER_WIDTH = 70;
|
private static SLIDER_WIDTH = 70;
|
||||||
private static SLIDER_HEIGHT = 78;
|
//private static SLIDER_HEIGHT = 78;
|
||||||
|
|
||||||
getInnerView(parent: SVGSVGElement, globalDefs: SVGDefsElement) {
|
getInnerView(parent: SVGSVGElement, globalDefs: SVGDefsElement) {
|
||||||
this.group = svg.elt("g") as SVGGElement;
|
this.group = svg.elt("g") as SVGGElement;
|
||||||
@@ -23,6 +25,14 @@ namespace pxsim.visuals {
|
|||||||
pxsim.svg.child(this.slider, "circle", { 'cx': 9, 'cy': 50, 'r': 13, 'style': 'fill: #f12a21' });
|
pxsim.svg.child(this.slider, "circle", { 'cx': 9, 'cy': 50, 'r': 13, 'style': 'fill: #f12a21' });
|
||||||
pxsim.svg.child(this.slider, "circle", { 'cx': 9, 'cy': 50, 'r': 12.5, 'style': 'fill: none;stroke: #b32e29' });
|
pxsim.svg.child(this.slider, "circle", { 'cx': 9, 'cy': 50, 'r': 12.5, 'style': 'fill: none;stroke: #b32e29' });
|
||||||
|
|
||||||
|
this.rateText = pxsim.svg.child(this.group, "text", {
|
||||||
|
'x': this.getInnerWidth() / 2,
|
||||||
|
'y': RotationSliderControl.SLIDER_WIDTH * 1.2,
|
||||||
|
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||||
|
'style': 'font-size: 16px',
|
||||||
|
'class': 'sim-text inverted number'
|
||||||
|
}) as SVGTextElement;
|
||||||
|
|
||||||
const dragSurface = svg.child(this.group, "rect", {
|
const dragSurface = svg.child(this.group, "rect", {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
@@ -61,7 +71,10 @@ namespace pxsim.visuals {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const node = this.state;
|
const node = this.state;
|
||||||
const percentage = node.getValue();
|
const rate = node.getRate();
|
||||||
|
this.rateText.textContent = `${rate}°/s`
|
||||||
|
// cap rate at 40deg/s
|
||||||
|
const percentage = 50 + Math.sign(rate) * Math.min(MAX_RATE, Math.abs(rate)) / MAX_RATE * 50;
|
||||||
const x = RotationSliderControl.SLIDER_WIDTH * percentage / 100;
|
const x = RotationSliderControl.SLIDER_WIDTH * percentage / 100;
|
||||||
const y = Math.abs((percentage - 50) / 50) * 10;
|
const y = Math.abs((percentage - 50) / 50) * 10;
|
||||||
this.slider.setAttribute("transform", `translate(${x}, ${y})`);
|
this.slider.setAttribute("transform", `translate(${x}, ${y})`);
|
||||||
@@ -73,8 +86,10 @@ namespace pxsim.visuals {
|
|||||||
const bBox = this.content.getBoundingClientRect();
|
const bBox = this.content.getBoundingClientRect();
|
||||||
let t = Math.max(0, Math.min(1, (width + bBox.left / this.scaleFactor - cur.x / this.scaleFactor) / width))
|
let t = Math.max(0, Math.min(1, (width + bBox.left / this.scaleFactor - cur.x / this.scaleFactor) / width))
|
||||||
|
|
||||||
|
t = -(t - 0.5) * 2; // [-1,1]
|
||||||
|
|
||||||
const state = this.state;
|
const state = this.state;
|
||||||
state.setRate((1 - t) * (100));
|
state.setRate(MAX_RATE * t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
"LEGO"
|
"LEGO"
|
||||||
],
|
],
|
||||||
"approvedRepos": [
|
"approvedRepos": [
|
||||||
|
"microsoft/pxt-automation"
|
||||||
|
],
|
||||||
|
"preferredRepos": [
|
||||||
|
"microsoft/pxt-automation"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"galleries": {
|
"galleries": {
|
||||||
@@ -14,6 +18,7 @@
|
|||||||
"Touch Sensor Tutorials": "tutorials/touch-sensor",
|
"Touch Sensor Tutorials": "tutorials/touch-sensor",
|
||||||
"Color Sensor Tutorials": "tutorials/color-sensor",
|
"Color Sensor Tutorials": "tutorials/color-sensor",
|
||||||
"Ultrasonic Sensor Tutorials": "tutorials/ultrasonic-sensor",
|
"Ultrasonic Sensor Tutorials": "tutorials/ultrasonic-sensor",
|
||||||
|
"Gyro Tutorials": "tutorials/gyro",
|
||||||
"Infrared Sensor Tutorials": "tutorials/infrared-sensor",
|
"Infrared Sensor Tutorials": "tutorials/infrared-sensor",
|
||||||
"FLL / City Shaper": "tutorials/city-shaper",
|
"FLL / City Shaper": "tutorials/city-shaper",
|
||||||
"Design Engineering": "design-engineering",
|
"Design Engineering": "design-engineering",
|
||||||
@@ -22,6 +27,6 @@
|
|||||||
"Videos": "videos"
|
"Videos": "videos"
|
||||||
},
|
},
|
||||||
"electronManifest": {
|
"electronManifest": {
|
||||||
"latest": "v1.1.20"
|
"latest": "v1.1.22"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user