Compare commits
60 Commits
Author | SHA1 | Date | |
---|---|---|---|
a054fdd3d3 | |||
a239589913 | |||
98a046237c | |||
eb385ec532 | |||
2fdce16685 | |||
74eb77a9ae | |||
4fba96588f | |||
03c07bdcf5 | |||
6da1bc3cb1 | |||
dfc9ca1db4 | |||
83b64c1e54 | |||
a0cf8655f2 | |||
e4cf2c99c0 | |||
076fb8487e | |||
c725561389 | |||
3dc781f4fd | |||
4456767f2d | |||
6dba240899 | |||
d7172a1f3a | |||
245ff9d5b2 | |||
bfb258ce61 | |||
63beb2cac7 | |||
73d3dce139 | |||
21be8a5021 | |||
03a82d6bcd | |||
60ea0f0cd5 | |||
f69a0d5289 | |||
e2e8536b37 | |||
4096875a88 | |||
9825a90df2 | |||
7ad5d123a3 | |||
3599483ed2 | |||
7a6818931f | |||
eda38ebbc4 | |||
026f7a3180 | |||
f58fcb60e2 | |||
dbda86abb5 | |||
3c13565e7c | |||
f8524cf1a7 | |||
bf4b1090fc | |||
ea4d8cf66a | |||
b32ae4e61a | |||
1df90a6ea3 | |||
09ac2a7a47 | |||
06565995d3 | |||
1a73aec74d | |||
5516d041d6 | |||
7aac8ab5f3 | |||
73da17a395 | |||
16197f2987 | |||
5ec7eb6f04 | |||
f05ad887b8 | |||
c8a7b73101 | |||
0b9d029ecc | |||
d6f0fee300 | |||
d78b4c5ee3 | |||
13f5ebd6a7 | |||
ccbebabc55 | |||
5c61677ab9 | |||
21025b5f83 |
@ -2,7 +2,7 @@
|
||||
|
||||
[](https://ci2.dot.net/job/Private/job/pxt_project_rainbow/job/master/job/pxt-ev3_Push/)
|
||||
|
||||
This repo contains the editor target hosted at https://makecode.legoeducation.com
|
||||
This repo contains the editor target hosted at https://makecode.mindstorms.com
|
||||
|
||||
LEGO Auth: https://src.education.lego.com/groups/ev3-makecode (use Google Authenticator)
|
||||
LEGO Chat: https://chat.internal.education.lego.com/make-code/channels/town-square
|
||||
|
@ -82,12 +82,12 @@
|
||||
* [reset](/reference/sensors/gyro/reset)
|
||||
* [Ultrasonic](/reference/sensors/ultrasonic)
|
||||
* [on event](/reference/sensors/ultrasonic/on-event)
|
||||
* [distance](reference/sensors/ultrasonic/distance)
|
||||
* [pause until](reference/sensors/ultrasonic/pause-until)
|
||||
* [distance](/reference/sensors/ultrasonic/distance)
|
||||
* [pause until](/reference/sensors/ultrasonic/pause-until)
|
||||
* [Infrared](/reference/sensors/infrared)
|
||||
* [on event](/reference/sensors/infrared/on-event)
|
||||
* [distance](reference/sensors/infrared/proximity)
|
||||
* [pause until](reference/sensors/infrared/pause-until)
|
||||
* [distance](/reference/sensors/infrared/proximity)
|
||||
* [pause until](/reference/sensors/infrared/pause-until)
|
||||
* [Infrared beacon](/reference/sensors/beacon)
|
||||
* [on event](/reference/sensors/beacon/on-event)
|
||||
* [pause until](/reference/sensors/beacon/pause-until)
|
||||
@ -123,3 +123,7 @@
|
||||
* [log](/reference/console/log)
|
||||
* [log value](/reference/console/log-value)
|
||||
* [send to screen](/reference/console/send-to-screen)
|
||||
|
||||
## #misc
|
||||
|
||||
## devs
|
||||
|
@ -70,3 +70,12 @@
|
||||
|  |
|
||||
| Download Button |
|
||||
|
||||
#### #explorer-images
|
||||
|
||||
| |
|
||||
|-|
|
||||
|  |
|
||||
| Explorer Button |
|
||||
| |
|
||||
|  |
|
||||
| Explorer File View |
|
||||
|
@ -12,7 +12,7 @@ Design cars that can park themselves safely without driver intervention.
|
||||
* What would it take to ensure that autonomous cars are safe?
|
||||
* What types of movements do autonomous cars need to perform?
|
||||
|
||||
## Construct
|
||||
## Construct
|
||||
|
||||
### Build
|
||||
|
||||
@ -20,6 +20,12 @@ Build a @boardname@ vehicle that can park itself safely without driver intervent
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||
### Check
|
||||
|
||||
Before you program, check:
|
||||
@ -28,7 +34,7 @@ Before you program, check:
|
||||
* Are the wheels correctly installed?
|
||||
* Are the wheels rotating freely?
|
||||
|
||||
### Program
|
||||
### Program
|
||||
|
||||
Write a program that will make the robot turn three times in various ways.
|
||||
|
||||
@ -109,7 +115,7 @@ Click Download and follow the instructions to get your code onto your EV3 Brick.
|
||||
|
||||
### Differentiation
|
||||
|
||||
Create a program that simulates displaying appropriate warning lights while parking.
|
||||
Create a program that simulates displaying appropriate warning lights while parking.
|
||||
|
||||
### ~hint
|
||||
|
||||
@ -164,8 +170,8 @@ Click Download and follow the instructions to get your code onto your EV3 Brick.
|
||||
|
||||
* Click on the JavaScript tab and experiment with changing the values in the code.
|
||||
* Add a custom image or sounds from the Brick or Music menus.
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
|
||||
Congratulations! What will you design next?
|
||||
|
@ -24,6 +24,12 @@ Build red and green “lights” for your robot to detect. You can use LEGO bric
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/color%20squares-0a88dfd98bb2e64b5b8151fc422bae36.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above images doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||
### Check
|
||||
|
||||
Before you program, check:
|
||||
@ -51,7 +57,7 @@ Consider using these blocks in your solution:
|
||||
|
||||
```block
|
||||
loops.forever(function () {
|
||||
|
||||
|
||||
})
|
||||
motors.largeBC.steer(0, 50)
|
||||
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
|
||||
@ -77,9 +83,9 @@ loops.forever(function () {
|
||||
|
||||
### Download and test
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
|
||||
Congratulations! Your robot can stop at a red light.
|
||||
Congratulations! Your robot can stop at a red light.
|
||||
|
||||
Now add to your program and have your robot to drive forward again when the light changes from red to green.
|
||||
|
||||
@ -102,7 +108,7 @@ loops.forever(function () {
|
||||
|
||||
### Download and test
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
|
||||
## Contemplate
|
||||
|
||||
@ -116,7 +122,7 @@ Draw a dark line with tape or marker for your robot to cross.
|
||||
|
||||
Consider using these blocks in your solution:
|
||||
|
||||
```block
|
||||
```block
|
||||
motors.largeBC.steer(0, 50)
|
||||
music.playSoundEffect(sounds.systemGeneralAlert)
|
||||
```
|
||||
@ -143,7 +149,7 @@ loops.forever(function () {
|
||||
|
||||
#### Download and test
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
|
||||
#### Differentiation
|
||||
|
||||
@ -157,7 +163,7 @@ Consider using these blocks in your solution:
|
||||
|
||||
```block
|
||||
while (true) {
|
||||
|
||||
|
||||
}
|
||||
motors.largeBC.steer(0, 50)
|
||||
```
|
||||
@ -166,7 +172,7 @@ motors.largeBC.steer(0, 50)
|
||||
|
||||
```block
|
||||
if (true) {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
@ -215,7 +221,7 @@ forever(function () {
|
||||
|
||||
### Download and test
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
|
||||
|
||||
### Share
|
||||
|
||||
@ -232,8 +238,8 @@ Personalize:
|
||||
|
||||
* Click on the **JavaScript** tab and experiment with changing the values in the code.
|
||||
* Add a custom image or sounds from the ``||brick:Brick||`` or ``||music:Music||`` menus.
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
|
||||
Congratulations! What will you design next?
|
||||
|
@ -4,7 +4,7 @@ Design ways to avoid accidents between vehicles and objects in the road.
|
||||
|
||||

|
||||
|
||||
## Connect
|
||||
## Connect
|
||||
|
||||
Think about:
|
||||
|
||||
@ -12,7 +12,7 @@ Think about:
|
||||
* What do you need to be aware of to avoid collisions with obstacles?
|
||||
* What causes traffic jams in high density areas?
|
||||
|
||||
## Construct
|
||||
## Construct
|
||||
|
||||
### Build
|
||||
|
||||
@ -20,10 +20,16 @@ Build a @boardname@ vehicle that can avoid accidents between vehicles and object
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)
|
||||
|
||||
Build an obstacle for your robot to detect. You can build the **cuboid model** out of LEGO bricks or an obstacle of your choice.
|
||||
Build an obstacle for your robot to detect. You can build the **cuboid model** out of LEGO bricks or an obstacle of your choice.
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-cuboid-dc93b2e60bed2981e76b3bac9ea04558.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above images doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||
### Check
|
||||
|
||||
Before you program, check:
|
||||
@ -38,7 +44,7 @@ Before you program, check:
|
||||
* Program your robot to detect any obstacles that might appear while the robot is moving forward (or backward).
|
||||
* Make the robot stop when it detects an object that is less than 20 cm away.
|
||||
|
||||
Before you program, think about:
|
||||
Before you program, think about:
|
||||
* How will you program the robot to detect obstacles?
|
||||
* How will you program the robot to stop at obstacles?
|
||||
* Which programming blocks will you use?
|
||||
@ -59,7 +65,7 @@ motors.stopAll()
|
||||
|
||||
### ~
|
||||
|
||||
### Sample Solution
|
||||
### Sample Solution
|
||||
|
||||
1. Start the program when EV3 ``enter`` button is pressed.
|
||||
2. Turn motors ``B`` and ``C`` on at speed ``50``.
|
||||
@ -80,7 +86,7 @@ Click **Download** and follow the instructions to get your code onto your EV3 Br
|
||||
|
||||
## Contemplate
|
||||
|
||||
On the road, when a driver sees and object, they slow their car down before coming to a full stop.
|
||||
On the road, when a driver sees and object, they slow their car down before coming to a full stop.
|
||||
|
||||
Program your EV3 Driving Base to do the same.
|
||||
|
||||
@ -93,7 +99,7 @@ If the Ultrasonic Sensor:
|
||||
### ~hint
|
||||
|
||||
Consider using this block in your solution:
|
||||
|
||||
|
||||
```block
|
||||
if (true) {
|
||||
}
|
||||
@ -101,7 +107,7 @@ if (true) {
|
||||
|
||||
### ~
|
||||
|
||||
### Sample Solution
|
||||
### Sample Solution
|
||||
|
||||
```blocks
|
||||
loops.forever(function () {
|
||||
@ -118,7 +124,7 @@ loops.forever(function () {
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the ``center`` button on the EV3 Brick to run the program.
|
||||
|
||||
## Continue
|
||||
## Continue
|
||||
|
||||
* Get together with other building teams and make a traffic jam by placing all of your robots in a line with varying amounts of space between them.
|
||||
* Have everyone start their robots at the same time and see what happens.
|
||||
@ -130,8 +136,8 @@ Click **Download** and follow the instructions to get your code onto your EV3 Br
|
||||
|
||||
* Share what you think “efficiency in programming” means.
|
||||
* Explore the different solutions other programmers came up with.
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
|
||||
Congratulations! What will you design next?
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Make A System That Communicates
|
||||
|
||||
## Connect
|
||||
## Connect
|
||||
|
||||
### Design Brief
|
||||
|
||||
@ -20,10 +20,10 @@ Think about:
|
||||
* What kind of motorized mechanism can be used to control the movements of a robot?
|
||||
* How can the robot sense where it is along the path?
|
||||
* How can the robot communicate its position?
|
||||
|
||||
|
||||

|
||||
|
||||
## Construct
|
||||
## Construct
|
||||
|
||||
### Build
|
||||
|
||||
@ -37,13 +37,19 @@ More building ideas:
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/color%20sensor_v2-e7fd54b6fa3cdfe36f414c1d2510f9cb.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
Build a path for your robot to follow. You can use electrical tape on a floor, or marker on paper. You can use objects as milestones to indicate a path that can be detected by either the Touch Sensor, Color Sensor, or Ultrasonic Sensor.
|
||||
If clicking the above images doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### Program
|
||||
### ~
|
||||
|
||||
|
||||
Build a path for your robot to follow. You can use electrical tape on a floor, or marker on paper. You can use objects as milestones to indicate a path that can be detected by either the Touch Sensor, Color Sensor, or Ultrasonic Sensor.
|
||||
|
||||
### Program
|
||||
|
||||
Before you program, think about:
|
||||
|
||||
Before you program, think about:
|
||||
|
||||
* How will you program the robot to follow a path?
|
||||
* How will you program the robot to communicate its position?
|
||||
* Which programming blocks will you use?
|
||||
@ -54,7 +60,7 @@ Explore the different Motor and Sensor blocks in the programming menu.
|
||||
|
||||
### ~
|
||||
|
||||
### Sample Solution
|
||||
### Sample Solution
|
||||
|
||||
[](https://legoeducation.23video.com/v.ihtml/player.html?token=79c99735f906403a4dd7f2909935983d&source=embed&photo%5fid=19857954)
|
||||
|
||||
@ -70,15 +76,21 @@ Two copies of the tracks are built: one for the right side and a mirror image fo
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/track-rover-bi-6aadb1b053df0c58a0dea108b5ce0eea.pdf)
|
||||
|
||||
### Sample Program Solution
|
||||
### ~hint
|
||||
|
||||
This program works with the Track Rover. If you create a different robot, adjust the program to fit your solution.
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
Program summary:
|
||||
### ~
|
||||
|
||||
### Sample Program Solution
|
||||
|
||||
This program works with the Track Rover. If you create a different robot, adjust the program to fit your solution.
|
||||
|
||||
Program summary:
|
||||
|
||||
* If the Color Sensor sees black, Motor B runs at -50 power and Motor C turns off.
|
||||
* If the Color Sensor sees white, Motor B turns off and Motor C runs at -50 power.
|
||||
* If the Color Sensor sees green, all motors stop and the green sound plays.
|
||||
* If the Color Sensor sees green, all motors stop and the green sound plays.
|
||||
* The robot waits one second, then motors move forward.
|
||||
* If the Color Sensor sees red, all motors stop, and the red sound plays.
|
||||
* The robot waits one second, then motors move forward.
|
||||
@ -108,44 +120,44 @@ forever(function () {
|
||||
|
||||
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
|
||||
|
||||
## Contemplate
|
||||
## Contemplate
|
||||
|
||||
### Test and Analyze
|
||||
### Test and Analyze
|
||||
|
||||
As you work on your solution:
|
||||
|
||||
1. Describe one part of your design that worked especially well.
|
||||
2. Describe one design change that you had to make.
|
||||
3. What will you try next?
|
||||
1. Describe one part of your design that worked especially well.
|
||||
2. Describe one design change that you had to make.
|
||||
3. What will you try next?
|
||||
|
||||
|
||||
### Review and Revise
|
||||
### Review and Revise
|
||||
|
||||
Take a moment to reflect on your robot solution.
|
||||
Take a moment to reflect on your robot solution.
|
||||
|
||||
Think about:
|
||||
|
||||
* Can the robot’s movement be more accurate?
|
||||
* Can the robot’s movement be more accurate?
|
||||
* What are some ways that others have solved the problem?
|
||||
|
||||
Describe two ways you could improve your robot.
|
||||
|
||||
## Continue
|
||||
## Continue
|
||||
|
||||
### Personalize your project
|
||||
|
||||
* Add/remove LEGO elements to improve the way your robot moves.
|
||||
* Add/remove LEGO elements to improve the way your robot moves.
|
||||
* Click on the JavaScript tab and experiment with changing the values in the code.
|
||||
* Add a custom image or sounds by adding blocks from the Brick or Music menus.
|
||||
|
||||
## Communicate
|
||||
## Communicate
|
||||
|
||||
Here are some ideas:
|
||||
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance.
|
||||
* Explain some important features of your software program.
|
||||
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance.
|
||||
* Explain some important features of your software program.
|
||||
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
|
||||
Congratulations! What will you design next?
|
||||
|
@ -30,18 +30,26 @@ If you want some building help you can follow these instructions.
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/toddle%20bot-3dcad146d7f5deac4753f93e9dcc0739.pdf)
|
||||
|
||||
Click [here](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/toddle%20bot-3dcad146d7f5deac4753f93e9dcc0739.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image or link doesn't open the instructions, right-click on the link and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||
### Program
|
||||
|
||||
Before you program, think about:
|
||||
|
||||
* How will you program the robot to move?
|
||||
* How will you program the robot to move?
|
||||
* How will you program the robot to stop?
|
||||
* How will you program the robot to display the distance moved?
|
||||
|
||||
Which programming blocks will you use:
|
||||
|
||||
* To turn on and turn off the motor or motors?
|
||||
* To display the distance moved?
|
||||
* To turn on and turn off the motor or motors?
|
||||
* To display the distance moved?
|
||||
|
||||
### Sample Code
|
||||
|
||||
@ -49,7 +57,7 @@ Example code of a robot that moves without wheels using one motor:
|
||||
|
||||
* The robot moves with ``large motor D`` rotating at ``-100`` speed
|
||||
* The robot moves for ``30000`` milliseconds (30 seconds)
|
||||
* The robot stops
|
||||
* The robot stops
|
||||
* The robot displays the text ``"30cm"``
|
||||
|
||||
```blocks
|
||||
@ -65,7 +73,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
|
||||
|
||||
## Contemplate
|
||||
## Contemplate
|
||||
|
||||
### Test and Analyze
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Make It Smarter and Faster
|
||||
# Make It Smarter and Faster
|
||||
|
||||
## Connect
|
||||
## Connect
|
||||
|
||||
### Design Brief
|
||||
|
||||
@ -10,52 +10,52 @@ https://www.youtube.com/watch?v=y9-A_C_08KY
|
||||
|
||||
* What do the robots in the video need to be able to sense, plan, and act?
|
||||
* What senses do humans have and why are they important to us?
|
||||
* How many human-like senses do you see the robots demonstrating?
|
||||
* How many human-like senses do you see the robots demonstrating?
|
||||
|
||||
### Brainstorm
|
||||
### Brainstorm
|
||||
|
||||
Discuss different solutions to the design brief.
|
||||
|
||||
Think about:
|
||||
Think about:
|
||||
|
||||
* What kind of creature can it be?
|
||||
* How can it move?
|
||||
* What does it need to be aware so that it stays safe, well fed and warm (or cool)?
|
||||
* Is it looking for food, a safe place to hide or a warm place to soak up the sun?
|
||||
* Will the creature need to move fast or slow?
|
||||
* Will it need to turn?
|
||||
* What kind of creature can it be?
|
||||
* How can it move?
|
||||
* What does it need to be aware so that it stays safe, well fed and warm (or cool)?
|
||||
* Is it looking for food, a safe place to hide or a warm place to soak up the sun?
|
||||
* Will the creature need to move fast or slow?
|
||||
* Will it need to turn?
|
||||
* Will it need to go backward?
|
||||
|
||||

|
||||
|
||||
## Construct
|
||||
|
||||
|
||||
### Build
|
||||
|
||||
Think about a creature’s movement for inspiration. Your mechanism can be attached or unattached to the EV3 Brick. You can start by tinkering with the LEGO elements in the picture add then build on.
|
||||
|
||||
More building ideas:
|
||||
More building ideas:
|
||||
|
||||
| | | | | |
|
||||
|-|-|-|-|-|
|
||||
|[][EV3 Frames] | |[][Color Sensor 1] | |[][Gyro Sensor] |
|
||||
| [EV3 Frames] | | [Color Sensor 1] | | [Gyro Sensor] |
|
||||
<br/>
|
||||
|
||||
| | | | | |
|
||||
|-|-|-|-|-|
|
||||
|[][Ultrasonic Sensor] | | [][Touch Sensor] | | [][Jaw] |
|
||||
| [Ultrasonic Sensor] | | [Touch Sensor] | | [Jaw] |
|
||||
<br/>
|
||||
* [EV3 Frames]
|
||||
* [Color Sensor 1]
|
||||
* [Gyro Sensor]
|
||||
* [Ultrasonic Sensor]
|
||||
* [Touch Sensor]
|
||||
* [Jaw]
|
||||
* [Leg 1]
|
||||
* [Leg 2]
|
||||
* [Leg 3]
|
||||
|
||||
| | | | | |
|
||||
|-|-|-|-|-|
|
||||
| [][Leg 1] | | [][Leg 2] | | [][Leg 3] |
|
||||
| [Leg 1] | | [Leg 2] | | [Leg 3] |
|
||||
### ~hint
|
||||
|
||||
### Program
|
||||
If clicking the above links doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
Before you program, think about:
|
||||
### ~
|
||||
|
||||
### Program
|
||||
|
||||
Before you program, think about:
|
||||
|
||||
* How will you program the robot to sense?
|
||||
* How will you program the robot to respond?
|
||||
@ -67,7 +67,7 @@ Before you program, think about:
|
||||
|
||||
### ~
|
||||
|
||||
### Sample Solution
|
||||
### Sample Solution
|
||||
|
||||
The Insect uses its Ultrasonic Sensor to sense danger and move away from a threat.
|
||||
|
||||
@ -86,11 +86,17 @@ Building Instructions:
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/insect-94b8a46f0dc5082c9d78ddb734626dc9.pdf)
|
||||
|
||||
### Sample Solution
|
||||
### ~hint
|
||||
|
||||
This program checks if the Ultrasonic Sensor senses something near.
|
||||
If clicking the above images or links doesn't open the instructions, right-click on the link and choose "Save link as..." to download the PDF.
|
||||
|
||||
The blocks inside the ``||loops:forever||`` loop have these actions:
|
||||
### ~
|
||||
|
||||
### Sample Solution
|
||||
|
||||
This program checks if the Ultrasonic Sensor senses something near.
|
||||
|
||||
The blocks inside the ``||loops:forever||`` loop have these actions:
|
||||
|
||||
1. Turn on the ``green`` EV3 Brick Status Light.
|
||||
2. Wait for Ultrasonic Sensor to detect an object.
|
||||
@ -119,44 +125,44 @@ forever(function () {
|
||||
|
||||
Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
|
||||
|
||||
## Contemplate
|
||||
## Contemplate
|
||||
|
||||
### Test and Analyze
|
||||
### Test and Analyze
|
||||
|
||||
As you work on your solution:
|
||||
1. Describe one part of your design that worked especially well.
|
||||
2. Describe one design change that you had to make.
|
||||
3. What will you try next?
|
||||
As you work on your solution:
|
||||
1. Describe one part of your design that worked especially well.
|
||||
2. Describe one design change that you had to make.
|
||||
3. What will you try next?
|
||||
|
||||
### Review and Revise
|
||||
### Review and Revise
|
||||
|
||||
Take a moment to reflect on your robot solution.
|
||||
Take a moment to reflect on your robot solution.
|
||||
|
||||
Think about:
|
||||
Think about:
|
||||
|
||||
* Does your robot move when the sensor is activated?
|
||||
* If not, what will you change to make the robot’s ability to sense and respond more obvious?
|
||||
* What other behaviors can you add to the robot to make it more realistic?
|
||||
* Does your robot move when the sensor is activated?
|
||||
* If not, what will you change to make the robot’s ability to sense and respond more obvious?
|
||||
* What other behaviors can you add to the robot to make it more realistic?
|
||||
|
||||
Describe two ways you could improve your robot.
|
||||
|
||||
## Continue
|
||||
## Continue
|
||||
|
||||
Personalize your project:
|
||||
|
||||
* Add/remove LEGO elements to improve the way your robot moves.
|
||||
* Add/remove LEGO elements to improve the way your robot moves.
|
||||
* Click on the JavaScript tab and experiment with changing the values in the code.
|
||||
* Add a custom image or sounds by adding blocks from the Brick or Music menus.
|
||||
* Does your robot resemble a creature? Maybe add more craft materials to your project.
|
||||
|
||||
## Communicate
|
||||
## Communicate
|
||||
|
||||
Here are some ideas:
|
||||
Here are some ideas:
|
||||
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
* Create a video of your project, especially your final presentation and your robot’s performance. Explain some important features of your software program.
|
||||
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
|
||||
* Include an image of your program with comments.
|
||||
* Add a team photograph!
|
||||
|
||||
Congratulations! What will you design next?
|
||||
|
||||
|
@ -20,6 +20,12 @@ Build the robot driving base:
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||
## Make It Move
|
||||
|
||||
**Code it:** Create a program that makes the Driving Base move forward and stop at the finish line, which is ``1`` meter away.
|
||||
@ -68,6 +74,12 @@ Build and attach an Ultrasonic Sensor to your driving base:
|
||||
|
||||
[](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||
## Detect an Object
|
||||
|
||||
**Code it:** Create a program that moves the Driving Base and makes it stop ``6`` cm from the Cuboid.
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"appref": "v0.2.3"
|
||||
"appref": "v0.4.2"
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Objective
|
||||
|
||||
Design ways to improve driving safety by helping to prevent drivers from falling asleep and causing an accident.
|
||||
|
||||
|
||||

|
||||
|
||||
## Connect
|
||||
@ -20,6 +20,12 @@ Think about what you have learned, then document it. Describe the problem in you
|
||||
|
||||
Start by constructing this model. Read the building instructions [here](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-color-sensor-down-driving-base-d30ed30610c3d6647d56e17bc64cf6e2.pdf) first.
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||

|
||||
|
||||
## Program
|
||||
@ -44,13 +50,13 @@ Create a program that drives the robot forward until the Color Sensor sees red.
|
||||
|
||||
Place a ``||motors:steer large B+C||`` block from ``||motors:Motors||`` under ``||loops:on start||``. Change the speed to 20%.
|
||||
|
||||
```blocks
|
||||
```blocks
|
||||
motors.largeBC.steer(0, 20)
|
||||
```
|
||||
|
||||
### Step 2
|
||||
|
||||
Place a ``||loops:while||`` loop block under ``||motors:steer large B+C||``.
|
||||
Place a ``||loops:while||`` loop block under ``||motors:steer large B+C||``.
|
||||
|
||||
```blocks
|
||||
motors.largeBC.steer(0, 20)
|
||||
@ -61,7 +67,7 @@ while (true) {
|
||||
### Step 3
|
||||
|
||||
Place a ``||sensors:pause until color detected||`` from ``||sensors:Sensors||`` inside the ``||loops:while||`` loop block. Change the color to red.
|
||||
|
||||
|
||||
```blocks
|
||||
motors.largeBC.steer(0, 20)
|
||||
while (true) {
|
||||
@ -99,7 +105,7 @@ Place a ``||loops:while||`` loop block under ``||loops:on start||``.
|
||||
|
||||
```blocks
|
||||
while (true) {
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -121,7 +127,7 @@ Place a ``||loops:while||`` loop block under the ``||motors:steer large B+C||``
|
||||
while (true) {
|
||||
motors.largeBC.steer(0, 20)
|
||||
while (true) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -141,7 +147,7 @@ while (true) {
|
||||
|
||||
### Step 6
|
||||
|
||||
Place a ``||motors:stop all motors||`` block under the ``||sensors:pause until color detected||`` block.
|
||||
Place a ``||motors:stop all motors||`` block under the ``||sensors:pause until color detected||`` block.
|
||||
|
||||
```blocks
|
||||
while (true) {
|
||||
@ -165,7 +171,7 @@ while (true) {
|
||||
motors.stopAll()
|
||||
}
|
||||
while (true) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -177,7 +183,7 @@ Place a ``||sensors:pause unril color detected||`` block inside the new ``||loop
|
||||
What do you think the program will do?
|
||||
|
||||
**Hint:** The motors will run until the Color Sensor detects the color red, then it will stop all motors. The motors will also run and not stop when the color sensor detects the color green.
|
||||
|
||||
|
||||
```blocks
|
||||
while (true) {
|
||||
motors.largeBC.steer(0, 20)
|
||||
@ -212,7 +218,7 @@ sensors.color3.pauseUntilColorDetected(ColorSensorColor.Yellow)
|
||||
music.playSoundEffect(sounds.systemGeneralAlert)
|
||||
}
|
||||
while (true) {
|
||||
while (true) {
|
||||
while (true) {
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
|
||||
motors.largeB.run(10)
|
||||
motors.largeC.run(-10)
|
||||
@ -235,7 +241,7 @@ You will need to constantly debug your program in order to make your robot trave
|
||||
|
||||
```blocks
|
||||
while (true) {
|
||||
while (true) {
|
||||
while (true) {
|
||||
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
|
||||
motors.largeB.run(10)
|
||||
motors.largeC.run(-10)
|
||||
@ -252,10 +258,10 @@ while (true) {
|
||||
|
||||
Consider the following questions:
|
||||
|
||||
1. What challenged you?
|
||||
2. Where there any surprises?
|
||||
1. What challenged you?
|
||||
2. Where there any surprises?
|
||||
3. How could you improve your program?
|
||||
4. Could your program have been more streamlined?
|
||||
4. Could your program have been more streamlined?
|
||||
5. Have you used too many blocks?
|
||||
6. Is there a more efficient way of building your program?
|
||||
7. How could your program be used in real-world scenarios?
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Make It Move Without Wheels
|
||||
# Make It Move Without Wheels
|
||||
|
||||
## Objective @unplugged
|
||||
|
||||
@ -24,7 +24,13 @@ The Walker Bot combines an EV3 Frame and two legs that are mirror-images to crea
|
||||
The legs in the Walker Bot are designed to show how to change the rotary motion of a motor to reciprocating motion.
|
||||
|
||||
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
|
||||
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||

|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Make It Move Without Wheels
|
||||
# Make It Move Without Wheels
|
||||
|
||||
## Objective
|
||||
|
||||
@ -23,7 +23,13 @@ The Walker Bot combines an EV3 Frame and two legs that are mirror-images to crea
|
||||
The legs in the Walker Bot are designed to show how to change the rotary motion of a motor to reciprocating motion.
|
||||
|
||||
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
|
||||
|
||||
|
||||
### ~hint
|
||||
|
||||
If clicking the above image doesn't open the instructions, right-click on the image and choose "Save link as..." to download the PDF.
|
||||
|
||||
### ~
|
||||
|
||||

|
||||
|
||||
|
||||
|
@ -42,14 +42,12 @@ This activity uses sensor inputs. You may want to try the [Use](/getting-started
|
||||
|
||||
Follow the steps of the _Maker Design Process_ for this lesson:
|
||||
|
||||
| | |
|
||||
|-|-|
|
||||
|  | **Define the Problem** |
|
||||
|  | **Brainstorming** |
|
||||
|  | **Define the Design Criteria** |
|
||||
|  | **Go Make** |
|
||||
|  | **Review and Revise Your Solution** |
|
||||
|  | **Communicate Your Solution** |
|
||||
* Define the Problem
|
||||
* Brainstorming
|
||||
* Define the Design Criteria
|
||||
* Go Make
|
||||
* Review and Revise Your Solution
|
||||
* Communicate Your Solution
|
||||
|
||||
### Defining the Problem
|
||||
|
||||
|
@ -41,14 +41,12 @@ This activity uses motor rotations and sensor inputs. You may want to try the [U
|
||||
|
||||
Follow the steps of the _Maker Design Process_ for this lesson:
|
||||
|
||||
| | |
|
||||
|-|-|
|
||||
|  | **Define the Problem** |
|
||||
|  | **Brainstorming** |
|
||||
|  | **Define the Design Criteria** |
|
||||
|  | **Go Make** |
|
||||
|  | **Review and Revise Your Solution** |
|
||||
|  | **Communicate Your Solution** |
|
||||
* Define the Problem
|
||||
* Brainstorming
|
||||
* Define the Design Criteria
|
||||
* Go Make
|
||||
* Review and Revise Your Solution
|
||||
* Communicate Your Solution
|
||||
|
||||
### Defining the Problem
|
||||
|
||||
|
@ -13,8 +13,13 @@
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.topbar {
|
||||
background: rgb(170, 39, 143) !important;
|
||||
}
|
||||
|
||||
.ui.inverted.content {
|
||||
background: #00a5c8;
|
||||
/* background: #00a5c8; */
|
||||
background: #2a7af3;
|
||||
}
|
||||
|
||||
.content.segment {
|
||||
@ -73,10 +78,10 @@
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.c1 {
|
||||
margin-left: 63pt;
|
||||
.c2 {
|
||||
margin-left: 22.5pt;
|
||||
padding-top: 6pt;
|
||||
text-indent: -22.5pt;
|
||||
text-indent: -18pt;
|
||||
padding-bottom: 6pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
@ -85,25 +90,38 @@
|
||||
}
|
||||
|
||||
.c8 {
|
||||
margin-left: 58.5pt;
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 0pt;
|
||||
margin-left: 40.5pt;
|
||||
padding-top: 6pt;
|
||||
text-indent: -18pt;
|
||||
padding-bottom: 6pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c2 {
|
||||
color: #000000;
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
vertical-align: baseline;
|
||||
font-family: "Arial";
|
||||
font-style: normal
|
||||
.c15 {
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 12pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left;
|
||||
height: 11pt
|
||||
}
|
||||
|
||||
.c3 {
|
||||
.c7 {
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 0pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left;
|
||||
height: 11pt
|
||||
}
|
||||
|
||||
.c0 {
|
||||
margin-left: 23pt;
|
||||
padding-top: 6pt;
|
||||
padding-bottom: 6pt;
|
||||
line-height: 1.15;
|
||||
@ -112,16 +130,18 @@
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c17 {
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 12pt;
|
||||
.c10 {
|
||||
margin-left: 40.5pt;
|
||||
padding-top: 6pt;
|
||||
padding-bottom: 6pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c12 {
|
||||
.c6 {
|
||||
margin-left: 40.5pt;
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 0pt;
|
||||
line-height: 1.15;
|
||||
@ -130,74 +150,102 @@
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c6 {
|
||||
.c20 {
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 0pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.c4 {
|
||||
color: #000000;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
vertical-align: baseline;
|
||||
font-family: "Arial";
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
.c11 {
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 0pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c12 {
|
||||
padding-top: 6pt;
|
||||
padding-bottom: 6pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c3 {
|
||||
color: #000000;
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
vertical-align: baseline;
|
||||
font-family: "Arial";
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
.c16 {
|
||||
padding-top: 0pt;
|
||||
padding-bottom: 12pt;
|
||||
line-height: 1.15;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.c13 {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
vertical-align: baseline;
|
||||
font-family: "Arial";
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.c14 {
|
||||
text-decoration-skip-ink: none;
|
||||
-webkit-text-decoration-skip: none;
|
||||
color: #0000ff;
|
||||
color: #1155cc;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.c17 {
|
||||
background-color: #ffffff;
|
||||
max-width: 540pt;
|
||||
padding: 36pt 36pt 36pt 36pt
|
||||
}
|
||||
|
||||
.c18 {
|
||||
text-decoration-skip-ink: none;
|
||||
-webkit-text-decoration-skip: none;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.c19 {
|
||||
background-color: #ffffff;
|
||||
max-width: 468pt;
|
||||
padding: 72pt 72pt 72pt 72pt
|
||||
}
|
||||
|
||||
.c9 {
|
||||
margin-left: 40pt;
|
||||
text-indent: -18pt
|
||||
}
|
||||
|
||||
.c4 {
|
||||
color: inherit;
|
||||
text-decoration: inherit
|
||||
}
|
||||
|
||||
.c7 {
|
||||
margin-left: 59pt;
|
||||
text-indent: -18pt
|
||||
}
|
||||
|
||||
.c10 {
|
||||
font-size: 11pt
|
||||
}
|
||||
|
||||
.c0 {
|
||||
font-size: 10pt
|
||||
}
|
||||
|
||||
.c15 {
|
||||
margin-left: 36pt
|
||||
}
|
||||
|
||||
.c5 {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.c13 {
|
||||
margin-left: 23pt
|
||||
.c1 {
|
||||
font-size: 10pt
|
||||
}
|
||||
|
||||
.c16 {
|
||||
height: 11pt
|
||||
}
|
||||
|
||||
.c11 {
|
||||
font-size: 12pt
|
||||
.c19 {
|
||||
font-size: 11pt
|
||||
}
|
||||
|
||||
.terms .title {
|
||||
@ -320,23 +368,43 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
tickEvent = function (id, data) {
|
||||
if (!pxt.aiTrackEvent) return;
|
||||
if (!data) pxt.aiTrackEvent(id);
|
||||
else {
|
||||
var props = {};
|
||||
var measures = {};
|
||||
for (var k in data)
|
||||
if (typeof data[k] == "string") props[k] = data[k];
|
||||
else measures[k] = data[k];
|
||||
pxt.aiTrackEvent(id, props, measures);
|
||||
}
|
||||
}
|
||||
});
|
||||
function agreeCheckboxChanged() {
|
||||
var downloadSegment = document.getElementById("download-segment");
|
||||
downloadSegment.classList.toggle("hidden");
|
||||
}
|
||||
function downloadWin32() {
|
||||
function downloadWin64() {
|
||||
// TODO: Keep this link up-to-date with the desired release version
|
||||
window.open("http://makecode.com/api/release/ev3/v0.3.2/win32");
|
||||
window.open("https://makecode.com/api/release/ev3/v0.4.2/win64");
|
||||
tickEvent("offlineapp.download", { "target": "ev3", "platform": "win64" });
|
||||
}
|
||||
function downloadMac64() {
|
||||
// TODO: Keep this link up-to-date with the desired release version
|
||||
window.open("https://makecode.com/api/release/ev3/v0.4.2/mac64");
|
||||
tickEvent("offlineapp.download", { "target": "ev3", "platform": "mac64" });
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body id='root' class='root'>
|
||||
<body id="root" class="root">
|
||||
|
||||
<div class="ui inverted vertical center aligned segment content">
|
||||
|
||||
<div class="ui grid">
|
||||
<div class="ui grid topbar">
|
||||
<div class="three wide column">
|
||||
<img class="ui small image left" src="/static//lego_education_logo_white.png" />
|
||||
</div>
|
||||
@ -353,282 +421,286 @@
|
||||
Please read and accept the following terms to download the app.
|
||||
</div>
|
||||
<div class="ui left aligned segment terms">
|
||||
<div class="c19">
|
||||
<p class="c12">
|
||||
<span class="c6 c5 c11">MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS</span>
|
||||
<div class="c17">
|
||||
<p class="c11">
|
||||
<span class="c4 c1">MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS</span>
|
||||
</p>
|
||||
<p class="c12">
|
||||
<span class="c6 c5 c11">MICROSOFT MAKECODE SOFTWARE FOR LEGO MINDSTORMS EDUCATION EV3</span>
|
||||
<p class="c11">
|
||||
<span class="c4 c1">MICROSOFT MAKECODE FOR LEGO MINDSTORMS EDUCATION EV3</span>
|
||||
</p>
|
||||
<p class="c12 c16">
|
||||
<span class="c6 c0 c5"></span>
|
||||
<p class="c7">
|
||||
<span class="c4 c1"></span>
|
||||
</p>
|
||||
<p class="c12">
|
||||
<span class="c2 c0">These license terms are an agreement between Microsoft Corporation (or based on where you live, one
|
||||
<p class="c11">
|
||||
<span class="c3 c1">These license terms are an agreement between Microsoft Corporation (or based on where you live, one
|
||||
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 class="c12 c16">
|
||||
<span class="c2 c0"></span>
|
||||
<p class="c7">
|
||||
<span class="c3 c1"></span>
|
||||
</p>
|
||||
<p class="c12">
|
||||
<span class="c6 c5 c11">If you comply with these license terms, you have the rights below.</span>
|
||||
<p class="c11">
|
||||
<span class="c4 c1">IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">1.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">INSTALLATION AND USE RIGHTS. </span>
|
||||
<span class="c2 c0">You may install and use any number of copies of the software to evaluate it as you develop and test
|
||||
<p class="c2">
|
||||
<span class="c5 c1">1.</span>
|
||||
<span class="c1"> </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
|
||||
your software applications for use with Lego Mindstorms Education EV3 hardware.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">2.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">PRE-RELEASE SOFTWARE. </span>
|
||||
<span class="c2 c0">The software is a pre-release version. It may not work the way a final version of the software will.
|
||||
<p class="c2">
|
||||
<span class="c5 c1">2.</span>
|
||||
<span class="c1"> </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.
|
||||
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>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">3.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Associated Online Services.</span>
|
||||
<span class="c0"> Some features of the software may provide access
|
||||
<p class="c2">
|
||||
<span class="c5 c1">3.</span>
|
||||
<span class="c1"> </span>
|
||||
<span class="c5 c1">Associated Online Services.</span>
|
||||
<span class="c1"> Some features of the software may provide access
|
||||
to, or rely on, Azure online services, including an associated Azure online service to the software
|
||||
currently in development (the “corresponding service”). The use of those services
|
||||
(but not the software) is governed by the separate terms and privacy policies in the agreement
|
||||
under which you obtained the Azure services at</span>
|
||||
<span class="c0">
|
||||
<a class="c4" href="https://www.google.com/url?q=https://go.microsoft.com/fwLink/p/?LinkID%3D233178&sa=D&ust=1529526883494000"> </a>
|
||||
<span class="c1">
|
||||
<a class="c9" href="https://www.google.com/url?q=https://go.microsoft.com/fwLink/p/?LinkID%3D233178&sa=D&ust=1529596153826000"> </a>
|
||||
</span>
|
||||
<span class="c0 c18">
|
||||
<a class="c4" href="https://www.google.com/url?q=https://go.microsoft.com/fwLink/p/?LinkID%3D233178&sa=D&ust=1529526883494000">https://go.microsoft.com/fwLink/p/?LinkID=233178</a>
|
||||
<span class="c1 c18">
|
||||
<a class="c9" href="https://www.google.com/url?q=https://go.microsoft.com/fwLink/p/?LinkID%3D233178&sa=D&ust=1529596153826000">https://go.microsoft.com/fwLink/p/?LinkID=233178</a>
|
||||
</span>
|
||||
<span class="c2 c0"> (and, with respect to the corresponding service, the additional terms below). Please read them.
|
||||
<span class="c3 c1"> (and, with respect to the corresponding service, the additional terms below). Please read them.
|
||||
The services may not be available in all regions.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">4.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Licenses for other components.</span>
|
||||
<span class="c2 c0"> The software may include third party components with separate legal notices or governed by
|
||||
<p class="c2">
|
||||
<span class="c5 c1">4.</span>
|
||||
<span class="c1"> </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
|
||||
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
|
||||
exclusions of damages below also apply.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">5.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c6 c0 c5">DATA.</span>
|
||||
<p class="c2">
|
||||
<span class="c5 c1">5.</span>
|
||||
<span class="c1"> </span>
|
||||
<span class="c1 c4">DATA.</span>
|
||||
</p>
|
||||
<p class="c3 c7">
|
||||
<span class="c0 c5">a.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Data Collection. </span>
|
||||
<span class="c0">The software may collect information about you and your use of the software, and send that to Microsoft.
|
||||
<p class="c8">
|
||||
<span class="c5 c1">a.</span>
|
||||
<span class="c1"> </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.
|
||||
Microsoft may use this information to provide services and improve our products and 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>
|
||||
<span class="c0">
|
||||
<a class="c4" href="https://www.google.com/url?q=http://go.microsoft.com/fwlink/?LinkId%3D398505&sa=D&ust=1529526883495000"> </a>
|
||||
and use in the help documentation and the privacy statement at </span>
|
||||
<span class="c14 c1">
|
||||
<a class="c9" href="https://www.google.com/url?q=http://go.microsoft.com/fwlink/?LinkId%3D398505&sa=D&ust=1529596153827000">http://go.microsoft.com/fwlink/?LinkId=398505</a>
|
||||
</span>
|
||||
<span class="c0 c14">
|
||||
<a class="c4" href="https://www.google.com/url?q=http://go.microsoft.com/fwlink/?LinkId%3D398505&sa=D&ust=1529526883495000">http://go.microsoft.com/fwlink/?LinkId=398505</a>
|
||||
</span>
|
||||
<span class="c2 c0">. Your use of the software operates as your consent to these practices.</span>
|
||||
<span class="c1">.</span>
|
||||
<span class="c3 c1"> Your use of the software operates as your consent to these practices.</span>
|
||||
</p>
|
||||
<p class="c3 c7">
|
||||
<span class="c0 c5">b.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Processing of Personal Data. </span>
|
||||
<span class="c2 c0">To the extent Microsoft is a processor or subprocessor of personal data in connection with the software,
|
||||
<p class="c8">
|
||||
<span class="c5 c1">b.</span>
|
||||
<span class="c1"> </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,
|
||||
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 http://go.microsoft.com/?linkid=9840733.</span>
|
||||
of the Online Services Terms to all customers effective May 25, 2018, at </span>
|
||||
<span class="c1 c14">
|
||||
<a class="c9" href="https://www.google.com/url?q=http://go.microsoft.com/?linkid%3D9840733&sa=D&ust=1529596153828000">http://go.microsoft.com/?linkid=9840733</a>
|
||||
</span>
|
||||
<span class="c3 c1">.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">6.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">FEEDBACK. </span>
|
||||
<span class="c2 c0">If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the
|
||||
<p class="c2">
|
||||
<span class="c5 c1">6.</span>
|
||||
<span class="c1"> </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
|
||||
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
|
||||
or documentation to third parties because we include your feedback in them. These rights survive
|
||||
this agreement.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">7.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">SCOPE OF LICENSE.</span>
|
||||
<span class="c2 c0"> The software is licensed, not sold. This agreement only gives you some rights to use the software.
|
||||
<p class="c2">
|
||||
<span class="c5 c1">7.</span>
|
||||
<span class="c1"> </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.
|
||||
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
|
||||
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>
|
||||
</p>
|
||||
<p class="c1">
|
||||
<span class="c2 c0">- work around any technical limitations in the software;</span>
|
||||
<p class="c8">
|
||||
<span class="c3 c1">- work around any technical limitations in the software;</span>
|
||||
</p>
|
||||
<p class="c1">
|
||||
<span class="c2 c0">- 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 source components that may be included with the software;</span>
|
||||
<p class="c8">
|
||||
<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
|
||||
source components that may be included with the software;</span>
|
||||
</p>
|
||||
<p class="c1">
|
||||
<span class="c2 c0">- remove, minimize, block or modify any notices of Microsoft or its suppliers
|
||||
in the software;</span>
|
||||
<p class="c8">
|
||||
<span class="c3 c1">- remove, minimize, block or modify any notices of Microsoft or its suppliers in the
|
||||
software;
|
||||
</span>
|
||||
</p>
|
||||
<p class="c1">
|
||||
<span class="c2 c0">- use the software in any way that is against the law; or</span>
|
||||
<p class="c8">
|
||||
<span class="c3 c1">- use the software in any way that is against the law; or</span>
|
||||
</p>
|
||||
<p class="c1">
|
||||
<span class="c2 c0">- share, publish, rent or lease the software, or provide the software as a stand-alone
|
||||
<p class="c8">
|
||||
<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>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">8. UPDATES. </span>
|
||||
<span class="c2 c0">The software may periodically check for updates and download and install them for you. You may obtain
|
||||
<p class="c2">
|
||||
<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
|
||||
updates only from Microsoft or authorized sources. Microsoft may need to update your system 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.</span>
|
||||
devices.
|
||||
</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">9.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">EXPORT RESTRICTIONS.</span>
|
||||
<span class="c2 c0"> You must comply with all domestic and international export laws and regulations that apply
|
||||
<p class="c2">
|
||||
<span class="c5 c1">9.</span>
|
||||
<span class="c1"> </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
|
||||
to the software, which include restrictions on destinations, end users and end use. For further
|
||||
information on export restrictions, visit (aka.ms/exporting).</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">10.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">SUPPORT SERVICES. </span>
|
||||
<span class="c0 c2">Because the software is “as is,” we may not provide support services for it.</span>
|
||||
<p class="c2">
|
||||
<span class="c5 c1">10.</span>
|
||||
<span class="c1"> </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>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">11.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">ENTIRE AGREEMENT.</span>
|
||||
<span class="c2 c0"> This agreement, and the terms for supplements, updates, Internet-based services and support
|
||||
<p class="c2">
|
||||
<span class="c5 c1">11.</span>
|
||||
<span class="c1"> </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
|
||||
services that you use, are the entire agreement for the software and support services.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">12.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">APPLICABLE LAW. </span>
|
||||
<span class="c2 c0">If you acquired the software in the United States, Washington State law applies to interpretation
|
||||
<p class="c2">
|
||||
<span class="c5 c1">12.</span>
|
||||
<span class="c1"> </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
|
||||
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>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">13.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">CONSUMER RIGHTS; REGIONAL VARIATIONS. </span>
|
||||
<span class="c2 c0">This agreement describes certain legal rights. You may have other rights, including consumer rights,
|
||||
<p class="c2">
|
||||
<span class="c5 c1">13.</span>
|
||||
<span class="c1"> </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,
|
||||
under the laws of your state or country. Separate and apart from your relationship with Microsoft,
|
||||
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>
|
||||
</p>
|
||||
<p class="c3 c7">
|
||||
<span class="c0 c5">a.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Australia. </span>
|
||||
<span class="c2 c0">You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is
|
||||
<p class="c8">
|
||||
<span class="c5 c1">a.</span>
|
||||
<span class="c1"> </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
|
||||
intended to affect those rights.</span>
|
||||
</p>
|
||||
<p class="c3 c7">
|
||||
<span class="c0 c5">b.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Canada. </span>
|
||||
<span class="c2 c0">If you acquired the software in Canada, you may stop receiving updates by turning off the automatic
|
||||
<p class="c8">
|
||||
<span class="c5 c1">b.</span>
|
||||
<span class="c1"> </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
|
||||
update feature, disconnecting your device from the Internet (if and when you re-connect to 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>
|
||||
</p>
|
||||
<p class="c3 c7">
|
||||
<span class="c0 c5">c.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Germany and Austria</span>
|
||||
<span class="c2 c0">.</span>
|
||||
</p>
|
||||
<p class="c8">
|
||||
<span class="c0 c5">(i)</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Warranty</span>
|
||||
<span class="c2 c0">. The properly licensed software will perform substantially as described in any Microsoft materials
|
||||
<span class="c5 c1">c.</span>
|
||||
<span class="c1"> </span>
|
||||
<span class="c5 c1">Germany and Austria</span>
|
||||
<span class="c3 c1">.</span>
|
||||
</p>
|
||||
<p class="c6">
|
||||
<span class="c5 c1">(i)</span>
|
||||
<span class="c1"> </span>
|
||||
<span class="c5 c1">Warranty</span>
|
||||
<span class="c3 c1">. The properly licensed software will perform substantially as described in any Microsoft materials
|
||||
that accompany the software. However, Microsoft gives no contractual guarantee in relation to
|
||||
the licensed software.</span>
|
||||
</p>
|
||||
<p class="c8">
|
||||
<span class="c6 c0 c5"> </span>
|
||||
<p class="c6">
|
||||
<span class="c4 c1"> </span>
|
||||
</p>
|
||||
<p class="c8">
|
||||
<span class="c0 c5">(ii)</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">Limitation of Liability</span>
|
||||
<span class="c2 c0">. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as
|
||||
<p class="c6">
|
||||
<span class="c5 c1">(ii)</span>
|
||||
<span class="c1"> </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
|
||||
well as, in case of death or personal or physical injury, Microsoft is liable according to the
|
||||
statutory law.</span>
|
||||
</p>
|
||||
<p class="c3 c15">
|
||||
<span class="c2 c0">Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft
|
||||
<p class="c10">
|
||||
<span class="c3 c1">Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft
|
||||
is in breach of such material contractual obligations, the fulfillment of which facilitate the
|
||||
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 class="c3 c9">
|
||||
<span class="c0 c5">14.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c0 c5">LEGAL EFFECT.</span>
|
||||
<span class="c2 c0"> This agreement describes certain legal rights. You may have other rights under the laws of
|
||||
<p class="c2">
|
||||
<span class="c5 c1">14.</span>
|
||||
<span class="c1"> </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
|
||||
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>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">15.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c6 c0 c5">DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF
|
||||
<p class="c2">
|
||||
<span class="c5 c1">15.</span>
|
||||
<span class="c1"> </span>
|
||||
<span class="c4 c1">DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” 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
|
||||
FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.</span>
|
||||
</p>
|
||||
<p class="c3 c9">
|
||||
<span class="c0 c5">16.</span>
|
||||
<span class="c0"> </span>
|
||||
<span class="c6 c0 c5">LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT
|
||||
<p class="c2">
|
||||
<span class="c5 c1">16.</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
|
||||
DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST
|
||||
PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.</span>
|
||||
</p>
|
||||
<p class="c3 c13">
|
||||
<span class="c2 c0">This limitation applies to (a) anything related to the software, services, content (including code)
|
||||
<p class="c0">
|
||||
<span class="c3 c1">This limitation applies to (a) anything related to the software, services, content (including code)
|
||||
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>
|
||||
</p>
|
||||
<p class="c3 c13">
|
||||
<span class="c2 c0">It also applies even if Microsoft knew or should have known about the possibility of the damages.
|
||||
<p class="c0">
|
||||
<span class="c3 c1">It also applies even if Microsoft knew or should have known about 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>
|
||||
</p>
|
||||
<p class="c3">
|
||||
<span class="c6 c0 c5">Please note: As the software is distributed in Quebec, Canada, some of the clauses in this agreement
|
||||
<p class="c12">
|
||||
<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>
|
||||
</p>
|
||||
<p class="c3">
|
||||
<span class="c0 c5 c6">Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses
|
||||
<p class="c12">
|
||||
<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>
|
||||
</p>
|
||||
<p class="c12">
|
||||
<span class="c0 c5">EXONÉRATION DE GARANTIE.</span>
|
||||
<span class="c2 c0"> Le logiciel visé par une licence est offert « tel quel ». Toute utilisation
|
||||
<p class="c11">
|
||||
<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
|
||||
de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune
|
||||
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
|
||||
@ -636,59 +708,82 @@
|
||||
à un usage particulier et d’absence de contrefaçon sont exclues.
|
||||
</span>
|
||||
</p>
|
||||
<p class="c12">
|
||||
<span class="c0 c5">LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES.</span>
|
||||
<span class="c2 c0"> Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages
|
||||
<p class="c11">
|
||||
<span class="c5 c1">LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES.</span>
|
||||
<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
|
||||
accessoires et pertes de bénéfices.</span>
|
||||
</p>
|
||||
<p class="c3">
|
||||
<span class="c2 c0">Cette limitation concerne :</span>
|
||||
<p class="c12">
|
||||
<span class="c3 c1">Cette limitation concerne :</span>
|
||||
</p>
|
||||
<p class="c3">
|
||||
<span class="c2 c0">- tout ce qui est relié au logiciel, aux services ou au contenu
|
||||
<p class="c2">
|
||||
<span class="c3 c1">- tout ce qui est relié au logiciel, aux services ou au contenu
|
||||
(y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et</span>
|
||||
</p>
|
||||
<p class="c3">
|
||||
<span class="c2 c0">- les réclamations au titre de violation de contrat ou de garantie,
|
||||
<p class="c2">
|
||||
<span class="c3 c1">- les réclamations au titre de violation 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>
|
||||
</p>
|
||||
<p class="c3">
|
||||
<span class="c2 c0">Elle s’applique également, même si Microsoft connaissait ou devrait connaître
|
||||
<p class="c12">
|
||||
<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’exclusion ou la limitation de responsabilité pour les dommages indirects, 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>
|
||||
</p>
|
||||
<p class="c17">
|
||||
<span class="c0 c5">EFFET JURIDIQUE.</span>
|
||||
<span class="c2 c0"> Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres
|
||||
<p class="c16">
|
||||
<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
|
||||
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 class="c17 c16">
|
||||
<span class="c2 c0"></span>
|
||||
<p class="c15">
|
||||
<span class="c3 c1"></span>
|
||||
</p>
|
||||
<p class="c12">
|
||||
<span class="c2 c0"> </span>
|
||||
<p class="c16">
|
||||
<span class="c3 c1"> </span>
|
||||
</p>
|
||||
<p class="c12 c16">
|
||||
<span class="c2 c10"></span>
|
||||
<p class="c11">
|
||||
<span class="c3 c1">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.</span>
|
||||
</p>
|
||||
<p class="c11">
|
||||
<span class="c3 c1"> </span>
|
||||
</p>
|
||||
<p class="c20">
|
||||
<span class="c5 c1 c13">Remainder of this page intentionally left blank.</span>
|
||||
</p>
|
||||
<p class="c7">
|
||||
<span class="c3 c19"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui center aligned segment">
|
||||
<input id="agree-checkbox" type="checkbox" autocomplete="off" onchange="agreeCheckboxChanged(this)">
|
||||
<label for="agree-checkbox">I agree to the terms</label>
|
||||
<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>
|
||||
</label>
|
||||
</div>
|
||||
<div id="download-segment" class="ui center aligned segment hidden">
|
||||
<h3 class="ui">Windows</h3>
|
||||
<button class="ui icon button" onclick="downloadWin32()">
|
||||
<i class="download icon"></i>
|
||||
makecode-ev3-setup-win32.exe
|
||||
</button>
|
||||
<div class="ui grid">
|
||||
<div class="eight wide column">
|
||||
<h3 class="ui">Windows</h3>
|
||||
<button class="ui icon button" onclick="downloadWin64()">
|
||||
<i class="download icon"></i>
|
||||
makecode-ev3-setup-win64.exe
|
||||
</button>
|
||||
</div>
|
||||
<div class="eight wide column">
|
||||
<h3 class="ui">Mac OS</h3>
|
||||
<button class="ui icon button" onclick="downloadMac64()">
|
||||
<i class="download icon"></i>
|
||||
makecode-ev3-mac64.zip
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
BIN
docs/static/about/explorer-button.png
vendored
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
docs/static/about/explorer-view.png
vendored
Normal file
After Width: | Height: | Size: 10 KiB |
1
docs/static/githubfilelogo.svg
vendored
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16.097 2.686c-7.64 0-13.834 6.194-13.834 13.835 0 6.113 3.964 11.298 9.462 13.128.692.127.944-.301.944-.667 0-.328-.012-1.199-.019-2.353-3.848.836-4.66-1.855-4.66-1.855-.629-1.598-1.536-2.023-1.536-2.023-1.256-.859.095-.842.095-.842 1.388.099 2.119 1.426 2.119 1.426 1.234 2.114 3.238 1.504 4.027 1.15.125-.894.482-1.504.878-1.85-3.072-.349-6.302-1.536-6.302-6.838 0-1.51.539-2.745 1.424-3.712-.143-.35-.617-1.756.135-3.661 0 0 1.162-.372 3.805 1.418a13.228 13.228 0 0 1 3.464-.465c1.174.005 2.358.158 3.463.465 2.642-1.79 3.801-1.418 3.801-1.418.755 1.905.28 3.311.137 3.661.887.967 1.423 2.202 1.423 3.712 0 5.316-3.235 6.485-6.317 6.827.497.428.939 1.272.939 2.563 0 1.849-.017 3.341-.017 3.795 0 .37.249.8.951.665 5.494-1.833 9.454-7.015 9.454-13.126 0-7.641-6.195-13.835-13.836-13.835" fill="#696969"/></svg>
|
After Width: | Height: | Size: 973 B |
BIN
docs/static/setup/brickfw.jpg
vendored
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 102 KiB |
BIN
docs/static/setup/brickinfo.jpg
vendored
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 110 KiB |
@ -17,10 +17,10 @@ brick.showString("Hello world", 1)
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:show string||`` block, type the text ``"Press my buttons to make music!"`` to replace ``"Hello world"``.
|
||||
In the ``||brick:show string||`` block, type the text ``"Press my buttons!"`` to replace ``"Hello world"``.
|
||||
|
||||
```blocks
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
brick.showString("Press my buttons!", 1)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
@ -31,7 +31,7 @@ Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
brick.showString("Press my buttons!", 1)
|
||||
```
|
||||
|
||||
## Step 4
|
||||
@ -40,13 +40,13 @@ Open the ``||music:Music||`` Toolbox drawer. Drag out **5** ``||music:play tone|
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(0, music.beat(BeatFraction.Half))
|
||||
music.playTone(262, music.beat(BeatFraction.Half))
|
||||
music.playTone(262, music.beat(BeatFraction.Half))
|
||||
music.playTone(262, music.beat(BeatFraction.Half))
|
||||
music.playTone(262, music.beat(BeatFraction.Half))
|
||||
music.playTone(262, music.beat(BeatFraction.Half))
|
||||
})
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
brick.showString("Press my buttons!", 1)
|
||||
```
|
||||
|
||||
## Step 5
|
||||
@ -63,7 +63,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
music.playTone(196, music.beat(BeatFraction.Half))
|
||||
music.playTone(294, music.beat(BeatFraction.Whole))
|
||||
})
|
||||
brick.showString("Press my buttons to make music!", 1)
|
||||
brick.showString("Press my buttons!", 1)
|
||||
```
|
||||
|
||||
## Step 6
|
||||
|
@ -66,7 +66,7 @@ brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
## Step 5
|
||||
|
||||
Now, let’s add a Medium motor, and tell it how many rotations we want it to run for. Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``|brick:on button||`` blocks. In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``left`` and ``right`` buttons.
|
||||
Open the ``||brick:Brick||`` Toolbox drawer and drag out **2** ``|brick:on button||`` blocks. In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``left`` and ``right`` buttons.
|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
@ -106,9 +106,9 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
For the ``||motors:run||`` blocks that are in the ``||brick:on button left||`` and ``||brick:on button right||`` blocks, use the drop-down menu to select a ``medium motor`` on Port ``D``.
|
||||
|
||||
| | | |
|
||||
|-|-|-|
|
||||
|  | | |  |
|
||||

|
||||
<br/>
|
||||

|
||||
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
@ -16,7 +16,7 @@ brick.showString("Hello world", 1)
|
||||
|
||||
## Step 2
|
||||
|
||||
In the ``||brick:show string||`` block, type the text ``"Guess teh animal"`` to replace ``"Hello world"``.
|
||||
In the ``||brick:show string||`` block, type the text ``"Guess the animal"`` to replace ``"Hello world"``.
|
||||
|
||||
```blocks
|
||||
brick.showString("Guess the animal", 1)
|
||||
|
@ -30,7 +30,7 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
<div class="ui header">${lf("First time here?")}</div>
|
||||
<strong style="font-size:small">${lf("You must have version 1.10E or above of the firmware")}</strong>
|
||||
<div style="justify-content: center;display: flex;padding: 1rem;">
|
||||
<img class="ui image" src="./static/download/firmware.png" style="height:100px;" />
|
||||
<img class="ui image" src="/static/download/firmware.png" style="height:100px;" />
|
||||
</div>
|
||||
<a href="/troubleshoot" target="_blank">${lf("Check your firmware version here and update if needed")}</a>
|
||||
</div>
|
||||
@ -42,7 +42,7 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
<img class="ui medium rounded image" src="./static/download/connect.svg" style="height:109px;width:261px;margin-bottom:1rem;" />
|
||||
<img class="ui medium rounded image" src="/static/download/connect.svg" style="height:109px;width:261px;margin-bottom:1rem;" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
@ -57,7 +57,7 @@ pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): P
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
<img class="ui medium rounded image" src="./static/download/transfer.svg" style="height:109px;width:261px;margin-bottom:1rem;" />
|
||||
<img class="ui medium rounded image" src="/static/download/transfer.svg" style="height:109px;width:261px;margin-bottom:1rem;" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
|
@ -133,14 +133,27 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
this.setText(text);
|
||||
}
|
||||
|
||||
getFirstValue(text: string) {
|
||||
// Get first set of words up until last space
|
||||
return this.normalizeText_(text.substring(0, text.lastIndexOf(' ')));
|
||||
getFirstValue(value: string) {
|
||||
const typeValue = value.indexOf('large') != -1 ? 'large' : 'medium';
|
||||
const portValue = this.getSecondValue(value);
|
||||
const isDual = portValue.length > 1;
|
||||
return `${typeValue} motor${isDual ? 's' : ''}`;
|
||||
}
|
||||
|
||||
getSecondValue(text: string) {
|
||||
// Get last word
|
||||
return this.normalizeText_(text.match(/\S*$/)[0]);
|
||||
getSecondValue(value: string) {
|
||||
return (value.indexOf('large') != -1) ?
|
||||
value.substring(value.indexOf('large') + 5) :
|
||||
value.substring(value.indexOf('medium') + 6);
|
||||
}
|
||||
|
||||
getFirstValueI11n(value: string) {
|
||||
const firstValue = this.getFirstValue(value);
|
||||
const motorOptions = {
|
||||
'medium motor': lf('medium motor'),
|
||||
'large motor': lf('large motor'),
|
||||
'large motors': lf('large motors')
|
||||
}
|
||||
return motorOptions[firstValue];
|
||||
}
|
||||
|
||||
private normalizeText_(text: string) {
|
||||
@ -198,8 +211,8 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
if (text === null) {
|
||||
return text;
|
||||
}
|
||||
if (text.indexOf(' ') == -1) {
|
||||
text = `large motors ${text}`;
|
||||
if (text.indexOf('|') == -1) {
|
||||
text = this.sourceBlock_.RTL ? `${text}|${lf("large motors")}` : `${lf("large motors")}|${text}`;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
@ -296,16 +309,14 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
goog.dom.removeChildren(/** @type {!Element} */(this.textElement_));
|
||||
goog.dom.removeChildren(/** @type {!Element} */(this.textElement2_));
|
||||
|
||||
var text = this.text_;
|
||||
text = this.patchDualMotorText(text);
|
||||
|
||||
// First dropdown
|
||||
const textNode1 = document.createTextNode(this.getFirstValue(text));
|
||||
// Use one of the following options, medium motor, large motor or large motors (translated)
|
||||
const textNode1 = document.createTextNode(this.getFirstValueI11n(this.value_));
|
||||
this.textElement_.appendChild(textNode1);
|
||||
|
||||
// Second dropdown
|
||||
// Second dropdown, no need to translate. Only port numbers
|
||||
if (this.textElement2_) {
|
||||
const textNode2 = document.createTextNode(this.getSecondValue(text));
|
||||
const textNode2 = document.createTextNode(this.getSecondValue(this.value_));
|
||||
this.textElement2_.appendChild(textNode2);
|
||||
}
|
||||
this.updateWidth();
|
||||
@ -402,29 +413,28 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
contentDiv.setAttribute('aria-haspopup', 'true');
|
||||
let options = this.getOptions();
|
||||
|
||||
// Hashmap of options
|
||||
let opts = {};
|
||||
let conts = {};
|
||||
let vals = {};
|
||||
// Go through all option values and split them into groups
|
||||
for (let opt = 0; opt < options.length; opt++) {
|
||||
let text = options[opt][0].alt ? options[opt][0].alt : options[opt][0];
|
||||
if (text.indexOf(' ') == -1) {
|
||||
// Patch dual motors as they don't have prefixes.
|
||||
text = this.patchDualMotorText(text);
|
||||
if (options[opt][0].alt) options[opt][0].alt = text;
|
||||
}
|
||||
const value = options[opt][1];
|
||||
const firstValue = this.getFirstValue(text);
|
||||
const secondValue = this.getSecondValue(text);
|
||||
if (!opts[firstValue]) opts[firstValue] = [secondValue];
|
||||
else opts[firstValue].push(secondValue);
|
||||
// Store a hash of the original key value pairs for later
|
||||
const motorValue = value.substring(value.indexOf('.') + 1);
|
||||
const typeValue = motorValue.indexOf('large') == 0 ? 'large' : 'medium';
|
||||
const portValue = motorValue.indexOf('large') == 0 ? motorValue.substring(5) : motorValue.substring(6);
|
||||
const isDual = portValue.length > 1;
|
||||
|
||||
const text = `${typeValue} motor${isDual ? 's' : ''}|${portValue}`;
|
||||
const key = `${typeValue} motor${isDual ? 's' : ''}`;
|
||||
if (!opts[key]) opts[key] = [];
|
||||
opts[key].push(portValue);
|
||||
|
||||
conts[text] = options[opt][0];
|
||||
vals[text] = value;
|
||||
}
|
||||
|
||||
const currentFirst = this.getFirstValue(this.text_);
|
||||
const currentSecond = this.getSecondValue(this.text_);
|
||||
const currentFirst = this.getFirstValue(this.value_);
|
||||
const currentSecond = this.getSecondValue(this.value_);
|
||||
|
||||
if (!this.isFirst_) {
|
||||
options = opts[currentFirst];
|
||||
@ -432,9 +442,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
options = Object.keys(opts);
|
||||
// Flip the first and second options to make it sorted the way we want it (medium, large, dual)
|
||||
if (options.length == 3) {
|
||||
const temp = options[1];
|
||||
options[1] = options[0];
|
||||
options[0] = temp;
|
||||
options = [lf("medium motor"), lf("large motor"), lf("large motors")];
|
||||
} else {
|
||||
options.reverse();
|
||||
}
|
||||
@ -448,7 +456,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
const columns = options.length;
|
||||
|
||||
for (let i = 0, option: any; option = options[i]; i++) {
|
||||
let text = this.isFirst_ ? option + ' ' + opts[option][0] : currentFirst + ' ' + option;
|
||||
let text = this.isFirst_ ? option + '|' + (option.indexOf('motors') != -1 ? 'BC' : 'A') : currentFirst + '|' + option;
|
||||
text = text.replace(/\xA0/g, ' ');
|
||||
const content: any = conts[text];
|
||||
const value = vals[text];
|
||||
@ -466,7 +474,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
button.setAttribute('id', ':' + i); // For aria-activedescendant
|
||||
button.setAttribute('role', 'menuitem');
|
||||
button.setAttribute('class', 'blocklyDropDownButton');
|
||||
button.title = this.isFirst_ ? this.getFirstValue(content.alt) : content.alt;
|
||||
button.title = this.isFirst_ ? this.getFirstValueI11n(value) : this.getSecondValue(value);
|
||||
button.style.width = ((this.itemWidth_) - 8) + 'px';
|
||||
button.style.height = ((this.itemWidth_) - 8) + 'px';
|
||||
let backgroundColor = this.backgroundColour_;
|
||||
@ -495,7 +503,15 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
||||
contentDiv.removeAttribute('aria-activedescendant');
|
||||
});
|
||||
let buttonImg = document.createElement('img');
|
||||
buttonImg.src = this.isFirst_ ? isFirstUrl[option.replace(/\xA0/g, ' ')] : content.src;
|
||||
let imgSrc = content.src;
|
||||
if (this.isFirst_) {
|
||||
const motorValue = value.substring(value.indexOf('.') + 1);
|
||||
// Find out what kind of motor this is based on it's value, possible values: mediumX, largeX, and largeXY
|
||||
if (motorValue.indexOf('medium') == 0) imgSrc = isFirstUrl['medium motor'];
|
||||
else if (motorValue.length == 6) imgSrc = isFirstUrl['large motor'];
|
||||
else imgSrc = isFirstUrl['large motors'];
|
||||
}
|
||||
buttonImg.src = imgSrc;
|
||||
//buttonImg.alt = icon.alt;
|
||||
// Upon click/touch, we will be able to get the clicked element as e.target
|
||||
// Store a data attribute on all possible click targets so we can match it to the icon.
|
||||
|
@ -20,7 +20,7 @@ export class FieldMusic extends pxtblockly.FieldImages implements Blockly.FieldC
|
||||
private categoriesCache_: string[];
|
||||
|
||||
constructor(text: string, options: FieldMusicOptions, validator?: Function) {
|
||||
super(text, { sort: true, data: options.data }, validator);
|
||||
super(text, { blocksInfo: options.blocksInfo, sort: true, data: options.data }, validator);
|
||||
|
||||
this.columns_ = parseInt(options.columns) || 4;
|
||||
this.width_ = parseInt(options.width) || 380;
|
||||
|
@ -11,7 +11,7 @@ export class FieldPorts extends pxtblockly.FieldImages implements Blockly.FieldC
|
||||
public isFieldCustom_ = true;
|
||||
|
||||
constructor(text: string, options: FieldPortsOptions, validator?: Function) {
|
||||
super(text, { sort: true, data: options.data }, validator);
|
||||
super(text, { blocksInfo: options.blocksInfo, sort: true, data: options.data }, validator);
|
||||
|
||||
this.columns_ = parseInt(options.columns) || 4;
|
||||
this.width_ = parseInt(options.width) || 300;
|
||||
|
@ -1,285 +0,0 @@
|
||||
namespace pxt.editor {
|
||||
import HF2 = pxt.HF2
|
||||
import U = pxt.U
|
||||
|
||||
function log(msg: string) {
|
||||
pxt.log("EWRAP: " + msg)
|
||||
}
|
||||
|
||||
export interface DirEntry {
|
||||
name: string;
|
||||
md5?: string;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
const runTemplate = "C00882010084XX0060640301606400"
|
||||
const usbMagic = 0x3d3f
|
||||
|
||||
export class Ev3Wrapper {
|
||||
msgs = new U.PromiseBuffer<Uint8Array>()
|
||||
private cmdSeq = U.randomUint32() & 0xffff;
|
||||
private lock = new U.PromiseQueue();
|
||||
isStreaming = false;
|
||||
dataDump = false;
|
||||
|
||||
constructor(public io: pxt.HF2.PacketIO) {
|
||||
io.onData = buf => {
|
||||
buf = buf.slice(0, HF2.read16(buf, 0) + 2)
|
||||
if (HF2.read16(buf, 4) == usbMagic) {
|
||||
let code = HF2.read16(buf, 6)
|
||||
let payload = buf.slice(8)
|
||||
if (code == 1) {
|
||||
let str = U.uint8ArrayToString(payload)
|
||||
if (Util.isNodeJS)
|
||||
console.log("SERIAL: " + str.replace(/\n+$/, ""))
|
||||
else
|
||||
window.postMessage({
|
||||
type: 'serial',
|
||||
id: 'n/a', // TODO?
|
||||
data: str
|
||||
}, "*")
|
||||
} else
|
||||
console.log("Magic: " + code + ": " + U.toHex(payload))
|
||||
return
|
||||
}
|
||||
if (this.dataDump)
|
||||
log("RECV: " + U.toHex(buf))
|
||||
this.msgs.push(buf)
|
||||
}
|
||||
}
|
||||
|
||||
private allocCore(addSize: number, replyType: number) {
|
||||
let len = 5 + addSize
|
||||
let buf = new Uint8Array(len)
|
||||
HF2.write16(buf, 0, len - 2) // pktLen
|
||||
HF2.write16(buf, 2, this.cmdSeq++) // msgCount
|
||||
buf[4] = replyType
|
||||
return buf
|
||||
}
|
||||
|
||||
private allocSystem(addSize: number, cmd: number, replyType = 1) {
|
||||
let buf = this.allocCore(addSize + 1, replyType)
|
||||
buf[5] = cmd
|
||||
return buf
|
||||
}
|
||||
|
||||
private allocCustom(code: number, addSize = 0) {
|
||||
let buf = this.allocCore(1 + 2 + addSize, 0)
|
||||
HF2.write16(buf, 4, usbMagic)
|
||||
HF2.write16(buf, 6, code)
|
||||
return buf
|
||||
}
|
||||
|
||||
stopAsync() {
|
||||
return this.isVmAsync()
|
||||
.then(vm => {
|
||||
if (vm) return Promise.resolve();
|
||||
log(`stopping PXT app`)
|
||||
let buf = this.allocCustom(2)
|
||||
return this.justSendAsync(buf)
|
||||
.then(() => Promise.delay(500))
|
||||
})
|
||||
}
|
||||
|
||||
dmesgAsync() {
|
||||
log(`asking for DMESG buffer over serial`)
|
||||
let buf = this.allocCustom(3)
|
||||
return this.justSendAsync(buf)
|
||||
}
|
||||
|
||||
runAsync(path: string) {
|
||||
let codeHex = runTemplate.replace("XX", U.toHex(U.stringToUint8Array(path)))
|
||||
let code = U.fromHex(codeHex)
|
||||
let pkt = this.allocCore(2 + code.length, 0)
|
||||
HF2.write16(pkt, 5, 0x0800)
|
||||
U.memcpy(pkt, 7, code)
|
||||
log(`run ${path}`)
|
||||
return this.justSendAsync(pkt)
|
||||
}
|
||||
|
||||
justSendAsync(buf: Uint8Array) {
|
||||
return this.lock.enqueue("talk", () => {
|
||||
this.msgs.drain()
|
||||
if (this.dataDump)
|
||||
log("SEND: " + U.toHex(buf))
|
||||
return this.io.sendPacketAsync(buf)
|
||||
})
|
||||
}
|
||||
|
||||
talkAsync(buf: Uint8Array, altResponse = 0) {
|
||||
return this.lock.enqueue("talk", () => {
|
||||
this.msgs.drain()
|
||||
if (this.dataDump)
|
||||
log("TALK: " + U.toHex(buf))
|
||||
return this.io.sendPacketAsync(buf)
|
||||
.then(() => this.msgs.shiftAsync(1000))
|
||||
.then(resp => {
|
||||
if (resp[2] != buf[2] || resp[3] != buf[3])
|
||||
U.userError("msg count de-sync")
|
||||
if (buf[4] == 1) {
|
||||
if (altResponse != -1 && resp[5] != buf[5])
|
||||
U.userError("cmd de-sync")
|
||||
if (altResponse != -1 && resp[6] != 0 && resp[6] != altResponse)
|
||||
U.userError("cmd error: " + resp[6])
|
||||
}
|
||||
return resp
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
flashAsync(path: string, file: Uint8Array) {
|
||||
log(`write ${file.length} bytes to ${path}`)
|
||||
|
||||
let handle = -1
|
||||
|
||||
let loopAsync = (pos: number): Promise<void> => {
|
||||
if (pos >= file.length) return Promise.resolve()
|
||||
let size = file.length - pos
|
||||
if (size > 1000) size = 1000
|
||||
let upl = this.allocSystem(1 + size, 0x93, 0x1)
|
||||
upl[6] = handle
|
||||
U.memcpy(upl, 6 + 1, file, pos, size)
|
||||
return this.talkAsync(upl, 8) // 8=EOF
|
||||
.then(() => loopAsync(pos + size))
|
||||
}
|
||||
|
||||
let begin = this.allocSystem(4 + path.length + 1, 0x92)
|
||||
HF2.write32(begin, 6, file.length) // fileSize
|
||||
U.memcpy(begin, 10, U.stringToUint8Array(path))
|
||||
return this.lock.enqueue("file", () =>
|
||||
this.talkAsync(begin)
|
||||
.then(resp => {
|
||||
handle = resp[7]
|
||||
return loopAsync(0)
|
||||
}))
|
||||
}
|
||||
|
||||
lsAsync(path: string): Promise<DirEntry[]> {
|
||||
let lsReq = this.allocSystem(2 + path.length + 1, 0x99)
|
||||
HF2.write16(lsReq, 6, 1024) // maxRead
|
||||
U.memcpy(lsReq, 8, U.stringToUint8Array(path))
|
||||
|
||||
return this.talkAsync(lsReq, 8)
|
||||
.then(resp =>
|
||||
U.uint8ArrayToString(resp.slice(12)).split(/\n/).map(s => {
|
||||
if (!s) return null as DirEntry
|
||||
let m = /^([A-F0-9]+) ([A-F0-9]+) ([^\/]*)$/.exec(s)
|
||||
if (m)
|
||||
return {
|
||||
md5: m[1],
|
||||
size: parseInt(m[2], 16),
|
||||
name: m[3]
|
||||
}
|
||||
else
|
||||
return {
|
||||
name: s.replace(/\/$/, "")
|
||||
}
|
||||
}).filter(v => !!v))
|
||||
}
|
||||
|
||||
rmAsync(path: string): Promise<void> {
|
||||
log(`rm ${path}`)
|
||||
let rmReq = this.allocSystem(path.length + 1, 0x9c)
|
||||
U.memcpy(rmReq, 6, U.stringToUint8Array(path))
|
||||
|
||||
return this.talkAsync(rmReq, 5)
|
||||
.then(resp => { })
|
||||
}
|
||||
|
||||
isVmAsync(): Promise<boolean> {
|
||||
let path = "/no/such/dir"
|
||||
let mkdirReq = this.allocSystem(path.length + 1, 0x9b)
|
||||
U.memcpy(mkdirReq, 6, U.stringToUint8Array(path))
|
||||
return this.talkAsync(mkdirReq, -1)
|
||||
.then(resp => {
|
||||
let isVM = resp[6] == 0x05
|
||||
log(`${isVM ? "PXT app" : "VM"} running`)
|
||||
return isVM
|
||||
})
|
||||
}
|
||||
|
||||
private streamFileOnceAsync(path: string, cb: (d: Uint8Array) => void) {
|
||||
let fileSize = 0
|
||||
let filePtr = 0
|
||||
let handle = -1
|
||||
let resp = (buf: Uint8Array): Promise<void> => {
|
||||
if (buf[6] == 2) {
|
||||
// handle not ready - file is missing
|
||||
this.isStreaming = false
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
if (buf[6] != 0 && buf[6] != 8)
|
||||
U.userError("bad response when streaming file: " + buf[6] + " " + U.toHex(buf))
|
||||
|
||||
this.isStreaming = true
|
||||
fileSize = HF2.read32(buf, 7)
|
||||
if (handle == -1) {
|
||||
handle = buf[11]
|
||||
log(`stream on, handle=${handle}`)
|
||||
}
|
||||
let data = buf.slice(12)
|
||||
filePtr += data.length
|
||||
if (data.length > 0)
|
||||
cb(data)
|
||||
|
||||
if (buf[6] == 8) {
|
||||
// end of file
|
||||
this.isStreaming = false
|
||||
return this.rmAsync(path)
|
||||
}
|
||||
|
||||
let contFileReq = this.allocSystem(1 + 2, 0x97)
|
||||
HF2.write16(contFileReq, 7, 1000) // maxRead
|
||||
contFileReq[6] = handle
|
||||
return Promise.delay(data.length > 0 ? 0 : 500)
|
||||
.then(() => this.talkAsync(contFileReq, -1))
|
||||
.then(resp)
|
||||
}
|
||||
|
||||
let getFileReq = this.allocSystem(2 + path.length + 1, 0x96)
|
||||
HF2.write16(getFileReq, 6, 1000) // maxRead
|
||||
U.memcpy(getFileReq, 8, U.stringToUint8Array(path))
|
||||
return this.talkAsync(getFileReq, -1).then(resp)
|
||||
}
|
||||
|
||||
streamFileAsync(path: string, cb: (d: Uint8Array) => void) {
|
||||
let loop = (): Promise<void> =>
|
||||
this.lock.enqueue("file", () =>
|
||||
this.streamFileOnceAsync(path, cb))
|
||||
.then(() => Promise.delay(500))
|
||||
.then(loop)
|
||||
return loop()
|
||||
}
|
||||
|
||||
|
||||
downloadFileAsync(path: string, cb: (d: Uint8Array) => void) {
|
||||
return this.lock.enqueue("file", () =>
|
||||
this.streamFileOnceAsync(path, cb))
|
||||
}
|
||||
|
||||
|
||||
private initAsync() {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
private resetState() {
|
||||
|
||||
}
|
||||
|
||||
reconnectAsync(first = false): Promise<void> {
|
||||
this.resetState()
|
||||
if (first) return this.initAsync()
|
||||
log(`reconnect`);
|
||||
return this.io.reconnectAsync()
|
||||
.then(() => this.initAsync())
|
||||
}
|
||||
|
||||
disconnectAsync() {
|
||||
log(`disconnect`);
|
||||
return this.io.disconnectAsync()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,28 +1,3 @@
|
||||
{
|
||||
"name": "base",
|
||||
"description": "The base library",
|
||||
"files": [
|
||||
"README.md",
|
||||
"pxt-core.d.ts",
|
||||
"pxt.cpp",
|
||||
"pxtbase.h",
|
||||
"core.cpp",
|
||||
"pxt-helpers.ts",
|
||||
"buffer.cpp",
|
||||
"shims.d.ts",
|
||||
"enums.d.ts",
|
||||
"loops.cpp",
|
||||
"math.ts",
|
||||
"ns.ts",
|
||||
"control.cpp",
|
||||
"control.ts",
|
||||
"console.ts",
|
||||
"eventcontext.ts"
|
||||
],
|
||||
"testFiles": [
|
||||
"test.ts"
|
||||
],
|
||||
"additionalFilePath": "../../node_modules/pxt-common-packages/libs/base",
|
||||
"public": true,
|
||||
"dependencies": {}
|
||||
"additionalFilePath": "../../node_modules/pxt-common-packages/libs/base"
|
||||
}
|
||||
|
@ -368,7 +368,8 @@ namespace motors {
|
||||
}
|
||||
|
||||
private __move(steps: boolean, stepsOrTime: number, speed: number) {
|
||||
step(this._port, {
|
||||
control.dmesg("motor.__move")
|
||||
const p = {
|
||||
useSteps: steps,
|
||||
step1: 0,
|
||||
step2: stepsOrTime,
|
||||
@ -376,7 +377,10 @@ namespace motors {
|
||||
speed: this._regulated ? speed : undefined,
|
||||
power: this._regulated ? undefined : speed,
|
||||
useBrake: this._brake
|
||||
})
|
||||
};
|
||||
control.dmesg("motor.1")
|
||||
step(this._port, p)
|
||||
control.dmesg("motor.__move end")
|
||||
}
|
||||
|
||||
/**
|
||||
@ -706,24 +710,36 @@ namespace motors {
|
||||
}
|
||||
|
||||
function step(out: Output, opts: StepOptions) {
|
||||
control.dmesg('step')
|
||||
let op = opts.useSteps ? DAL.opOutputStepSpeed : DAL.opOutputTimeSpeed
|
||||
let speed = opts.speed
|
||||
if (speed == null) {
|
||||
if (undefined == speed) {
|
||||
speed = opts.power
|
||||
op = opts.useSteps ? DAL.opOutputStepPower : DAL.opOutputTimePower
|
||||
if (speed == null)
|
||||
if (undefined == speed)
|
||||
return
|
||||
}
|
||||
speed = Math.clamp(-100, 100, speed)
|
||||
control.dmesg('speed: ' + speed)
|
||||
|
||||
let b = mkCmd(out, op, 15)
|
||||
control.dmesg('STEP 5')
|
||||
b.setNumber(NumberFormat.Int8LE, 2, speed)
|
||||
// note that b[3] is padding
|
||||
control.dmesg('STEP 1')
|
||||
b.setNumber(NumberFormat.Int32LE, 4 + 4 * 0, opts.step1)
|
||||
control.dmesg('STEP 2')
|
||||
b.setNumber(NumberFormat.Int32LE, 4 + 4 * 1, opts.step2)
|
||||
control.dmesg('STEP 3')
|
||||
b.setNumber(NumberFormat.Int32LE, 4 + 4 * 2, opts.step3)
|
||||
b.setNumber(NumberFormat.Int8LE, 4 + 4 * 3, opts.useBrake ? 1 : 0)
|
||||
control.dmesg('STEP 4')
|
||||
control.dmesg('br ' + opts.useBrake);
|
||||
const br = !!opts.useBrake ? 1 : 0;
|
||||
control.dmesg('Step 4.5 ' + br)
|
||||
b.setNumber(NumberFormat.Int8LE, 4 + 4 * 3, br)
|
||||
control.dmesg('STEP 5')
|
||||
writePWM(b)
|
||||
control.dmesg('end step')
|
||||
}
|
||||
|
||||
const types = [0, 0, 0, 0]
|
||||
|
@ -1,9 +1,16 @@
|
||||
#ifndef __PXTCORE_H
|
||||
#define __PXTCORE_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace pxt {
|
||||
void dmesg(const char *fmt, ...);
|
||||
#define DMESG pxt::dmesg
|
||||
}
|
||||
|
||||
static inline void itoa(int v, char *dst) {
|
||||
|
||||
snprintf(dst, 30, "%d", v);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -9,5 +9,5 @@ sensors.ultrasonic1.pauseUntil(UltrasonicSensorEvent.ObjectDetected);
|
||||
## See Also
|
||||
|
||||
[on event](/reference/sensors/ultrasonic/on-event),
|
||||
[distance](reference/sensors/ultrasonic/distance),
|
||||
[pause until](reference/sensors/ultrasonic/pause-until)
|
||||
[distance](/reference/sensors/ultrasonic/distance),
|
||||
[pause until](/reference/sensors/ultrasonic/pause-until)
|
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-ev3",
|
||||
"version": "0.3.3",
|
||||
"version": "1.0.8",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-ev3",
|
||||
"version": "0.3.3",
|
||||
"version": "1.0.8",
|
||||
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
|
||||
"private": true,
|
||||
"keywords": [
|
||||
@ -39,8 +39,8 @@
|
||||
"webfonts-generator": "^0.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-common-packages": "0.23.38",
|
||||
"pxt-core": "3.20.8"
|
||||
"pxt-common-packages": "0.23.56",
|
||||
"pxt-core": "4.0.9"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node node_modules/pxt-core/built/pxt.js travis"
|
||||
|
@ -79,30 +79,33 @@
|
||||
},
|
||||
"appTheme": {
|
||||
"accentColor": "#0089BF",
|
||||
"logoUrl": "https://education.lego.com/",
|
||||
"logoWide": true,
|
||||
"logoUrl": "https://education.lego.com/",
|
||||
"logo": "./static/lego_education_logo.png",
|
||||
"docsLogo": "./static/lego-logo.svg",
|
||||
"portraitLogo": "./static/lego-logo.svg",
|
||||
"footerLogo": "./static/lego-logo.svg",
|
||||
"docsLogo": "./static/lego_education_logo.png",
|
||||
"portraitLogo": "./static/lego_education_logo.png",
|
||||
"cardLogo": "./static/icons/android-chrome-192x192.png",
|
||||
"appLogo": "./static/icons/android-chrome-192x192.png",
|
||||
"organization": "Microsoft MakeCode",
|
||||
"organizationUrl": "https://makecode.com/",
|
||||
"organizationUrl": "https://makecode.com/org",
|
||||
"organizationLogo": "./static/Microsoft-logo_rgb_c-gray-square.png",
|
||||
"organizationWideLogo": "./static/Microsoft-logo_rgb_c-gray.png",
|
||||
"homeUrl": "https://makecode.legoeducation.com/",
|
||||
"embedUrl": "https://makecode.legoeducation.com/",
|
||||
"homeUrl": "https://makecode.mindstorms.com/",
|
||||
"embedUrl": "https://makecode.mindstorms.com/",
|
||||
"privacyUrl": "https://go.microsoft.com/fwlink/?LinkId=521839",
|
||||
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
|
||||
"githubUrl": "https://github.com/Microsoft/pxt-ev3",
|
||||
"betaUrl": "https://makecode.legoeducation.com/about",
|
||||
"driveDisplayName": "EV3",
|
||||
"boardName": "LEGO® MINDSTORMS® Education EV3",
|
||||
"copyrightText": "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.",
|
||||
"crowdinProject": "kindscript",
|
||||
"selectLanguage": true,
|
||||
"availableLocales": [
|
||||
"en"
|
||||
"en",
|
||||
"de",
|
||||
"ja",
|
||||
"ru",
|
||||
"zh-CN"
|
||||
],
|
||||
"highContrast": true,
|
||||
"docMenu": [
|
||||
@ -127,6 +130,7 @@
|
||||
"path": "/reference"
|
||||
}
|
||||
],
|
||||
"print": true,
|
||||
"showHomeScreen": true,
|
||||
"homeScreenHero": "./static/hero.png",
|
||||
"invertedMenu": false,
|
||||
@ -135,6 +139,7 @@
|
||||
"invertedToolbox": false,
|
||||
"coloredToolbox": true,
|
||||
"hasAudio": true,
|
||||
"saveInMenu": true,
|
||||
"usbHelp": [],
|
||||
"extendEditor": true,
|
||||
"extendFieldEditors": true,
|
||||
@ -172,7 +177,7 @@
|
||||
"monacoColors": {
|
||||
"editor.background": "#f9f9f9"
|
||||
},
|
||||
"fileNameExclusiveFilter": "[^a-zA-Z]"
|
||||
"fileNameExclusiveFilter": "[^a-zA-Z0-9]"
|
||||
},
|
||||
"ignoreDocsErrors": true
|
||||
}
|
||||
|
@ -150,7 +150,8 @@ namespace pxsim {
|
||||
const step2 = this.speedCmdValues[2];
|
||||
const step3 = this.speedCmdValues[3];
|
||||
const brake = this.speedCmdValues[4];
|
||||
const dstep = (this.speedCmd == DAL.opOutputTimePower || this.speedCmd == DAL.opOutputTimeSpeed)
|
||||
const isTimeCommand = this.speedCmd == DAL.opOutputTimePower || this.speedCmd == DAL.opOutputTimeSpeed;
|
||||
const dstep = isTimeCommand
|
||||
? pxsim.U.now() - this.speedCmdTime
|
||||
: this.tacho - this.speedCmdTacho;
|
||||
if (dstep < step1) // rampup
|
||||
@ -161,6 +162,16 @@ namespace pxsim {
|
||||
this.speed = speed * (step1 + step2 + step3 - dstep) / (step1 + step2 + step3);
|
||||
else {
|
||||
if (brake) this.speed = 0;
|
||||
if (!isTimeCommand) {
|
||||
// we need to patch the actual position of the motor when
|
||||
// finishing the move as our integration step introduce errors
|
||||
const deltaAngle = -Math.sign(speed) * (dstep - (step1 + step2 + step3));
|
||||
if (deltaAngle) {
|
||||
this.angle += deltaAngle;
|
||||
this.tacho -= Math.abs(deltaAngle);
|
||||
this.setChangedState();
|
||||
}
|
||||
}
|
||||
this.clearSpeedCmd();
|
||||
}
|
||||
break;
|
||||
|
@ -15,6 +15,6 @@
|
||||
"Maker": "maker"
|
||||
},
|
||||
"electronManifest": {
|
||||
"latest": "v0.1.60"
|
||||
"latest": "v0.4.2"
|
||||
}
|
||||
}
|
||||
|
@ -33,11 +33,12 @@
|
||||
|
||||
/* Music field editor */
|
||||
|
||||
.blocklyDropdownText {
|
||||
.blocklyMusicFieldOptions .blocklyDropdownText, .blocklyMusicFieldCategories .blocklyDropdownText {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
line-height: 1.5rem;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.blocklyMusicFieldCategories {
|
||||
@ -47,6 +48,7 @@
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
font-size: 13px;
|
||||
}
|
||||
.blocklyMusicFieldOptions {
|
||||
margin-top: 80px;
|
||||
|