Compare commits

...

910 Commits

Author SHA1 Message Date
Dmitriy Antipov
6d222c50cb
Enable some features to improve the programming experience (#1022)
* Update pxtarget.json

Enable addNewTypeScriptFile so that you can split your code into multiple files. Enable blocksCollapsing to collapse blocks for convenience. Turn off highContrast it doesn't work now. We'll see later...

* enable-errorlist-option

* Update pxtarget.json

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

---------

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
2023-05-18 10:24:11 -07:00
Dmitriy Antipov
af263c8183
change-gray-ti-brown (#1021)
A typo that hadn't been noticed before. Does not affect the operation of the simulator.
2023-05-06 09:47:27 -07:00
Joey Wunderlich
dd18007035 1.4.32 2023-05-05 16:18:41 -07:00
Dmitriy Antipov
fba924d125
Add a none option to the simulator for the color sensor and colorEnumPicker extension (#1018)
* Update colorGrid.ts

* Update ns.ts

Added option to select emptiness (nothing) for the colorEnumPicker block.

* set-new-names-for-color-cells

Set new names for colored cells that pops up when hovering over an element. So the user will understand the color.

* Update sim/visuals/controls/colorGrid.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

---------

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
2023-05-05 16:04:13 -07:00
Dmitriy Antipov
76257775c3
Extended show screen blocks options (#1019)
* Update targetoverrides.ts

Convert old blocks to obsolete ones, new blocks differ in that you can specify the place to start printing along the horizontal axis of the screen (column). And also added a print style. These are the standard black text on a white background and the new white text on a black background. These two parameters are optionally expanded and optional, by default column = 1 and the print style is the same as before, black text on white.

* Update targetoverrides.ts

* Update libs/screen/targetoverrides.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

* Update libs/screen/targetoverrides.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

* Update libs/screen/targetoverrides.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

* Update libs/screen/targetoverrides.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

* Update libs/screen/targetoverrides.ts

---------

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
2023-05-05 15:58:52 -07:00
Dmitriy Antipov
9be35a1034
Added support for Reflection Raw mode for the color sensor to the simulator (#1017)
* redesigned-code-to-support-ref-raw

Code that adds reflection raw support for the color sensor. The range of values for this is from 0 to 1023, because analog to digital converter is 10 bits. In fact, the color sensor gives values ​​of about 400 - 700, but I decided to leave the range, which could theoretically be. For other cases (reflections and ambient lighting), the range remains from 0 to 100. The average value when setting the mode in the simulator is displayed as 512, for other modes 50%.

* block-description-update

Block description update, as it did not take into account the mode of raw reflection values.
2023-05-05 15:54:56 -07:00
Dmitriy Antipov
2ca706df70
Fix music images items in other languages (#1014)
* correction-of-displaying-pictures-in-different languages

Correction of displaying pictures in different languages. The category options values were translated into different languages and the translated values could not be checked against the values from icon.jres.

* element-layout-fixes

Уlement layout fixes, for more readable blocks

* Update fieldeditors/field_music.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

* Update fieldeditors/field_music.ts

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>

* tag-lang-tag-for-languages-other-than-en

The tag is not needed for English, because in the html tag it is already always set.

---------

Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
2023-05-05 15:50:04 -07:00
Dmitriy Antipov
dd415019c4
renderPorts-extra-checks-before-print (#1020)
When the program starts, when the showBoot() function is launched, the screenMode is checked and the showPorts function is launched, which in turn executes the renderPorts() function in a loop. While renderPorts is running, the screenMode may change, for example to ShowLines (when showString() was run). It may turn out that the mode has changed, and the renderPorts method has not been fully executed ... in the future, it will draw its own graphics on the screen, although we do not expect to see them already, because. a regime change has occurred. I added checks inside the function before displaying.
2023-05-05 15:46:43 -07:00
Joey Wunderlich
20581513b1 1.4.31 2023-04-29 17:22:20 -07:00
Dmitriy Antipov
1652fc5ffa
fix-bg-color (#1016) 2023-04-29 17:21:48 -07:00
Joey Wunderlich
8a1b6452bd
unpin beta (#1015) 2023-04-28 14:26:34 -07:00
Joey Wunderlich
a6712960db 1.4.30 2023-04-26 09:30:55 -07:00
Joey Wunderlich
bac70eb177 bump to pick up in ctx translations fix 2023-04-26 09:30:05 -07:00
Joey Wunderlich
830f5ffd77 1.4.29 2023-04-25 16:35:05 -07:00
Joey Wunderlich
aac5edd64b bump pxt to latest 7.2.* to pick up crowdin / build fixes 2023-04-25 16:25:21 -07:00
Joey Wunderlich
a54007d9ae 1.4.28 2023-04-25 14:56:21 -07:00
Joey Wunderlich
3952cb4858 1.4.27 2023-04-25 12:21:03 -07:00
Joey Wunderlich
0226888441
Change crowdin project to new name (kindscript->makecode) (#1013) 2023-04-25 12:20:42 -07:00
Joey Wunderlich
1373e9c0bc 1.4.26 2023-04-25 12:08:04 -07:00
Dmitriy Antipov
cabcb048e3
Troubleshooting updates v1.4.25 (#1012)
* sim_fix

ES version update

* fieldeditors-es-upgrade-to-es2017

Update es to fix issue with fieldeditors.

* editor-es-upgrade-to-es2017

Update es that fixes an issue with the editor.

* editor-download-dialog-fix

Solving a download error that arose due to problems with the buttons in the dialog box.

* return_field_motors

We return the fieldmotors field, because it is necessary about the choice of types of motors: medium, large, one or two.

* update-fields-for-motor-blocks

Set the blocks to the fieldmotors field. Change the name of the blocks for the motors.

* enable-debugger

Instead of the slowmo mode, which was before, a debugger was added, in which slowmo is present.

* fix-field-music

It turned out to update the fieldmusic menu. The menu is now displayed in the correct position.

* Update field_music.ts

* fix-field-brickbutton

Fixed issue with button select menu position from ev3 brick.

* Update dialogs.tsx

* Update field_motors.ts

Repartition of Label for fieldmotos, now it's more readable, it's better.

* motors-new-icon

Created new icons for motors for dropdown image.

* remove-ai-files-for-motors-icon

Remove ai image files for motors
2023-04-25 12:06:54 -07:00
microsoft-github-policy-service[bot]
512a441bca
Microsoft mandatory file (#1007)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2022-08-30 10:35:02 -07:00
pelikhan
b4a18f260d lock beta to 1.4.24 2022-01-29 13:29:33 -08:00
pelikhan
6b3f2da72c 1.4.25 2022-01-29 12:05:31 -08:00
Dmitriy Antipov
b9b21328b1
return_blocks (#1003)
These blocks are present in the stable version, but not in the beta.
2021-11-29 09:57:33 -08:00
Richard Knoll
bef4ebac43
Updating npm dependencies and getting the build to work (#1001)
* Updating npm dependencies and getting the build to work

* update node in github actions to 14.x
2021-09-22 15:51:32 -07:00
pelikhan
617fdeb747 1.4.24 2021-09-10 11:21:42 -07:00
Dmitriy Antipov
c1aead1aa9
fix invert motor angle metod (#999) 2021-09-09 14:11:06 -07:00
Richard Knoll
bd0cf05693
Adding gh-actions workflows (#995)
* Adding gh-actions workflows

* Removing travis

* Handle tags also
2021-01-27 14:57:14 -08:00
Galen Nickel
faae7133f5
Word changes to reduce policheck hits (#992) 2020-11-06 13:09:53 -08:00
Peli de Halleux
5289850351 bump to v1.2.31 2020-10-02 23:42:38 +02:00
Peli de Halleux
ba6e2f7174 enable french 2020-10-02 23:13:04 +02:00
peli
7c5dfc474f update version to v1.2.30 2020-09-20 23:47:53 -07:00
peli
5ab3a6ae96 1.4.23 2020-09-10 23:40:51 -07:00
Maciej Mroziński
ed2e1f23e9
Change timeout 1s -> 5s to reduce Timeout errors (#988) 2020-09-11 08:25:12 +02:00
Maciej Mroziński
a157943bf7
Read default volume from device settings at start (#987) 2020-09-09 12:06:33 -07:00
peli
40aaf0fb18 1.4.22 2020-09-08 23:54:42 -07:00
Maciej Mroziński
b26cf289c3
Change sound volume to level (#986) 2020-09-08 23:53:33 -07:00
Peli de Halleux
f0821f8d6c cherry-pick Cooperate (#985)
* cooperate pause

* fix math

* update lastPause before pausing

* faster cooperation

Co-authored-by: Peli de Halleux <peli@DESKTOP-5B7QRAM.corp.microsoft.com>
2020-08-21 06:09:01 +02:00
Richard Knoll
1db61720fc
Adding config file for service worker (#982) 2020-03-27 15:16:56 -07:00
shakao
ec2e561427
Updates for policheck (#975) 2020-02-24 09:39:25 -08:00
Peli
36d99c8a55 updated js logo 2020-02-09 21:50:52 -08:00
Peli
d003ef3f92 bump to 1.2.27 2020-01-19 22:00:36 -08:00
Peli
0723d4d7aa 1.4.21 2020-01-19 21:38:08 -08:00
Peli
e65b16474e shims 2020-01-19 21:38:01 -08:00
Peli
e8468ab62c don't close bt connection 2020-01-19 21:37:52 -08:00
Peli
8280937d92 missing icons 2020-01-19 20:50:41 -08:00
Peli
180eb0f74e fix typo 2020-01-19 20:23:59 -08:00
Peli
c16c4923af 1.4.20 2020-01-17 20:56:32 -08:00
Peli
a792da8058 bump pxt 2020-01-17 20:56:27 -08:00
Peli de Halleux
36b5d85dae
Prtest (#968)
* test pr

* test
2020-01-06 20:01:00 -08:00
Peli
3dc9b23802 other attempt 2020-01-06 19:54:57 -08:00
Peli
d767a21f2f updated path 2020-01-06 19:52:03 -08:00
Peli
b3d504b1dc only run compress image on new images 2020-01-06 19:48:15 -08:00
Peli
7f65f705c8 enable github editor 2020-01-06 16:41:53 -08:00
Galen Nickel
462aac0b65
Change launch type for 'Stop at Object' (#967) 2020-01-06 16:15:23 -08:00
Peli
28dec7efc8 1.4.19 2020-01-06 14:10:06 -08:00
Peli de Halleux
afa15f3f64
bump to pxt 5.31.8 (#966) 2020-01-06 14:09:03 -08:00
Galen Nickel
bdb8728b99 Include a note about NXT in FAQ (#964)
* Include a note about NXT in FAQ

* Get the actual NXT software link

* Optimised images with calibre/image-actions

* Move NXT note to about

* Revert "Optimised images with calibre/image-actions"

This reverts commit 0eab7eb803.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
2020-01-06 11:41:46 -08:00
Peli de Halleux
5f7bc850e4
rename config (#965)
* rename config

* move files

* Optimised images with calibre/image-actions

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-01-06 11:39:30 -08:00
Peli
2df0a146f6 ignore libs 2020-01-06 11:25:20 -08:00
Peli
ba241e0938 listing marshmallow programs 2019-12-15 22:50:29 -08:00
Peli
d3e7c13c9b 1.4.18 2019-12-14 13:00:31 -08:00
Peli
77f2ae61eb bump pxt 2019-12-14 10:50:54 -08:00
Peli
119bed0b75 1.4.17 2019-12-12 17:18:11 -08:00
Peli
3997819cda 1.4.16 2019-12-12 16:28:23 -08:00
Peli
804c569e84 bump pxt 2019-12-12 16:28:11 -08:00
Peli
8b7d93af03 added hash 2019-12-12 09:39:54 -08:00
Peli
a18fbd713c add filemanager section 2019-12-12 09:39:35 -08:00
Peli de Halleux
1ebb55d11f 1.4.15 2019-11-26 22:04:35 -08:00
Peli de Halleux
74cb02db8d bump pxt 2019-11-26 22:04:27 -08:00
Peli de Halleux
b88191ee54 1.4.14 2019-11-25 15:05:53 -08:00
Peli de Halleux
9c4acba7eb bump pxt 2019-11-25 15:05:47 -08:00
Peli de Halleux
87d22db6f3
bump pxt 5.28.31 (#958) 2019-11-26 00:04:30 +01:00
Peli de Halleux
d2cf715423 1.4.13 2019-11-16 16:50:13 -08:00
Peli de Halleux
60a74ac525 bump to pxt 5.28.24 2019-11-16 16:50:05 -08:00
Peli de Halleux
864ed608bb 1.4.12 2019-11-15 19:02:12 -08:00
Peli de Halleux
a8b9d3e0fd
bump pxt 5.28.23 (#957)
* bump pxt

* typo
2019-11-15 19:01:59 -08:00
Peli de Halleux
01d08c6d4f 1.4.11 2019-11-02 07:35:43 -07:00
Peli de Halleux
426ad005d5 bump pxt 5.28.11 2019-11-02 07:35:25 -07:00
Peli de Halleux
853625107c 1.4.10 2019-11-01 12:33:48 -07:00
Peli de Halleux
9c1b29cc80
bump pxt5.28.9 (#956) 2019-11-01 12:33:26 -07:00
Peli de Halleux
9badaffee9 1.4.9 2019-10-31 11:44:54 -07:00
Peli de Halleux
c3f539f396
Bump pxt 5.28.7 (#954)
* bump

* bump pxt
2019-10-31 10:22:37 -07:00
Peli de Halleux
991813fff7
update elecron version to 1.2.26 (#953) 2019-10-23 11:22:30 -07:00
Peli de Halleux
85a8f1c2c5 bump to v1.2.26 2019-10-20 16:37:57 -07:00
Peli de Halleux
ea33b81b2a is color detectedd 2019-10-20 09:31:09 -07:00
Peli de Halleux
c8381d7626 1.2.26 2019-10-20 09:02:44 -07:00
Peli de Halleux
62b5941143
is color detected (#952)
* added query function

* reshuffle
2019-10-20 09:02:17 -07:00
Peli de Halleux
1d5d18dc88 1.2.25 2019-10-18 22:53:46 -07:00
Peli de Halleux
bc4b71e0d6
Pulling updates from master (#951)
* show ports on start

* don't run show ports automatically

* polarity in synched motor (#945)

* account for polarity

* more comments

* handle dual motor in runtime

* invert steer

* don't use firmware polarity

* add block to stop program (#943)

* add block to stop program

* renaming

* fix translation
2019-10-18 22:53:30 -07:00
Peli de Halleux
5c47ce2f91 add stable path 2019-10-18 22:53:17 -07:00
Peli de Halleux
6a577287c1 1.4.8 2019-10-16 21:24:06 -07:00
Peli de Halleux
8bd884e155 bump blockly 2019-10-16 21:23:14 -07:00
Peli de Halleux
20be398c2c refactor constants 2019-10-13 09:32:43 -07:00
Peli de Halleux
ccf6164d87 logging 2019-10-13 09:22:07 -07:00
Peli de Halleux
58294883d7 blink fix (#949) 2019-10-13 00:36:44 -07:00
Peli de Halleux
00194d4aa6 1.2.24 2019-10-13 00:36:00 -07:00
Peli de Halleux
ec900f805e 1.2.23 2019-10-13 00:35:47 -07:00
Peli de Halleux
5f5bdd7294
blink fix (#949) 2019-10-13 00:35:20 -07:00
vincentl
38b2fc7b95 Add run it again to try tutorial to show where to find programs on brick (#947) 2019-10-12 15:36:13 -07:00
Peli de Halleux
8cc2f1219f 1.4.7 2019-10-11 21:56:27 -07:00
Peli de Halleux
39a629cc58 bump pxt 5.25.13 2019-10-11 21:50:00 -07:00
Peli de Halleux
df65c34f15 1.4.6 2019-10-10 09:16:19 -07:00
Peli de Halleux
00fefe10d6
Boot sequence (#946)
* refactor bootsequence

* inf can be null

* align elements
2019-10-10 09:15:57 -07:00
Peli de Halleux
d442f5aa41 don't ban image 2019-10-10 08:00:21 -07:00
Peli de Halleux
3311865817 1.4.5 2019-10-10 07:45:53 -07:00
Peli de Halleux
2cd2950496
polarity in synched motor (#945)
* account for polarity

* more comments

* handle dual motor in runtime

* invert steer

* don't use firmware polarity
2019-10-10 07:44:53 -07:00
Peli de Halleux
b0de3d8c1b 1.4.4 2019-10-09 15:40:54 -07:00
Peli de Halleux
acefe3ae11 bump pxt 2019-10-09 15:40:45 -07:00
Michał Moskal
cb6c83eec7 Add sources for the file manager program (#944) 2019-10-09 13:57:06 -07:00
Peli de Halleux
e0c8f65a65 1.4.3 2019-10-09 09:57:53 -07:00
Peli de Halleux
a4e02dcd03
add block to stop program (#943)
* add block to stop program

* renaming
2019-10-09 09:30:42 -07:00
Peli de Halleux
fb5776ec41 1.4.2 2019-10-08 22:19:50 -07:00
Peli de Halleux
d852fd961b fix python build 2019-10-08 22:19:34 -07:00
Peli de Halleux
1ed8122804 1.4.1 2019-10-08 21:58:33 -07:00
Michał Moskal
c5cec3a6ba update to pxt 5 and pxt-common-packages 6 (#934)
* bump pxt

* fix build issues

* Auto-gen of projects/summary

* removing feild editors moved to pxt

* various typing fixes

* more typing fixes

* fixing various typing issues

* Start on integration of new pxt

* serial number fixes

* gc-ify MMap object

* Re-build generated files

* fix console listeners

* clear lf() warnings

* More generated files

* also auto-generated

* Compilation fixes

* fix merge

* mostly fixing blocks

* fix sim

* fix field motors

* enable a few features

* moving to tsx

* try to fix edtiro compilation

* more defs

* removing commands

* removing extra $

* fix blockly warning

* hiding images

* enabling more pxt features

* hide images

* setup autorun

* add lock on target_reset

* update deps

* return trylock result

* updated pxt

* rename video section

* add alpha channel

* upgraded pxt

* bump pxt/version

* removed alpha ref

* var ceanup

* don't do major bump
2019-10-08 21:57:55 -07:00
Peli de Halleux
ba94322d4c 1.2.23 2019-10-08 21:26:38 -07:00
Peli de Halleux
225f1da6d5 fix translation 2019-10-08 21:26:17 -07:00
Peli de Halleux
a06331eef1 added channel 2019-10-08 14:23:57 -07:00
Peli de Halleux
aa741ce8de rename again 2019-10-08 14:21:55 -07:00
Peli de Halleux
61fe5091fe rename 2019-10-08 14:21:45 -07:00
Peli de Halleux
3d90e13797 shrinkg image 2019-10-08 14:21:12 -07:00
vincentl
469767a40a Add information to Try example to show where to find downloaded programs on the control brick. (#936) 2019-10-08 14:12:43 -07:00
Peli de Halleux
604fa764e6
Create calibreapp-image-actions.yml 2019-10-08 14:03:58 -07:00
Peli de Halleux
25cf2a9cdb
move electron to 1.2.22 (#937) 2019-10-07 14:43:34 -07:00
Peli de Halleux
7549f865d6 move master to 1.2.22 2019-10-02 13:59:58 -07:00
Peli de Halleux
a5de9d88bb adding latest video 2019-10-02 13:53:22 -07:00
Peli de Halleux
0437df10de 1.2.22 2019-10-02 13:27:53 -07:00
Peli de Halleux
2079173dfa
lock execution thread before exiting (#935) 2019-10-02 12:40:45 -07:00
Peli de Halleux
018a1e7528 added proportional line follower 2019-10-02 12:26:51 -07:00
Peli de Halleux
757f95d984 move master to v1.2.21 2019-10-02 10:59:50 -07:00
Peli de Halleux
8bc3fdc8ba 1.2.21 2019-10-01 15:56:22 -07:00
Peli de Halleux
e8a1e73cf5 1.2.20 2019-10-01 14:54:42 -07:00
Peli de Halleux
e9b2b239ad
More gyro lessons (#933)
* updated pauseuntil

* updated youtube link

* updated docs
2019-10-01 14:54:17 -07:00
Peli de Halleux
5ad2288a9f updated docs 2019-10-01 13:38:33 -07:00
Peli de Halleux
92d13ef343 updated bluetooth info 2019-10-01 13:36:53 -07:00
Peli de Halleux
471ca5d915 1.2.19 2019-10-01 13:28:01 -07:00
Peli de Halleux
f745079728
Don't reset threashold when resetting color mode (#932)
* don't reset threshold when changing modes

* updated docs
2019-10-01 13:27:37 -07:00
Peli de Halleux
d179f18ef3 added gyro movies 2019-10-01 11:05:44 -07:00
Peli de Halleux
805fc6c787 1.2.18 2019-10-01 10:12:21 -07:00
Peli de Halleux
374bbb8304
Drift-compensated angle in gyro (#931)
* compute angle based on undrifted rate

* add is calibrating function

* fix integrator

* added example

* docs

* poll faster
2019-10-01 10:11:58 -07:00
Peli de Halleux
25452efc92 1.2.17 2019-09-30 22:44:09 -07:00
Peli de Halleux
80b9c715b2
Gyro tutorials (#930)
* gyro tutorials

* tutorials

* fix gyro simulator

* images

* updated image

* fix svg errors
2019-09-30 22:43:50 -07:00
Peli
cb816c91ad updated drift 2019-09-30 14:33:57 -07:00
Peli
3012068986 1.2.16 2019-09-30 13:44:27 -07:00
Peli de Halleux
4c9c7d6a69
add delay to fix mac deployment (#929) 2019-09-30 13:43:12 -07:00
Peli
ad3652c290 bump master to 1.2.15 2019-09-30 13:03:48 -07:00
Peli de Halleux
d8971829e3 1.2.15 2019-09-30 11:13:45 -07:00
Peli de Halleux
8ca4558fc2
web serial cleanup (#928)
* updated ticks

* fix enable and compile

* add debug mode

* don't try to change UI while downloading

* cleanup

* don't double open

* use cu

* add delay before reconnecting

* support for 200 ragne in field turn ratio

* updated docs

* fix docs
2019-09-30 11:13:28 -07:00
Peli de Halleux
d85b5c5129
updated info for macs (#925) 2019-09-30 10:30:21 -07:00
Peli de Halleux
95b1c6a50f 1.2.14 2019-09-29 23:09:07 -07:00
Peli de Halleux
4dc2872286
Better bt download flow (#927)
* round the drif

* restart compile automatically

* add settle
2019-09-29 23:08:46 -07:00
Peli de Halleux
6c9ff804c8 1.2.13 2019-09-29 09:49:35 -07:00
Peli de Halleux
7581b5af9e
Drift support (#926)
* upgrading drift support

* updated showports

* typos
2019-09-29 09:49:13 -07:00
Peli de Halleux
07504027f9 1.2.12 2019-09-27 16:46:20 -07:00
Peli de Halleux
a0e133864a
background show ports (#924)
* background show ports

* render once at least

* better rendering

* bumped up scale
2019-09-27 16:45:57 -07:00
Peli de Halleux
0285711954 added automation package 2019-09-27 16:08:54 -07:00
Peli de Halleux
91be998d7e 1.2.11 2019-09-27 15:49:43 -07:00
Peli de Halleux
e862869327
Snap backwards (#923)
* snap to multiple of 5

* normalize negative values
2019-09-27 15:49:21 -07:00
Peli de Halleux
8047cb2612 beta notation 2019-09-27 11:45:25 -07:00
Peli de Halleux
8e2ffefd2c adding walkthrough video 2019-09-27 11:43:04 -07:00
Peli de Halleux
092e7b0522 1.2.10 2019-09-27 11:15:29 -07:00
Peli de Halleux
42454ecd57
graceful handling of bluetooth connectivity issues (#922)
* more cleanup

* cleanup life cycle

* more error checking
2019-09-27 11:15:10 -07:00
Peli de Halleux
2563fd6031 move image 2019-09-27 09:36:25 -07:00
Peli de Halleux
e0c1f2dca0 added other issue 2019-09-27 09:25:46 -07:00
Peli de Halleux
c80574ed3f 1.2.9 2019-09-27 09:16:45 -07:00
Peli de Halleux
b28b5cb6b7
better flow + handle unclosed connection (#921)
* better flow + handle unclosed connection

* more checks
2019-09-27 09:16:27 -07:00
Peli de Halleux
d1f11059db updated text 2019-09-27 08:46:50 -07:00
Peli de Halleux
6de5c6afdf added beta note 2019-09-27 06:56:03 -07:00
Peli de Halleux
b72c7c0c4f 1.2.8 2019-09-27 06:54:03 -07:00
Peli de Halleux
352c1ca5ec
Experiment BT support using Chrome web serial (#920)
* plumbing

* plumbing

* logging

* more notes

* fixing typing

* more plumbing

* more plumbing

* different baud rate

* talking to the brick

* first over the air drop

* fix buffer

* tweak paraetmers

* formatting fixing double upload

* reduce console.log

* cleanup

* add BLE button to download dialog

* changed label

* recover from broken COM port

* fix function call

* reduce log level

* adding ticks

* some help

* updated support matrix

* more docs

* updated browser help

* more docs

* add link

* add device

* added image
2019-09-27 06:53:26 -07:00
Peli de Halleux
6d940a9ec7
other color snesor tutorial (#919) 2019-09-25 22:35:10 -07:00
Peli de Halleux
c070173346 adding moods 2019-09-25 21:12:45 -07:00
Peli de Halleux
6fcf68f174 fix tutorial 2019-09-25 21:08:44 -07:00
Peli de Halleux
02f2a85d28 added images 2019-09-25 15:16:36 -07:00
Peli de Halleux
f63196908e updated robot 1 2019-09-25 13:20:20 -07:00
Peli de Halleux
ad48ee12ca 1.2.7 2019-09-24 21:45:20 -07:00
Peli de Halleux
83aeb24a98
broadcast project (#918)
* broadcast project

* revert chaanges
2019-09-24 21:44:59 -07:00
Peli de Halleux
fc5ecd9f10 added pause-on-start uttorial 2019-09-24 20:47:29 -07:00
Peli de Halleux
0b3b840ac1 1.2.6 2019-09-17 15:14:32 -07:00
Peli de Halleux
60c09809e7
Stall (#897)
* stall detection

* arrange blocks

* updated blocks

* tested on hw
2019-09-17 15:14:14 -07:00
Peli de Halleux
148067a143 1.2.5 2019-09-17 14:30:20 -07:00
Peli de Halleux
6f34887c94
Safepolling (#915)
* headstart on safe polling

* poke in sensors

* more poking

* typo
2019-09-17 14:30:02 -07:00
Peli de Halleux
64a9930c2e 1.2.4 2019-09-17 12:36:35 -07:00
Peli de Halleux
5815e16647
update pxt reference (#914) 2019-09-17 12:36:11 -07:00
Peli de Halleux
c4f5e425c2 1.2.3 2019-09-17 11:26:52 -07:00
Peli de Halleux
361ae7a2d2 adding a few pause to allow motors to settle 2019-09-17 11:23:40 -07:00
Peli de Halleux
3769402ade 1.2.2 2019-09-17 10:52:14 -07:00
Peli de Halleux
5c3c83eb52
add a run to avoid tight loop hogging (#913) 2019-09-17 10:52:00 -07:00
Peli de Halleux
0f07a89981 updated docs on offline-app 2019-09-11 19:37:26 -07:00
Abhijith Chatra
11d887a213
Releaseing offline app version 1.1.20 (#912) 2019-09-11 18:24:47 -07:00
Peli de Halleux
8150b2dbb0 fix turtle link 2019-09-11 13:23:09 -07:00
Peli de Halleux
89f41f23da 1.2.1 2019-09-10 07:13:42 -07:00
Galen Nickel
6b78e08053
Edits for 'citys shaper' robot tutorials (#911) 2019-09-09 16:59:12 -07:00
Peli de Halleux
186c86d2b1 rev minor version 2019-09-09 09:09:27 -07:00
Peli de Halleux
181c71d2dd 1.1.22 2019-09-09 09:08:50 -07:00
Peli de Halleux
be05da3232 enabled green screen 2019-09-09 09:08:38 -07:00
Peli de Halleux
5958157a76 1.1.21 2019-09-09 09:04:28 -07:00
Peli de Halleux
f72b825377
reenable permanent storage (#909) 2019-09-09 09:04:12 -07:00
Peli de Halleux
d76af5e5af moving turtle 2019-09-08 21:36:04 -07:00
Peli de Halleux
23f48db20b added turtle program 2019-09-08 21:29:27 -07:00
Peli de Halleux
2975bf2b55
Console to dmesg (#910)
* always pip console.log to dmesg

* trim new line

* restore storage

* restore new line

* remove unused variable
2019-09-07 18:22:39 -07:00
Peli de Halleux
5314515619
Crane mission (#907)
* dummy page

* robot 1 lesson

* added lesson 2

* added mission 2

* added link
2019-09-06 16:10:33 -07:00
Peli de Halleux
75b2db9f67
releasing to 1.1.20 (#908) 2019-09-06 14:24:19 -07:00
Peli de Halleux
cf2e39f1b2 renamed tutorial 2019-09-06 08:47:56 -07:00
Peli de Halleux
6d15d69aa1 updated fll page 2019-09-06 08:33:25 -07:00
Peli de Halleux
72a0940235 1.1.20 2019-09-06 06:22:43 -07:00
Peli de Halleux
b08dd8a7d2 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2019-09-06 06:22:36 -07:00
Peli de Halleux
def648a98b
Block updates follow blog post (#905)
* fix battery block comment

* update run phase blocks

* some more docs
2019-09-06 06:22:12 -07:00
Peli de Halleux
32a92789b3 fix battery block comment 2019-09-06 05:23:48 -07:00
Peli de Halleux
9956bb06fb adding wall follower 2019-09-04 21:42:08 -07:00
Peli de Halleux
83b9aecd7a 1.1.19 2019-09-04 14:52:02 -07:00
Peli de Halleux
17ab24eaa9
Ramp (#904)
* updated ramp block

* updated example
2019-09-04 14:51:45 -07:00
Peli de Halleux
9c5d5f9a86 updated block 2019-09-04 13:50:13 -07:00
Peli de Halleux
43a13e0877 added example 2019-09-04 13:42:29 -07:00
Peli de Halleux
fe0915484d 1.1.18 2019-09-04 12:57:17 -07:00
Peli de Halleux
87a65aa38f
battery properties (#903)
* Battery params

* move category

* cleanup

* use property

* fix level

* fix battery computation

* fix level comp

* docs
2019-09-04 12:56:45 -07:00
Michal Moskal
1317da8904 Remove old instructions 2019-09-03 17:34:34 -07:00
Michal Moskal
62b2881e2a Embed file deleter in PDF file so we can serve it 2019-09-03 16:29:31 -07:00
Michal Moskal
bf482a2ac9 Do ZIP not UF2 for file manager 2019-09-03 16:11:02 -07:00
Michal Moskal
243600ad8f Adding file manager program 2019-09-03 16:08:56 -07:00
Peli de Halleux
349caa4aed 1.1.17 2019-09-02 20:58:29 -07:00
Peli de Halleux
56bbcde299
Support for smooth acceleration/deceleration in run (#900)
* removed logging

* removing more logging

* always use step for single/multiple motors

* refactored schedule

* account for accel ramp up and down

* added default acc/decel

* rounding speed/angle

* remove hack

* use acceleration time in run too

* handle missing case

* adding notes on motors

* adding sample

* fixed ramp simulation

* clear defaults

* some docs, more later

* adding basic examples

* remove debug msg

* clean json

* added move schedule

* docs

* basic docs
2019-09-02 20:57:23 -07:00
Galen Nickel
7e9cc791ec Some edits for the new sensor/motor examples (#901)
* Some edits for the new sensor/motor examples

* article typo

* dark and bright

* fix block styling

* I like 'on'

* more block styling
2019-09-02 04:20:42 -07:00
Peli de Halleux
d5194b8d28
More samples (#896)
* coast or brake

* fix title

* added lesson
2019-08-31 06:05:36 -07:00
Peli de Halleux
12b1eb349b 1.1.16 2019-08-30 16:53:03 -07:00
Peli de Halleux
68dc195ea4
motor tutorials (#895)
* updated pivots

* redirect support to forum

* adding top level FLL link

* updated wording
2019-08-30 16:52:37 -07:00
Peli de Halleux
0251b914f2
color sensor examples (#894)
* tank zigzag

* reflected light measure

* adding links

* added reflected light calibration

* updated summary
2019-08-30 15:03:09 -07:00
Peli de Halleux
1fc818767c added vscode workspace 2019-08-30 13:57:27 -07:00
Peli de Halleux
9aeaec477f updated FLL page 2019-08-30 12:03:43 -07:00
Peli de Halleux
7fc796d2cb 1.1.15 2019-08-30 11:55:49 -07:00
Galen Nickel
cb1cd2a4b4 Tutorial category breakout (#437)
* Tutorial category breakout

* Put galleries in config

* restore default tutorial

* updated links

* update tutorials pages

* add infrared
2019-08-30 11:54:30 -07:00
Peli de Halleux
39bd7aa0eb 1.1.14 2019-08-30 10:59:15 -07:00
Peli de Halleux
140ba64462
Gyrofix (#893)
* disable drift correction by default

* disable drift correction

* better calibration sequence

* add comments

* updated comment about beta
2019-08-30 10:58:49 -07:00
Peli de Halleux
42fe96aa5a fix link 2019-08-30 09:40:41 -07:00
Peli de Halleux
1a5b42026d adding redirects for missing links 2019-08-30 09:39:28 -07:00
Peli de Halleux
9fe649aa3c fixed extensions.md 2019-08-30 05:48:41 -07:00
Peli de Halleux
a97dfb17b2 1.1.13 2019-08-30 05:41:11 -07:00
Peli de Halleux
277c9903bb
Tank fixes (#892)
* fixing turnration computation

* updated tank computation

* fix rendering glitch

* restore tank computation

* rounding errors
2019-08-30 05:40:51 -07:00
Peli de Halleux
0de8a84de2 1.1.12 2019-08-29 13:11:34 -07:00
Peli de Halleux
a302bbfc2b
Single tank (#891)
* add note about dual blocks

* fix simulator to match hardware

* updated wording
2019-08-29 13:11:01 -07:00
Peli de Halleux
bcb682b602 1.1.11 2019-08-28 23:00:03 -07:00
Peli de Halleux
e4a7531541
add rgbraw (#890) 2019-08-28 22:59:41 -07:00
Peli de Halleux
348964c888 1.1.10 2019-08-28 22:43:42 -07:00
Michał Moskal
8b3461bebd Add exitThread() polling the exit button (#888)
* Add exitThread() polling the exit button

* Add missing includes

* Remove redundant code
2019-08-28 22:43:21 -07:00
Peli de Halleux
e511630c2e
Update README.md 2019-08-28 16:27:03 -07:00
Peli de Halleux
db156d5df0
Update README.md 2019-08-28 16:24:55 -07:00
Peli de Halleux
93c6975400 1.1.9 2019-08-28 16:21:41 -07:00
Peli de Halleux
abc93dd7da
Multi sensor fix (#887)
* more logging

* set uart mode all at once

* updated logging

* pr feedback
2019-08-28 16:21:06 -07:00
Peli de Halleux
85cfc86bf8 1.1.8 2019-08-28 13:36:50 -07:00
Peli de Halleux
b66d4f2d64
enable storage extension (#886)
* enable storage extension

* fix -beta
2019-08-28 13:36:23 -07:00
Peli de Halleux
5843deab11 1.1.7 2019-08-28 11:39:18 -07:00
Peli de Halleux
8d5edc38bb
bump common version (#885) 2019-08-28 11:30:59 -07:00
Peli de Halleux
0309e50058 1.1.6 2019-08-28 08:52:24 -07:00
Peli de Halleux
aa40e7b169
Endprogram (#884)
* moving end program logic to c++

* typo

* always stop on reset
2019-08-28 08:52:01 -07:00
Peli de Halleux
75cf8da396 1.1.5 2019-08-27 17:57:44 -07:00
Max
db9b6a995b IIC added (#870)
* IIC added

* Fixed bug with not detecting device
2019-08-27 17:57:21 -07:00
Peli de Halleux
fb255edafe 1.1.4 2019-08-27 17:28:57 -07:00
Peli de Halleux
f4c39f74e8 1.1.3 2019-08-27 17:05:49 -07:00
Peli de Halleux
3e56e2c3e2
Rgb raw tuning of blocs (#883)
* refactor blocks

* make non-private
2019-08-27 17:05:16 -07:00
Dmitriy Antipov
79b5f8cc88 Add rgb and reflection raw mods for color sensor (#876)
* Add reflection raw value

Add reflection raw value for color sensor

* update

* Combined rgbraw and refraw
2019-08-27 16:45:12 -07:00
Peli de Halleux
312729142f 1.1.2 2019-08-27 16:42:36 -07:00
Max
5bd4aed0e1 Multiple sensors 2 (#877)
* Fixed -1 mode in libs

* Deleted todo
2019-08-27 16:34:55 -07:00
Peli de Halleux
cfaa4ae3ef migrate build to travis 2019-08-27 16:29:18 -07:00
Peli de Halleux
faa839d59f 1.1.1 2019-08-27 16:26:37 -07:00
Peli de Halleux
630687bfce bump to 1.1 2019-08-27 16:26:19 -07:00
Peli de Halleux
2b300a4094
Maximmasterr set settle (#882)
* Added set settle time

* updated blocks
2019-08-27 14:57:28 -07:00
Peli de Halleux
5fb8c0de6e delete package-lock.json 2019-08-27 14:45:25 -07:00
dsbibby
1f65cd59a8 Fixes to "Line Following in Loop" Sample Solutions (#871)
Sample Solutions were wrong for both Methods of Line Following in a Loop
2019-08-27 14:27:20 -07:00
dsbibby
fd75bb61d6 Fix typos in sample programme description (#872)
1500 milliseconds is not one quarter of a second - fixed the text to reflect.
2019-08-06 14:50:19 -07:00
Max
4d2f72575b Fixed multiple sensor bug (#868) 2019-07-15 15:26:25 -07:00
Galen Nickel
1fe3d3e01a plug in offline page (#836) 2019-03-07 19:40:21 -08:00
Abhijith Chatra
0c6e65d828
Updateing Trademark in readme (#834)
* Updateing Trademark in readme

* Removed chat reference
2019-03-04 16:39:23 -08:00
Abhijith Chatra
ae9c0603f2
Releasing electron 1.0.11 (#832) 2018-12-06 10:16:17 -08:00
Abhijith Chatra
06aeca228a
Updating offline-app.html to right version (#833) 2018-12-06 10:15:40 -08:00
Sam El-Husseini
31fd4799a5
Hot fix release (v1.0.11) (#831)
* Hot fix release (v1.0.10)
2018-12-04 13:24:06 -08:00
Sam El-Husseini
7d8e6891ee 1.0.11 2018-12-04 13:03:59 -08:00
Sam El-Husseini
462234b1c0
Re-enable trace from simulator configuration (#830) 2018-12-04 13:03:34 -08:00
Sam El-Husseini
dad1bd0cd4 1.0.10 2018-12-03 16:38:08 -08:00
Sam El-Husseini
b71bfef418
Call setOutputType with the right arguments (#828)
* Call setOutputType with the right arguments
2018-12-03 16:37:53 -08:00
Peli de Halleux
2e0a34c99b Calibration states (#820)
* color calibration
2018-12-03 16:37:40 -08:00
Galen Nickel
4133828a10 Update the join up link to the FLL Slack channel (#824) 2018-11-19 19:49:46 -08:00
Galen Nickel
f0c19bc976
Add LEGO video links to FLL page (#822) 2018-11-12 12:20:37 -08:00
Galen Nickel
a09b4a083f FLL page changes/add-ons (#821) 2018-11-12 12:02:19 -08:00
Peli de Halleux
15dff9af08
Update fll.md 2018-11-12 07:49:04 -08:00
Peli de Halleux
6fa5c1b688
Update fll.md 2018-11-12 07:47:31 -08:00
Peli de Halleux
d76cea1477 1.0.9 2018-11-06 09:08:51 -08:00
Galen Nickel
ca09a0a833 Add file delete workaround to 'FLL' page (#816) 2018-11-06 09:08:14 -08:00
Galen Nickel
fcc864823e Use single sentence 'getting-started' card (#817) 2018-11-05 18:04:42 -08:00
Galen Nickel
166dc27b93 Add FLL page to SUMMARY (#815) 2018-11-01 17:38:21 -07:00
Galen Nickel
66e50473c4 FLL info page (#814) 2018-11-01 07:46:43 -07:00
Abhijith
58452e1ca3 Fix for missing CAPS in certain parts of EULA 2018-10-26 09:13:03 -07:00
Abhijith Chatra
2b7498ea2d
Updating new EULA from legal (#813) 2018-10-26 09:09:11 -07:00
Sam El-Husseini
5ab2b97663 Remove titles from videos in homescreen (#812) 2018-10-23 08:44:02 -07:00
Sam El-Husseini
ffe0f0fb32 Enable tracing from simulator to appTheme (#810) 2018-10-17 11:33:18 -07:00
Abhijith Chatra
f27d13f88e
Updating offline docs to new release 1.0.8 (#808) 2018-09-26 16:26:35 -07:00
Peli de Halleux
31067dcef8 enable light toc 2018-09-26 16:13:15 -07:00
Abhijith Chatra
123f6c84b2
Release electron for auto update (#807)
This will enable auto update of the packages
2018-09-26 16:11:42 -07:00
Peli de Halleux
c5f07ca67c removing light toc 2018-09-26 15:43:20 -07:00
Peli de Halleux
22fc7dee18 added lighttoc 2018-09-26 15:42:28 -07:00
Abhijith Chatra
1f58b649c5 Release of 1.0.8 to live (#806)
Beta->release
2018-09-26 15:41:03 -07:00
Peli de Halleux
fc75fe8e16 fixed video title 2018-09-26 11:31:24 -07:00
Peli de Halleux
b399c37527 adding videos page to home 2018-09-26 11:28:32 -07:00
Sam El-Husseini
a054fdd3d3 1.0.8 2018-09-25 16:58:51 -07:00
Sam El-Husseini
a239589913 Move back to 4.0.9 2018-09-25 16:58:40 -07:00
Sam El-Husseini
98a046237c bump pxt-core to 4.1.1, 2018-09-25 16:56:45 -07:00
Sam El-Husseini
eb385ec532 1.0.7 2018-09-25 10:28:59 -07:00
Sam El-Husseini
2fdce16685
Update field motors editor to support localized languages (#803)
* Use the value for options, and hardcode localized versions of first dropdown
2018-09-25 10:28:34 -07:00
Abhijith
74eb77a9ae 1.0.6 2018-09-25 08:42:24 -07:00
Abhijith
4fba96588f Bumping pxt-core to 4.0.8 2018-09-25 07:56:19 -07:00
Peli de Halleux
03c07bdcf5 1.0.5 2018-09-21 20:00:18 -07:00
Peli de Halleux
6da1bc3cb1 bump pxt 2018-09-21 18:49:39 -07:00
Peli de Halleux
dfc9ca1db4 fxing leading / in docs 2018-09-21 14:07:11 -07:00
Peli de Halleux
83b64c1e54 1.0.4 2018-09-21 11:25:26 -07:00
Peli de Halleux
a0cf8655f2 updated pxt 2018-09-21 11:25:13 -07:00
Peli de Halleux
e4cf2c99c0 removoing lightToc 2018-09-21 11:07:04 -07:00
Peli de Halleux
076fb8487e 1.0.3 2018-09-21 09:41:31 -07:00
Peli de Halleux
c725561389 bump pxt 2018-09-21 09:41:19 -07:00
Peli de Halleux
3dc781f4fd remove docs in image paths 2018-09-21 09:38:48 -07:00
Galen Nickel
4456767f2d Change tables to bullet lists for docs (#789) 2018-09-20 17:07:38 -07:00
Peli de Halleux
6dba240899 1.0.2 2018-09-20 14:24:19 -07:00
Peli de Halleux
d7172a1f3a
Light theme docs (#786)
* lighttheme toc

* use LEGO edu logo everywhere

* bump pxt
2018-09-20 14:23:08 -07:00
Richard Knoll
245ff9d5b2 Adding link instructions (#787) 2018-09-20 14:05:59 -07:00
Galen Nickel
bfb258ce61 Add 'Explorer' section to editor features page (#785) 2018-09-20 07:35:24 -07:00
Peli de Halleux
63beb2cac7 missing github logo 2018-09-19 21:26:35 -07:00
Peli de Halleux
73d3dce139 missing comma 2018-09-19 16:16:37 -07:00
Peli de Halleux
21be8a5021 1.0.1 2018-09-19 16:09:35 -07:00
Peli de Halleux
03a82d6bcd
upgrade to pxt v4 (#783)
* upgrade to v4

* Update pxt-common-packages

* bump to 1.0
2018-09-19 16:09:05 -07:00
Peli de Halleux
60ea0f0cd5 allow for numbers in filename filter 2018-09-19 11:27:30 -07:00
Peli de Halleux
f69a0d5289 enable save in menu 2018-09-19 09:50:21 -07:00
Peli de Halleux
e2e8536b37
enable print (#779) 2018-09-19 09:48:48 -07:00
Abhijith Chatra
4096875a88
Removing beta tag (#781) 2018-09-19 09:39:12 -07:00
Abhijith Chatra
9825a90df2
Buildfix for lego and bumping common-packages to 0.23.54 (#780)
* fixing build failure

* Bumping common-packages to 0.23.54
2018-09-18 16:31:40 -07:00
Galen Nickel
7ad5d123a3 Replace brick info images (#777) 2018-09-18 15:46:13 -07:00
Galen Nickel
3599483ed2 Shorten showString and set default tone (#735) 2018-09-11 13:52:09 -07:00
Michał Moskal
7a6818931f
Derive 'base' package file list from pxt-common-packages (#770) 2018-09-04 08:23:11 -07:00
Galen Nickel
eda38ebbc4
Fix the double entry for 'About' in SUMMARY (#764) 2018-08-10 14:30:44 -07:00
Abhijith
026f7a3180 0.4.3 2018-07-18 11:35:43 -07:00
Galen Nickel
f58fcb60e2 Enable additional langs for new translations (#760) 2018-07-18 11:35:10 -07:00
Abhijith Chatra
dbda86abb5
Release 0.4.2 (#748)
This is release of latest editor
2018-07-13 16:10:05 -07:00
Abhijith Chatra
3c13565e7c
Beautify the download (#747) 2018-07-13 14:56:08 -07:00
Guillaume Jenkins
f8524cf1a7
Release app 0.4.2 (#742)
* Add MacOS download link and update Windows download link

* Update electron manifest to latest app
2018-07-13 16:10:01 -04:00
Abhijith
bf4b1090fc 0.4.2 2018-07-13 10:59:44 -07:00
Abhijith
ea4d8cf66a Bumping pxt-core to 3.21.7 and pxt-common-packages to 0.23.45 2018-07-13 10:57:35 -07:00
Abhijith Chatra
b32ae4e61a
Give a link to the instructions 2018-07-11 11:29:28 -07:00
Guillaume Jenkins
1df90a6ea3 0.4.1 2018-06-28 15:49:43 -04:00
Galen Nickel
09ac2a7a47
Run motors tutorial - step 5 fix 2018-06-25 13:15:34 -07:00
Peli de Halleux
06565995d3 fix offline app url 2018-06-22 14:54:08 -07:00
Guillaume Jenkins
1a73aec74d Release app 0.3.6 (#732) 2018-06-22 14:52:33 -07:00
Guillaume Jenkins
5516d041d6 Enable offline download page (#733)
* Enable offline download page

* avoid clashing with docs
2018-06-22 14:52:17 -07:00
Sam El-Husseini
7aac8ab5f3 Fix typo in what animal am I tutorial (#731) 2018-06-22 07:06:31 -07:00
Sam El-Husseini
73da17a395
Set organizationUrl to https://makecode.com/org so that it redirects to the about page, rather than makecode.com 2018-06-21 16:19:31 -07:00
Sam El-Husseini
16197f2987 Move to v0.4 2018-06-21 14:53:23 -07:00
Sam El-Husseini
5ec7eb6f04
Release v0.3.6 (#730) 2018-06-21 14:50:51 -07:00
Sam El-Husseini
f05ad887b8 0.3.6 2018-06-21 14:22:24 -07:00
Sam El-Husseini
c8a7b73101
Fix music field editor font size (#728) 2018-06-21 14:21:40 -07:00
Sam El-Husseini
0b9d029ecc 0.3.5 2018-06-21 13:24:13 -07:00
Sam El-Husseini
d6f0fee300 bump pxt-core to 3.20.11, bump pxt-common-packages to 0.23.39, 2018-06-21 13:24:08 -07:00
Peli de Halleux
d78b4c5ee3 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-06-21 13:12:51 -07:00
Peli de Halleux
13f5ebd6a7 legoeducation.com -> mindstorms.com 2018-06-21 13:12:44 -07:00
Guillaume Jenkins
ccbebabc55
Update offline page (#719)
* Update offline page

* Remove const
2018-06-21 13:51:09 -04:00
Peli de Halleux
5c61677ab9 0.3.4 2018-06-20 22:08:04 -07:00
Peli de Halleux
21025b5f83 better handling end of integration step 2018-06-20 22:03:48 -07:00
Sam El-Husseini
f9a0729b63 0.3.3 2018-06-20 16:49:36 -07:00
Sam El-Husseini
8e456f5c3c bump pxt-core to 3.20.8, bump pxt-common-packages to 0.23.38, 2018-06-20 16:49:30 -07:00
Peli de Halleux
e05e147d6a fix for motor driver (#716) 2018-06-20 16:45:02 -07:00
Sam El-Husseini
fc83cc5d5b
Fix note field editor authoring such that it limits the notes that show up (#715) 2018-06-20 16:29:03 -07:00
Sam El-Husseini
7974f36c31
Fix tank and steer blocks in the simulator, making them ignore polarity just like labview (#713) 2018-06-20 16:10:59 -07:00
Sam El-Husseini
6513dbc901
Remove object near tutorial, until we fix the issue with variables and decompile blocks (#710) 2018-06-20 16:00:17 -07:00
Peli de Halleux
97215e894a do a single green pulse when starting 2018-06-20 15:21:09 -07:00
Peli de Halleux
1368ee824b restoring consol eicon 2018-06-20 15:18:31 -07:00
Peli de Halleux
f2344ac52e
upgrading comm on packages (#708) 2018-06-20 13:59:20 -07:00
Guillaume Jenkins
299acea61f
Offline app download page (#707) 2018-06-20 16:37:15 -04:00
Guillaume Jenkins
a99f0212ac Fix browser download (#706) 2018-06-20 13:32:58 -07:00
Peli de Halleux
d128dad3dc
Startup sequence (#696)
* set light, play sound, show eyes, wait, clear screen, light

* play a sound, turn on lights
2018-06-20 13:32:00 -07:00
Peli de Halleux
3d7ebeb7b7 fixed 1.10 -> 1.10E 2018-06-18 08:16:16 -07:00
Galen Nickel
304cbb5ee3 Match Color Sensor ports in the 'Try' tutorial (#689) 2018-06-14 15:01:44 -07:00
Sam El-Husseini
0f7ec45db4
Fix home screen close icon background color (#687) 2018-06-14 11:55:14 -07:00
Sam El-Husseini
2bc2bda502
Fix extensions dialog header color (#686) 2018-06-14 11:03:20 -07:00
Guillaume Jenkins
51cb7a5299 0.3.2 2018-06-14 13:56:45 -04:00
Guillaume Jenkins
068eb7017f pxt.commands null check 2018-06-14 13:40:19 -04:00
Guillaume Jenkins
bb4966dca7
Bump pxt-core to 3.19.4 + Support drive deploy in Electron offline app (#677)
* initial

* Bump pxt-core to 3.19.4 for drive deploy
2018-06-14 13:33:53 -04:00
Sam El-Husseini
e981d1b95d Release patch fix with copyright text change (#680) 2018-06-13 16:11:52 -07:00
Sam El-Husseini
4f91d992a5 0.3.1 2018-06-13 14:49:52 -07:00
Sam El-Husseini
c91bf3ea7c Move master to v0.3 2018-06-13 14:49:24 -07:00
Sam El-Husseini
c6f92aa1cb
Update footer as a product of docupdates (#678) 2018-06-13 11:34:26 -07:00
Galen Nickel
5de5b64e61 Edits from LEGO team review (#676) 2018-06-12 06:46:44 -07:00
Sam El-Husseini
1d442b7de9
Fix piano field editor (when it's on its own) (#675) 2018-06-07 16:42:49 -07:00
Peli de Halleux
8508d5e8ba converting try into tutorial 2018-06-07 07:00:12 -07:00
Sam El-Husseini
f04a76a95f 0.1.62 2018-06-07 00:28:51 -07:00
Sam El-Husseini
88969da972 bump pxt-core to 3.18.17, bump pxt-common-packages to 0.23.15, 2018-06-07 00:28:45 -07:00
Guillaume Jenkins
b19e5c4e4b
Releasing app v0.1.60 2018-06-06 13:36:46 -04:00
Peli de Halleux
15caad8b02 0.1.61 2018-06-01 09:04:15 -07:00
Peli de Halleux
22ce6a8716
bump to pxt 3.18.10 (#671) 2018-06-01 09:03:47 -07:00
Peli de Halleux
c288242b9c
add "pause on run" flag to disable waiting after command (#663)
* add "pause on run" flag to disable waiting after command

* refactor

* fixing build
2018-06-01 08:51:50 -07:00
Sam El-Husseini
a8249e94c5 Make the troubleshoot menu item pop out into a new tab (#670) 2018-05-31 13:42:37 -07:00
Sam El-Husseini
92fbc1552b 0.1.60 2018-05-31 10:19:14 -07:00
Sam El-Husseini
92f29ef5d6 bump pxt-common-packages to 0.23.8, 2018-05-31 10:19:08 -07:00
Sam El-Husseini
c7fabfd994 0.1.59 2018-05-31 10:16:04 -07:00
Sam El-Husseini
df49475a26 bump pxt-core to 3.18.9, 2018-05-31 10:15:58 -07:00
Sam El-Husseini
17d8e61ebc 0.1.58 2018-05-31 10:13:17 -07:00
Sam El-Husseini
dbdc1810cd
Add copyright text (#667) 2018-05-30 15:42:37 -07:00
Peli de Halleux
d3b7530b17
EV3 Brick terminology (#665)
* reprhased

* EV3 brick => EV3 Brick

* revert a change
2018-05-30 15:42:17 -07:00
Peli de Halleux
e31f4c934f
Update README.md 2018-05-29 11:04:22 -07:00
Galen Nickel
b22ec74f7e Tshoot page edits (#658)
* T-shoot page edits post revert

* Restyle link

* Merge in revert page

* Clarify brick info step

* Keep periods off simple steps this time
2018-05-23 16:25:05 -07:00
Galen Nickel
cd38f670d2 T shoot page revert (#657)
* T-shoot page edits

* Revert t-shoot page
2018-05-23 12:04:32 -07:00
Galen Nickel (Aquent LLC)
8fca537251 T-shoot page edits 2018-05-23 11:18:46 -07:00
Abhijith Chatra
cf39956e2d
Tiny tweak to troubleshooting page 2018-05-23 09:10:47 -07:00
Peli de Halleux
9e3a8ab4ed updated troubleshoot page 2018-05-23 07:50:38 -07:00
Peli de Halleux
022a6765bf removing libs/automation, libs/chassis 2018-05-21 15:19:26 -07:00
Sam El-Husseini
1e4edc5109 Patch release (0.1.57) (#655)
Release 0.1.57 with tutorial fix patch
2018-05-18 14:26:13 -07:00
Peli de Halleux
caf273be84 fix line following paragraph 2018-05-18 13:53:59 -07:00
Guillaume Jenkins
ccba83cfab 0.1.57 2018-05-18 16:32:14 -04:00
Guillaume Jenkins
8417c6ce57 Bumping pxt-core to 3.13.29 2018-05-18 16:31:36 -04:00
Guillaume Jenkins
39236fe8b2
Release app 0.1.56 2018-05-18 10:51:16 -04:00
Abhijith Chatra
f50aabeec5 Update issue templates 2018-05-17 16:25:35 -07:00
Peli de Halleux
c2167b6405 0.1.56 2018-05-16 06:37:29 -07:00
Peli de Halleux
59dcd1ee72 fix another support link 2018-05-16 06:37:17 -07:00
Sam El-Husseini
bf8f73f885
Update favicon as per Lego spec (#650) 2018-05-15 13:40:55 -07:00
Sam El-Husseini
a81e3b9f11
Better description for stop all sounds. (#649) 2018-05-15 11:21:24 -07:00
Peli de Halleux
e90b6a7946 0.1.55 2018-05-15 07:41:06 -07:00
Peli de Halleux
7ce6c8b773 updated support with https link 2018-05-15 07:40:54 -07:00
Peli de Halleux
022651b338 removing blurb 2018-05-15 07:38:18 -07:00
Sam El-Husseini
8d0bc280a0
Adding prepare card. (#594) 2018-05-14 11:49:06 -07:00
Abhijith Chatra
7b61a8fbc3
Releasing patch 0.1.54 (#628) 2018-05-11 18:04:53 -07:00
Abhijith
1d45652ab2 0.1.54 2018-05-11 15:58:11 -07:00
Abhijith
4db9c8bc0a Bump pxt-core to 3.13.28 2018-05-11 15:57:54 -07:00
Peli de Halleux
df99fa1699 adding filename filter 2018-05-10 11:05:16 -07:00
Guillaume Jenkins
ef218bcc24 0.1.53 2018-05-09 15:02:27 -04:00
Guillaume Jenkins
99ccbfc348 0.1.52 2018-05-09 13:00:30 -04:00
Guillaume Jenkins
101306b8f8 Add crowdin project 2018-05-09 12:59:52 -04:00
Guillaume Jenkins
e167f109b0 0.1.51 2018-05-09 12:39:56 -04:00
Guillaume Jenkins
e5d78d65cb
Add crowdin to build (#591) 2018-05-09 12:39:25 -04:00
Sam El-Husseini
b79881ade0
Release 0.1.50 2018-05-07 16:52:57 -07:00
Sam El-Husseini
a05d12abdf 0.1.50 2018-05-07 15:13:07 -07:00
Sam El-Husseini
6c2cd1a658 Revert beta fix 2018-05-07 15:12:53 -07:00
Sam El-Husseini
90204ce58f 0.1.49 2018-05-07 15:07:28 -07:00
Sam El-Husseini
d8c4eeeb13 bump pxt-core to 3.12.26, 2018-05-07 15:07:22 -07:00
Sam El-Husseini
df6249931d
Update download dialog (#589) 2018-05-07 14:59:29 -07:00
Sam El-Husseini
de61919fc1
Don't use ```block in tutorials. (#588) 2018-05-07 13:20:10 -07:00
Peli de Halleux
105da90f3f Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-05-07 13:03:26 -07:00
Peli de Halleux
023fc8fe96 typo 2018-05-07 13:03:20 -07:00
Sam El-Husseini
442b014233 Release beta (#587) 2018-05-07 12:57:46 -07:00
Peli de Halleux
54681668ad 0.1.48 2018-05-07 12:35:51 -07:00
Peli de Halleux
db1724b9fa moving to .24 2018-05-07 12:29:30 -07:00
Sam El-Husseini
7ed5a9bca6 0.1.47 2018-05-07 11:25:04 -07:00
Sam El-Husseini
7de61c7254
Remove beta (#586) 2018-05-07 11:24:45 -07:00
Sam El-Husseini
df99f18c8d 0.1.46 2018-05-07 11:07:12 -07:00
Sam El-Husseini
6d7bd63c3a bump pxt-core to 3.12.23, 2018-05-07 11:07:06 -07:00
Guillaume Jenkins
9d1f39981d
Release electron 0.1.43 2018-05-07 10:01:47 -04:00
Peli de Halleux
e4e87c427d 0.1.45 2018-05-05 07:45:59 -07:00
Peli de Halleux
1fece05e5e bump pxt 2018-05-05 07:37:24 -07:00
Galen Nickel
186c7e2e3f Small tutorial fixes and FE image updates (#585) 2018-05-04 18:43:29 -07:00
Galen Nickel
3322119f35 Unplug tutorial intros from step path (#584) 2018-05-04 16:23:53 -07:00
Sam El-Husseini
515be621a0 0.1.44 2018-05-04 15:54:10 -07:00
Sam El-Husseini
b337f4cf1c bump pxt-core to 3.12.21, 2018-05-04 15:54:04 -07:00
Sam El-Husseini
e6e6016bc0 0.1.43 2018-05-04 10:37:55 -07:00
Sam El-Husseini
3f23f5afa8 bump pxt-core to 3.12.19, bump pxt-common-packages to 0.22.7, 2018-05-04 10:37:48 -07:00
Sam El-Husseini
f0df0222c0
Fixes for High contrast mode as per lego design. Most changes are in PXT. Adding high contrast theme in the simulator (#564) 2018-05-04 10:36:48 -07:00
Guillaume Jenkins
2a371b9cc6
Release electron v0.1.40 2018-05-04 10:04:39 -04:00
Peli de Halleux
3211999583 0.1.42 2018-05-03 17:07:09 -07:00
Peli de Halleux
b29862d566 update packaglock 2018-05-03 17:04:22 -07:00
Peli de Halleux
b262d944b7 bump pxt-core to 3.12.18, bump pxt-common-packages to 0.22.2, 2018-05-03 17:03:16 -07:00
Galen Nickel
1b89d08337 Reduce size of tutorial gifs (#562) 2018-05-03 17:02:22 -07:00
Sam El-Husseini
6bdae6547a 0.1.41 2018-05-03 15:03:24 -07:00
Sam El-Husseini
30a67b729d
Align all modules to a minimum height. (#563) 2018-05-03 15:02:13 -07:00
Peli de Halleux
3e2c61e212 0.1.40 2018-05-03 11:59:50 -07:00
Peli de Halleux
7a37dec196 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-05-03 11:48:19 -07:00
Peli de Halleux
bac792f188 upgrade firmware -> troubleshoot 2018-05-03 11:48:10 -07:00
Sam El-Husseini
e4c3fa0e57 Make the light around the color sensor appear bright and not a reflection of the current color detected. (#561) 2018-05-03 08:39:06 -07:00
Sam El-Husseini
76f7df7579 Update favicon 2018-05-03 08:06:39 -07:00
Peli de Halleux
d7e671175c 0.1.39 2018-05-03 06:57:18 -07:00
Peli de Halleux
f4b7230a67 remove "pxtrequire" 2018-05-03 06:55:50 -07:00
Peli de Halleux
afe0f9b0f7 updated pxt 2018-05-03 06:54:30 -07:00
Guillaume Jenkins
23b6edc4bf
Release app 0.1.36 2018-05-03 09:22:18 -04:00
Sam El-Husseini
13b3c1a194
Attempt to shorten color sensor ambient and reflected blocks by removing detected keyword (#560) 2018-05-02 22:09:04 -07:00
Peli de Halleux
7e58b9b699
Motor angle (#559)
* control angle with slider

* called changed state

* remove logging
2018-05-02 22:04:29 -07:00
Galen Nickel
08a860bd80 Update tutorial gifs to match new sim inputs (#558) 2018-05-02 17:15:29 -07:00
Sam El-Husseini
4a966a73f1 0.1.38 2018-05-02 16:24:41 -07:00
Sam El-Husseini
542216000c 0.1.37 2018-05-02 16:24:35 -07:00
Sam El-Husseini
b323929f03
Fix color grid on IE. (#556) 2018-05-02 16:23:53 -07:00
Sam El-Husseini
1e3647738d
Update download dialog. (#555) 2018-05-02 15:15:25 -07:00
Sam El-Husseini
838b3f7f9a 0.1.36 2018-05-02 15:07:55 -07:00
Sam El-Husseini
0ff2d7866d bump pxt-core to 3.12.16, 2018-05-02 15:07:45 -07:00
Sam El-Husseini
4c978d793a 0.1.35 2018-05-02 14:00:27 -07:00
Sam El-Husseini
06ca53ae89 Remove unused dependencies 2018-05-02 14:00:08 -07:00
Sam El-Husseini
84990d66a9
Update simulator as per latest lego UI design for sensors. Fix full screen layout issues. (#554) 2018-05-02 13:58:59 -07:00
Sam El-Husseini
4825172423
Update numbers music icon (from lego) (#553) 2018-05-02 13:55:44 -07:00
Sam El-Husseini
b69af383a6
Better mouse event handling (#552)
* Use learnings from touch events in Blockly and apply to the Ev3 sim. Register move and up events on the document rather than the individual element allowing users greater flexibility where they move their mouse once it's down.

* Add mouse leave events
2018-05-02 13:54:06 -07:00
Sam El-Husseini
6e1a613798 0.1.34 2018-05-02 12:58:27 -07:00
Sam El-Husseini
b5005f3b10 bump pxt-core to 3.12.12, 2018-05-02 12:57:46 -07:00
Guillaume Jenkins
044b585f24
Release Electron app v0.1.30 2018-05-02 10:13:07 -04:00
Peli de Halleux
94fe26e390 0.1.33 2018-05-01 22:05:57 -07:00
Peli de Halleux
ca832f52db upgrading pxt 2018-05-01 22:05:46 -07:00
Peli de Halleux
6f2fe212df
Tutorial updates (#551)
* updated line following, added simulator step

* full screen

* resizing some images
2018-05-01 21:53:28 -07:00
Peli de Halleux
96be357af1 updated package-lock 2018-05-01 16:16:19 -07:00
Sam El-Husseini
36df6cfb03 0.1.32 2018-05-01 14:13:09 -04:00
Sam El-Husseini
e1095b3d4a
Integrating field music icons (#549)
* Use the music icons provided by lego in the music field editor
2018-05-01 14:12:42 -04:00
Sam El-Husseini
9257e08f0d 0.1.31 2018-05-01 13:08:38 -04:00
Sam El-Husseini
149f256454 bump pxt-core to 3.12.9, 2018-05-01 13:08:33 -04:00
Sam El-Husseini
ba00d91bf2
Fixes for the download dialog (className), and update the location of the troubleshoot link. (#548) 2018-05-01 13:08:05 -04:00
Peli de Halleux
764994a633 updates to troubleshoot page 2018-05-01 08:48:02 -07:00
Sam El-Husseini
ab85cf2d0a
Remove jquery typings (#547) 2018-04-30 16:29:23 -04:00
Sam El-Husseini
ce7ecd5121
Update favicons to the lego icon. (#546) 2018-04-30 13:33:56 -04:00
Sam El-Husseini
40fb4107cf 0.1.30 2018-04-30 13:08:13 -04:00
Sam El-Husseini
9b8816f781 bump pxt-common-packages to 0.21.13, 2018-04-30 13:08:09 -04:00
Sam El-Husseini
27756d922e bump pxt-core to 3.12.5, 2018-04-30 13:06:45 -04:00
Sam El-Husseini
0b1d7068e9
Changes accompanying the new blockly toolbox (#545) 2018-04-30 13:06:24 -04:00
Guillaume Jenkins
0a5b4b9329 0.1.29 2018-04-27 10:55:37 -04:00
Guillaume Jenkins
2da1b3111f
Bumping pxt-core to 3.12.4 2018-04-27 10:55:07 -04:00
Guillaume Jenkins
f600ee270e 0.1.28 2018-04-27 10:53:34 -04:00
Peli de Halleux
7c3d499109
fix dmesg duplicate definition issue (#542) 2018-04-25 16:45:26 -04:00
Michał Moskal
8ed79e7133 Swap X/y in images (#528)
* Swap X/Y in image encoding

* Fix PNG decoder

* Now really fix png

* reducing deps

* moving png.cpp into ev3

* bumped pxt

* updated shims

* fixing c++ compilation

* updated shims

* Fix pixel order

* update pxt

* Fix C++ image decoding

* Add expanded PNG images

* Generate E1 format images (in libs/ev3 run 'pxt buildsprites images')

* Go back to white background

* Remove PNG support
2018-04-19 12:08:16 -07:00
Galen Nickel
95ab3be26e Diagram and linking fixes for 'Maker Design Process' (#533) 2018-04-18 13:15:53 -07:00
Sam El-Husseini
83700b4e14
Music field editor (#529)
Music fiele editor
2018-04-17 22:16:19 -07:00
Sam El-Husseini
989699c620 Update hero banner 2018-04-17 16:26:51 -07:00
Galen Nickel
e0c80361db
Editor feature page override with button images (#521)
* Editor feature page override with button images

* Update the 'about' a bit

* Bold the 'drivename'

* Add a ref to the editor features page in about
2018-04-17 16:10:54 -07:00
Galen Nickel
67153fccc5
Reduce the use of @boardname@ (#527)
* Reduce the use of @boardname@

* Use literal 'EV3 Brick' string instead

* Use the new 'nickname' form
2018-04-16 16:15:58 -07:00
Sam El-Husseini
3c96cfcc0a Change to always show the sensor controls. (#526) 2018-04-16 11:50:12 -07:00
Sam El-Husseini
03add213d9
Only using main loader for editor loader, other loaders use standard spinning loader. (#524) 2018-04-16 10:52:39 -07:00
Sam El-Husseini
e43837d358
Hide or remove logging (#523)
* Hide or remove logging

* Remote dmsg
2018-04-15 19:36:10 -07:00
Sam El-Husseini
be207282e3
Move blockly toolbox css to semantic.css (#522) 2018-04-15 10:29:37 -07:00
Sam El-Husseini
d6e4c5a717
Use pxtsemantic which includes only the semantic components we use in PXT. (#520) 2018-04-14 00:55:29 -07:00
Peli de Halleux
5384ec567d split editors (#516)
* spliteditor
2018-04-13 21:46:19 -07:00
Sam El-Husseini
6ea8a59f58
Release v0.1.27 (#519)
* Release v0.1.26

* Update index-ref.json
2018-04-13 21:03:43 -07:00
Sam El-Husseini
03c6100635 0.1.27 2018-04-13 20:52:51 -07:00
Sam El-Husseini
173b5dfd18 0.1.26 2018-04-13 20:06:50 -07:00
Sam El-Husseini
c86331b857 0.1.25 2018-04-13 20:06:16 -07:00
Sam El-Husseini
43a3942147 bump pxt-core to 3.8.15, 2018-04-13 20:06:09 -07:00
Sam El-Husseini
10cc883ef7
Fix serial editor theme. (#517) 2018-04-13 19:59:10 -07:00
Sam El-Husseini
2cbb3e05b0 Fix card border radius 2018-04-13 19:15:34 -07:00
Sam El-Husseini
eac73932be Release v0.1.24 (#515)
Release ev3
2018-04-13 17:04:27 -07:00
Sam El-Husseini
62e8f698a5 0.1.24 2018-04-13 15:53:09 -07:00
Sam El-Husseini
d0331720b4
Fix slider gradient bug when loading components from a previous sim run. (#514) 2018-04-13 15:52:38 -07:00
Sam El-Husseini
724ac19281 0.1.23 2018-04-13 15:24:28 -07:00
Sam El-Husseini
3e193e97bf bump pxt-core to 3.8.14, 2018-04-13 15:24:23 -07:00
Sam El-Husseini
23c1789976
Fix IE11 for in bug in motor field (#513)
* Fix IE11 for in bug in motor field

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

* lego feedback

* file name issues

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

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

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

* fixing threshold functions

* switch to reflected mode when calling threshold
2018-04-11 09:58:34 -06:00
Peli de Halleux
6c253182e4 0.1.16 2018-04-11 08:00:47 -07:00
Peli de Halleux
0198be6dda
add screen mode to auto clear screen between modes (#486) 2018-04-11 09:00:22 -06:00
Peli de Halleux
57ab6d153d added support links 2018-04-11 08:00:01 -07:00
Peli de Halleux
fd0bd4ef39 update drive name 2018-04-11 07:58:02 -07:00
Galen Nickel
8b2ae10980 Initial 'troubleshoot' page (#484)
* Initial 'troubleshoot' page

* Define 'driveDisplayName'

* Tutorial name goof

* Add fake label for drive

* And typo

* Add firmware update section

* Add a hint for offline firmware update
2018-04-11 08:57:29 -06:00
Peli de Halleux
4627328bcd
Output set Type fix (#487)
* properly send outputsettype info

* fix simulator

* bump pxt

* typo in docs
2018-04-11 08:48:07 -06:00
Galen Nickel
80989cf4c9 More tutorial typos (#485) 2018-04-11 08:45:44 -06:00
Galen Nickel
00b193b126 Add 'intruder alert' tutorial (#452)
* Add 'intrduer alert' tutorial

* Use 'detected' option instead of 'near'
2018-04-10 23:43:28 -06:00
Sam El-Husseini
e65db0b756
Update dimmer background, refactor top menu background. (#483)
Minor ui changes (dimmer background)
2018-04-10 12:48:00 -07:00
Sam El-Husseini
8f211a5c19
Use sort option in FieldImages to sort the options after showing the editor (not before) (#482) 2018-04-10 11:51:08 -07:00
Sam El-Husseini
379a6a26be
Add large and medium motor speed labels (#480)
* Add large and medium motor speed labels

* Support dual motor labels.
2018-04-10 11:50:58 -07:00
Sam El-Husseini
8398c8efdb Dispose correctly of gradient definitions in the control. Attach to port number not id. 2018-04-10 11:49:15 -07:00
Sam El-Husseini
f41310e879
Update large motor holes to be transparent (like the real thing) (#476) 2018-04-09 17:27:57 -07:00
Sam El-Husseini
82198020de 0.1.15 2018-04-09 17:22:07 -07:00
Sam El-Husseini
09d6b728b0 bump pxt-core to 3.8.6, 2018-04-09 17:22:01 -07:00
Sam El-Husseini
9147cb98c2
Updates to the download dialog. Fixes #424 (#443)
* Updates to the download dialog. Fixes #424
2018-04-09 17:20:38 -07:00
Sam El-Husseini
6d29cd40cb
Make both the simulator color picker and the Blockly editor color picker match in shape and the colors as well as order of colors. (#474) 2018-04-09 16:48:57 -07:00
Sam El-Husseini
d5b4ec5255
Center align the toggle buttons (#473) 2018-04-09 16:26:46 -07:00
Sam El-Husseini
b8286ab0b9
Medium motor resizing (#472) 2018-04-09 16:24:01 -07:00
Sam El-Husseini
ac1380ec92
Better screen zoom that makes use of the full width of the simulator. (#471) 2018-04-09 16:21:41 -07:00
Sam El-Husseini
a433988929
New motor field editor (#470)
* New motor field editor showing two dropdown, first to select the type and the second to select the port.
2018-04-09 15:59:28 -07:00
Sam El-Husseini
d837a515dc Fix brick color not changing to the color red. Fixes 453 (#456) 2018-04-08 03:35:02 -06:00
Sam El-Husseini
4be657e84d
Remove about from the help menu (#451) 2018-04-06 13:30:14 -07:00
Galen Nickel
c90f00f6d0
Object near tutorial (#445)
* Add 'Object Near?' tutorial

* Add to SUMMARY

* Fix screen line index

* Redo tutorial

* Paste fail typo
2018-04-06 13:09:27 -07:00
Sam El-Husseini
ecc880cf8d
Move on start to the top of the list in loops. (#448) 2018-04-06 09:51:54 -07:00
Peli de Halleux
fbb3280bc8
Showimagedelay (#446)
* add delay on "show image"

* removing optional duration
2018-04-05 20:42:03 -07:00
Sam El-Husseini
29f081eb03 Remove social share links from footer (#444) 2018-04-05 20:36:02 -07:00
Galen Nickel
49ab5ec099
Shrink some of the tutorial sentences (#440)
* Shrink some of the tutorial sentences

* Match the less than order for blocks

* Include later tutorials in SUMMARY

* Ditch 'using' in name
2018-04-05 17:32:32 -07:00
Peli de Halleux
5277cc847c
removing support for far in ultrasonic (#441)
* removing support for far in ultrasonic

* removing more far
2018-04-05 17:07:14 -07:00
Galen Nickel
e11b11d19c Add 'red light, green light' tutorial (#436) 2018-04-05 16:02:46 -07:00
Galen Nickel
57c1ae0f99
Add 'line following' tutorial (#435) 2018-04-05 13:37:24 -07:00
Peli de Halleux
2129601e6a 0.1.14 2018-04-05 11:03:20 -07:00
Peli de Halleux
e1727dc917
update pxt (#433)
* update pxt

* hide image field editors
2018-04-05 10:40:11 -07:00
Sam El-Husseini
ecc9319334 Switch the backing of the blocks JS toggle. (#431)
* Switch the backing of the blocks JS toggle.

* Minor changes
2018-04-05 06:48:27 -07:00
Galen Nickel
81758f2555 What color tutorial (#430)
* Add 'What color' tutorial

* More edits and thumbnail
2018-04-04 22:15:09 -07:00
Galen Nickel
7825bd1579 Use the correct sig for ultrasonic onEvent doc (#429) 2018-04-04 16:21:00 -07:00
Galen Nickel
ac81067f82
Tutorial format and macro fixes (#425)
* Tutorial format and macro fixes

* Remove branded names
2018-04-04 15:12:55 -07:00
Galen Nickel
b1958d77e7 Add 'Touch sensor values` tutorial (#421)
* Add 'Touch sensor values` tutorial

* Edits and thumbnail

* Modify activity to no restart motor
2018-04-04 13:57:40 -07:00
Galen Nickel
232744520b Remove 'examples' from summary (#423) 2018-04-04 13:57:17 -07:00
Galen Nickel
ac9ebf6776
Add 'Touch to Run` tutorial (#420)
* Add 'Touch to Run` tutorial

* Edits and thumbnail image
2018-04-03 21:33:53 -07:00
Galen Nickel
c97098b99e
Add 'Run Motors' tutorial (#419)
* Add 'Run Motors' tutorial

* Finish edits and add thumbnail
2018-04-03 20:53:35 -07:00
Galen Nickel
b39a7f3484 Add 'Mindstorms Music' tutorial (#418)
* Add 'Mindstorms Music' tutorial

* Add image and edits
2018-04-03 19:31:35 -07:00
Galen Nickel
806f60a419 Add 'What Animal Am I' tutorial (#417) 2018-04-03 17:55:15 -07:00
Galen Nickel
0bb7295d86
Press button tutorial (#416)
* Add tutorial for 'Make Animation'

* Finish off the tutorial
2018-04-03 16:37:07 -07:00
Galen Nickel
60bf3df1d8 Show mood tutorial prototype (#414)
* Show mood tutorial prototype

* Missed block styling
2018-04-03 15:45:11 -07:00
Galen Nickel
b8a3fa345f Include doc stubs for excluded music methods (#411) 2018-04-03 14:39:30 -07:00
Peli de Halleux
ec1ceea138
bump version to 0.1.13 (#407)
* bump version

* Light Condition -> Light

* roll back 0.1.11
2018-04-03 12:03:15 -07:00
Peli de Halleux
b618bfec59 0.1.13 2018-04-03 05:05:32 -07:00
Peli de Halleux
2467b3c4c9
renaming pauseforcolor to pause until color detected (#405)
* renaming pauseforcolor to pause until color detected

* pauseForLight -> pauseUntilLightConditionDetected

* on light changed -> on light condition detected

* fixing docs

* docs tweaks
2018-04-03 05:05:01 -07:00
Peli de Halleux
69194b0b76
Erase on showstring + showports improvements (#402)
* erase line before show string + show ports upgrade

* fixed font size

* fixing console output
2018-04-03 04:30:23 -07:00
Peli de Halleux
3339a7660a
moving motor properties to lower group (#403) 2018-04-03 04:30:10 -07:00
Galen Nickel
9c3be9fe37 Remove duplicate lessons (#391) 2018-04-03 04:11:48 -07:00
Peli de Halleux
c0413aa192
hiding the was pressed block (#401) 2018-04-03 04:10:35 -07:00
Peli de Halleux
6c626f9c98 0.1.12 2018-03-30 15:47:03 -07:00
Peli de Halleux
f95b39cd62 updated shims 2018-03-30 15:46:04 -07:00
Peli de Halleux
bba0af6193 adding defaults to music 2018-03-30 15:45:36 -07:00
Peli de Halleux
a8a92ca806 moving to 0.1.11 2018-03-30 14:51:20 -07:00
Peli de Halleux
6f066e4397 0.1.11 2018-03-30 13:32:37 -07:00
Peli de Halleux
7dd27b3da1 bumping pxt 2018-03-30 13:27:49 -07:00
Sam El-Husseini
41514cfa64 0.1.10 2018-03-30 09:56:55 -07:00
Sam El-Husseini
53ad94d0ad bump pxt-common-packages to 0.20.30, 2018-03-30 09:56:50 -07:00
Sam El-Husseini
220a774238 bump pxt-core to 3.6.2, 2018-03-30 09:48:28 -07:00
Sam El-Husseini
7444b28ebb Update monaco editor background 2018-03-30 09:11:13 -07:00
Galen Nickel
8abc137d60 Add 'showPorts' api doc (#392) 2018-03-29 16:43:17 -07:00
Galen Nickel
3cad464ea5
Activity category & description fixes (#390) 2018-03-29 15:16:26 -07:00
Guillaume Jenkins
b6b23314cb 0.1.9 2018-03-29 17:02:56 -04:00
Guillaume Jenkins
34381ed171 bump pxt-core to 3.6.1, 2018-03-29 17:02:50 -04:00
Guillaume Jenkins
a627d19ebf
Add locales entry to pxtarget (#389)
* Add locales entry to pxtarget

* Remove languages from targetconfig
2018-03-29 17:01:05 -04:00
Peli de Halleux
4cbdd72770 fixed support url 2018-03-28 21:36:53 -07:00
Peli de Halleux
6412d52f99 fixing tacho references 2018-03-28 21:28:15 -07:00
Peli de Halleux
c75bd0b06d 0.1.8 2018-03-28 21:20:56 -07:00
Peli de Halleux
79afed3667 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-03-28 21:20:54 -07:00
Peli de Halleux
e040407070 bumping pxt 2018-03-28 21:20:35 -07:00
Abhijith Chatra
123d41cb64 adding english to language option (#387) 2018-03-28 20:20:16 -07:00
Sam El-Husseini
0dc2548d0b
Optimize simulator for light mode. (#379)
* Optimize simulator for light mode.

* Add user-select none.
2018-03-28 13:36:52 -07:00
Guillaume Jenkins
b4b3a24ed2
test release manifest (#381) 2018-03-28 12:31:42 -04:00
Peli de Halleux
ed653e8a37 0.1.7 2018-03-28 09:05:10 -07:00
Peli de Halleux
31f91d4e24
upgrading to latest common packages (#383) 2018-03-28 09:04:49 -07:00
Peli de Halleux
8536126e23
removing tacho (#382) 2018-03-28 09:04:28 -07:00
Peli de Halleux
f1ea113fc0 0.1.6 2018-03-28 08:50:34 -07:00
Peli de Halleux
550528c695
bringing back show ports (#377)
* bringing back show ports

* added firmware links in docs

* updated color rendering

* better rendering of touch/ultra/ir

* better data per sensor
2018-03-28 08:50:14 -07:00
Sam El-Husseini
89e1819399
Applying home screen UI changes (#378) 2018-03-27 16:30:43 -07:00
Sam El-Husseini
e8fea031b2 0.1.5 2018-03-26 11:38:24 -07:00
Sam El-Husseini
0429c77d94 bump pxt-core to 3.5.11, 2018-03-26 11:38:20 -07:00
Galen Nickel
f41a646541 Small batch of 'activity' edits (#376) 2018-03-23 16:26:46 -07:00
Galen Nickel
988bec00b2
More updates for 'Try' and 'Use' topix (#375) 2018-03-22 14:16:14 -07:00
Sam El-Husseini
6e714caa2b Remove console log from colour field 2018-03-22 09:55:08 -07:00
Galen Nickel
336b7a5bf5 Incremental update to 'try' and 'use' topics (#374) 2018-03-21 12:36:49 -07:00
Galen Nickel
918dc802e9
Update 'make it faster' lesson (#373) 2018-03-20 16:11:32 -07:00
Galen Nickel
adbda6e35f
Update 'make it communicate' lesson (#372) 2018-03-19 21:07:30 -07:00
Sam El-Husseini
77365ddd92
Snap to a specific version of less and semantic ui. (#371) 2018-03-19 13:42:15 -07:00
Galen Nickel
5ba1e85f84 Update 'Make it Move WO Wheels' lesson (#370) 2018-03-19 13:27:44 -07:00
Galen Nickel
f577c61998 Make corrections to coding activities (#369)
* Make corrections to coding activities

* Bit of format and typos
2018-03-19 12:26:29 -07:00
Peli de Halleux
06f66571cf
Upgrading to pxt 3.5.4 (#367)
* pxt/common updates

* added game lib

* removing gamelib
2018-03-16 14:32:11 -07:00
Galen Nickel
d714e4df42 Update lessons and change images (#368)
* Update lessons and change images

* Delete suptopic file
2018-03-16 14:26:14 -07:00
Sam El-Husseini
fc877b889c 0.1.4 2018-03-08 14:34:47 -08:00
Sam El-Husseini
49dc3b0a75
Fix resizing of screen canvas to ensure it fits within the area in the ev3 svg (#365) 2018-03-08 14:34:27 -08:00
Sam El-Husseini
994e57c395
Remove all external packages, will add later the ones we want (#364) 2018-03-08 14:20:52 -08:00
Sam El-Husseini
a6298078ba 0.1.3 2018-03-08 14:15:48 -08:00
Sam El-Husseini
acc55506cb
Update index-ref.json 2018-03-08 14:14:33 -08:00
Galen Nickel
0c7d31770d Make a sound machine lesson (#363) 2018-03-08 07:12:52 -08:00
Galen Nickel
8c2ede17a0 'Make a security gadget' lesson (#362)
* Make a sound machine lesson

* Switch to security gadget
2018-03-08 07:12:18 -08:00
Sam El-Husseini
be55a342ff
Bring back the pxt footer (#361) 2018-03-07 09:49:49 -08:00
Sam El-Husseini
d356c87c83
Remove social buttons in footer (#360) 2018-03-07 09:46:57 -08:00
Galen Nickel
2abf59010e Import 'object detection' activity (#359) 2018-03-02 18:02:26 -07:00
Galen Nickel
9360f938b7 Import 'line detection' activity (#358) 2018-03-02 17:35:40 -07:00
Galen Nickel
3006af3e63 Import 'autonomous parking' activity (#357) 2018-03-02 17:03:40 -07:00
Sam El-Husseini
d5b55585cd Remove redundant color word in the color blocks, refer to the color sensor with 'color sensor' (#356) 2018-03-02 09:01:18 -07:00
Galen Nickel
ab3c4c5267 Example overrides for 'music' api docs (#353)
* Example overrides for 'music' api docs

* Drop 'music' into card page
2018-02-27 17:15:26 -08:00
Galen Nickel
6d07d5bd23 Consolidate 'coding' activities into single pages (#354) 2018-02-27 17:15:12 -08:00
Galen Nickel
eb45a76928 Example overrides for 'control' api docs (#352)
* Add 'playSound' api docs

* Example overrides for 'control' api docs
2018-02-27 15:12:23 -08:00
Peli de Halleux
fcba14aae1 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-02-27 11:48:54 -08:00
Peli de Halleux
44c68a7c0e fixing layout images 2018-02-27 11:48:50 -08:00
Peli de Halleux
d4b3ebc2e4
Missing updatestats (#351)
* aligning screeninit with pxt32

* remove shim

* missing shim

* missing shim
2018-02-26 21:25:04 -08:00
Peli de Halleux
fa5ba504c5 bump common packages 2018-02-26 16:21:18 -08:00
Peli de Halleux
2d639b9a90 pointing master to 0.1.2 2018-02-26 16:14:04 -08:00
Peli de Halleux
f8b8fbb1b4 0.1.2 2018-02-26 15:59:57 -08:00
Peli de Halleux
594ead703c
fixing mood block (#349) 2018-02-26 15:59:36 -08:00
Peli de Halleux
5f05934dda 0.1.1 2018-02-26 15:17:14 -08:00
Peli de Halleux
3e0ca1acb9 bump minor 2018-02-26 15:17:06 -08:00
Michał Moskal
c2d26a8418 Integrate screen APIs from common packages (#343)
* starting screen api intergration

* Further image integration

* Aligning with new screen apis

* Build fixes

* Adjust to common screen state

* Fix unpackPNG

* Add game library

* Optimize screen rendering

* bumping common packages

* updated shims

* moving images into ev3

* upgrading to common packages

* added try/use

* cap

* fixed tryp age
2018-02-26 15:16:17 -08:00
Sam El-Husseini
5bd9705966 0.0.109 2018-02-26 14:49:15 -08:00
Sam El-Husseini
1160d73b16 bump pxt-core to 3.4.9, bump pxt-common-packages to 0.20.3, 2018-02-26 14:49:00 -08:00
Sam El-Husseini
a2218d9ba5
Fix canvas (screen) user select options to disable selection in Safari, Mozilla, etc. (#348) 2018-02-26 13:58:51 -08:00
Sam El-Husseini
54576ae77a
Fix authoring of the mood field editor. (#347) 2018-02-26 13:52:26 -08:00
Sam El-Husseini
f16549d7cd 0.0.108 2018-02-26 13:38:20 -08:00
Sam El-Husseini
a021c0b292
Use a color picker for the color field (color enum picker) (#346) 2018-02-26 13:37:58 -08:00
Peli de Halleux
cda7013e96 fixing links 2018-02-26 13:27:03 -08:00
Peli de Halleux
2f0fefbeaf updated images 2018-02-26 13:25:53 -08:00
Peli de Halleux
b5303a660b 0.0.107 2018-02-26 11:22:44 -08:00
Sam El-Husseini
a60958f72a
Update search icon and avatar SVG (#345) 2018-02-26 10:43:29 -08:00
Peli de Halleux
33dcb6deee renaming infraredSensor to infrared (#344) 2018-02-26 10:39:15 -08:00
Guillaume Jenkins
130a47d684
Sensor names are now part of the block text (#341)
* Sensor names are now part of the block text

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

* Add in 'console' doc stuff

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

* Linkup summary
2018-02-22 16:23:07 -08:00
Galen Nickel
6524b0a841 Add 'timer' api docs (#339) 2018-02-22 14:56:15 -08:00
Peli de Halleux
d778232155 removing .mp4 file 2018-02-22 10:24:40 -08:00
Peli de Halleux
c157b4d922 0.0.106 2018-02-22 10:18:13 -08:00
Peli de Halleux
0837123828 bumping pxt 2018-02-22 10:15:58 -08:00
Peli de Halleux
e51a32b69f
use full motor names (#338) 2018-02-22 10:03:25 -08:00
Peli de Halleux
029066000d updated style 2018-02-22 08:28:42 -08:00
Peli de Halleux
7e35abeff3 lock on 0.0.104 2018-02-22 06:54:18 -08:00
Peli de Halleux
0166785c1b 0.0.105 2018-02-22 06:36:41 -08:00
Peli de Halleux
ea0f6a4734 updated pxt 2018-02-22 06:36:26 -08:00
Peli de Halleux
271721561d turn sample into blocks 2018-02-21 22:39:35 -08:00
Galen Nickel
ed8f8bafa7 Add 'infrared beacon' api topics (#330)
* Add 'infrared beacon' api topics

* Include note about channel selection
2018-02-21 22:35:51 -08:00
Galen Nickel
8cfb70c97b Threshold api docs - 01 (#336)
* Local commit

* Throw on more topics

* Throw in threshold topics for infrared
2018-02-21 22:35:25 -08:00
Galen Nickel
84c8e31ff5 First burst of 'color' pages (#335)
* Add 'color sensor' api topics

* Last set of edits/adds
2018-02-21 14:03:55 -08:00
Peli de Halleux
ceb9b7fabf 0.0.104 2018-02-21 06:45:29 -08:00
Peli de Halleux
9e0670551f upgrading pxt 2018-02-21 06:45:14 -08:00
Peli de Halleux
6613607503
Make it comm lesson (#331)
* integrating lego lesson

* fixed link

* adding various solutions

* updatring to 3.4.6

* using play sound effect until done

* revert pxtversion

* fixing link
2018-02-21 06:43:53 -08:00
Galen Nickel
3a67190914
Add some 'infrared' api docs (#326)
* Add some 'infrared' api docs

* Fix display messages

* Change discussion of distance to relative

* Include motor speed note
2018-02-20 10:38:41 -08:00
Peli de Halleux
05e916e247 0.0.103 2018-02-19 07:35:38 -08:00
Peli de Halleux
fad4ca98db
renaming 'set speed' to 'run' (#327) 2018-02-19 07:35:08 -08:00
Peli de Halleux
3b6cfed5b2 added distance measurer 2018-02-15 13:56:50 -08:00
Peli de Halleux
472ea170d0 fixing default light 2018-02-15 13:49:04 -08:00
Peli de Halleux
80f24948ec 0.0.102 2018-02-14 16:05:40 -08:00
Peli de Halleux
daa88b299d replacing loops.pause -> pause, loops.forever -> forever 2018-02-14 16:05:31 -08:00
Peli de Halleux
0384eb4d9d upgrading common packages 2018-02-14 15:59:08 -08:00
Peli de Halleux
f33f88e87c fixing struture 2018-02-14 11:20:56 -08:00
Peli de Halleux
239827c259 0.0.101 2018-02-14 11:06:56 -08:00
Peli de Halleux
cd0097749a updated readme 2018-02-14 11:00:12 -08:00
Peli de Halleux
94db31beb7 bring back the shims 2018-02-14 10:56:50 -08:00
Peli de Halleux
408631d426 upgrading common packages 2018-02-14 10:32:09 -08:00
Peli de Halleux
2407e7e179 0.0.100 2018-02-14 10:16:57 -08:00
Peli de Halleux
f63b447fee upgraded to v3.4.3 2018-02-14 10:16:27 -08:00
Peli de Halleux
bbd1a9d215 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-02-14 10:15:28 -08:00
Peli de Halleux
cfc4688fbe adding targetconfig to package 2018-02-14 09:49:47 -08:00
Peli de Halleux
24d48c0171 update firmware url 2018-02-14 09:36:20 -08:00
Peli de Halleux
523c507c35
Projectupdate1 (#325)
* integrating test lesson from lego

* adding side card annotations
2018-02-14 08:56:12 -08:00
Peli de Halleux
d6cbbcc3d9 support for importing urls 2018-02-13 21:41:49 -08:00
Peli de Halleux
2b5cedb404 0.0.99 2018-02-13 11:26:41 -08:00
Peli de Halleux
224e9c54f0
color dropdown for color sensor (#324) 2018-02-13 10:44:46 -08:00
Richard Knoll
f3f33828f3 Fixed the dropdown for colors (#323) 2018-02-12 21:23:16 -08:00
Peli de Halleux
2905814898 0.0.98 2018-02-12 12:26:08 -08:00
Sam El-Husseini
96f1086c8f
Applying UI updates from Lego (#322) 2018-02-12 12:23:25 -08:00
Galen Nickel
7bd2192a0a Fill in some ultrasonic sensor topics (#321)
* Fill in some ultrasonic sensor topics

* Busted link

* Adjust those sea also links

* Busted snippets
2018-02-11 09:01:46 -08:00
Galen Nickel
6f539de2d2 Touch sensor doc fill-in (#320) 2018-02-09 18:17:12 -08:00
Peli de Halleux
1d83d6c40e 0.0.97 2018-02-09 10:26:28 -08:00
Peli de Halleux
53bff7b133 updated package lock 2018-02-09 10:26:20 -08:00
Peli de Halleux
2f6ad3110a
motor blocks with optional args (#290)
* motor blocks with optional args

* updated signatures

* added toggle mode

* adding annotations
2018-02-09 10:25:39 -08:00
Caitlin Hennessy
22ce840181 Widget fixes (#316)
* Use bBox in motor slider

* Use setRate instead of setAngle in gyro widget
2018-02-08 16:55:23 -08:00
Galen Nickel
d8589ea98c Discussion note for gyro precsion (#317)
* Discussion note for gyro precsion

* Wrong sig
2018-02-08 15:06:08 -08:00
Peli de Halleux
adb577547d 0.0.96 2018-02-08 12:53:17 -08:00
Sam El-Husseini
ab6290c76d Add blocky grid (#313) 2018-02-08 11:49:26 -08:00
Peli de Halleux
99d4d87894 0.0.95 2018-02-08 09:36:08 -08:00
Galen Nickel
b73696e918 Gyro sensor topics (#311) 2018-02-08 09:35:47 -08:00
Sam El-Husseini
f53dbf4d83 Include Open Sans font and some UI tweaks reducing white space in the editor. (#312) 2018-02-08 09:35:27 -08:00
Galen Nickel
c9f6d873b1 Edit LabView user help doc (#310) 2018-02-07 13:55:49 -08:00
Peli de Halleux
c274259472 0.0.94 2018-02-07 09:54:24 -08:00
Peli de Halleux
74ca722aac updated IR arts 2018-02-07 09:53:58 -08:00
Peli de Halleux
931ca40f49 updated IR art 2018-02-07 08:13:46 -08:00
Peli de Halleux
458ac847b7 updated assets for LEGO 2018-02-07 07:13:22 -08:00
Peli de Halleux
653d8f6f5c 0.0.93 2018-02-07 01:50:28 -08:00
Peli de Halleux
ac0a9f0710
Various example of LavView vs MakeCode (#309)
* screenshots

* more screenshots

* added pics

* more writup

* more examples
2018-02-07 01:42:46 -08:00
Peli de Halleux
2cce2a39b8 updated colors for motor/math 2018-02-07 01:42:16 -08:00
Peli de Halleux
a337403afa 0.0.92 2018-02-06 23:19:06 -08:00
Peli de Halleux
fd9d118fa4
reversed => Inverted (#308)
* renaming "setReversed" to "setInverted" to match LabView

* fixing samples

* typo
2018-02-06 23:18:36 -08:00
Peli de Halleux
e94ac6f6f1
renaming brick.setLight to brick.setStatusLight (#307)
* renaming brick.setLight to brick.setStatusLight

* updated docs
2018-02-06 22:18:39 -08:00
Galen Nickel
88c58b4e76 First set of 'motors' topics (#305)
* Start of 'motors' topics

* Draft the 'motor motion' side doc

* Add / update more topics

* Last blast of edits

* Capture some more edits

* Put in movement and steering details
2018-02-06 19:43:50 -08:00
Peli de Halleux
e2eb5f35af
upgrading to node.js 8 (#306) 2018-02-06 12:50:39 -08:00
Peli de Halleux
71fe612ced 0.0.91 2018-02-05 16:38:50 -08:00
Peli de Halleux
e58ec06e91
IR button indexing fixes (#303)
* IR remote id fixes

* hiding private api

* fixing indexing of buttons
2018-02-05 15:11:11 -08:00
Peli de Halleux
538493369b adding button class on remote buttons 2018-02-05 13:57:24 -08:00
Peli de Halleux
56dd8e0875 enabling doc checks 2018-02-03 09:11:49 -08:00
Peli de Halleux
1f7ef637b2 Fix links in target 2018-02-03 09:09:10 -08:00
Peli de Halleux
f4f2e0ba0e 0.0.90 2018-02-02 14:19:17 -08:00
Peli de Halleux
22c31c57df fix port bug 2018-02-02 14:19:07 -08:00
Peli de Halleux
6879961297 0.0.89 2018-02-02 13:39:18 -08:00
Peli de Halleux
69fcb7407a
Simulator support for remote (#302)
* fixing up state

* upgrading ir simulator

* displaying remote

* updated infrared svg
2018-02-02 13:38:54 -08:00
Caitlin Hennessy
4dfada877c Implement simulator sensor for ambient and reflected light (#301)
* Initial work

* More stuff

* Stuff

* Stuff

* Hardcoded dashed line

* High and low thresholds

* Use rect bBox

* Add back grabbing hand

* Threshold placement

* Cleanup

* Don't need defs

* pxtarget

* Remove dashed lines for now
2018-02-02 13:24:50 -08:00
Peli de Halleux
b10b636766 0.0.88 2018-02-02 09:48:51 -08:00
Peli de Halleux
ba47fb0589
Support for remote control buttons (#300)
* refactor beacon function inside IR sensor

* towards sim support

* channel labels

* reverting to singletons

* hiding unused apis

* lazy allocation of button instances

* tracking button state

* hook up the state
2018-02-02 09:48:27 -08:00
Peli de Halleux
f36e14fe69 renaming remote button names 2018-02-01 22:33:05 -08:00
Peli de Halleux
8bab919db2 0.0.87 2018-02-01 22:21:15 -08:00
Peli de Halleux
89a82b54dc
Ir proximity in simulator (#299)
* support for IR proximity

* fixing build issue

* missing break

* remove auto-start of sensor

* setting mode on onEvent

* flooring slider value

* bump up proximity

* fixing threshold blocks
2018-02-01 22:03:01 -08:00
Peli de Halleux
15ee6ebe9c 0.0.86 2018-02-01 16:46:10 -08:00
Abhijith Chatra
9bf50665fc improving the spacing & block names (#298) 2018-02-01 16:21:08 -08:00
Peli de Halleux
f594cdefac
add infrared sensor in ev3 library (#296) 2018-02-01 16:18:20 -08:00
Peli de Halleux
5ce7a83f5d 0.0.85 2018-02-01 14:41:42 -08:00
Peli de Halleux
d7ef7c353c typo in generated filter 2018-02-01 14:08:28 -08:00
Peli de Halleux
c7cb300cd9 fixing lights in Edge/Firefox 2018-02-01 14:03:36 -08:00
Peli de Halleux
4e194536d3 0.0.84 2018-01-31 20:10:23 -08:00
Peli de Halleux
570cd7474f upgrade pxt 2018-01-31 20:10:13 -08:00
Peli de Halleux
9ea5597734 0.0.83 2018-01-31 18:10:38 -08:00
Peli de Halleux
2c0cc6a3d7
Use decodebase64 (#295)
* avoid atob directly

* prevent port names to be selected

* updated pxt
2018-01-31 18:10:15 -08:00
Peli de Halleux
08f79c5a1a 0.0.82 2018-01-31 15:39:03 -08:00
Peli de Halleux
f817912e07 bump pxt 2018-01-31 15:38:51 -08:00
Peli de Halleux
603932c2b6 0.0.81 2018-01-31 14:21:45 -08:00
Peli de Halleux
a0907e7229
fixing button down issues on touch/mouse (#294) 2018-01-31 14:21:17 -08:00
Peli de Halleux
635d4a7624
Fixing race condition of button animation (#292) 2018-01-31 11:48:53 -08:00
Peli de Halleux
69d3938d85 0.0.80 2018-01-31 10:04:55 -08:00
Peli de Halleux
f08f9105ba
Clean generated files (#289)
* clean generated files

* updating gitingore to drop generated files

* updated package lock
2018-01-31 10:04:40 -08:00
Peli de Halleux
7228cbe1cb updated logo 2018-01-31 09:04:52 -08:00
Peli de Halleux
1ea0a0172a adding highcontrast logo 2018-01-31 08:53:21 -08:00
Peli de Halleux
d548dfb578
moving print ports to examples (#288) 2018-01-31 08:44:58 -08:00
Peli de Halleux
a52ce112dc adding high contrast lego logo 2018-01-31 08:44:35 -08:00
Peli de Halleux
ea956f1a73
Buttons rename (#287)
* renaming up/down/click to released/pressed/bump

* missing images

* fixing signature issue

* updated strings

* white lego logo
2018-01-31 08:28:00 -08:00
Peli de Halleux
ba1b9a54b4 0.0.79 2018-01-30 22:41:37 -08:00
Peli de Halleux
59e39fa76d fixing field width 2018-01-30 22:41:18 -08:00
Peli de Halleux
9187c47e09 0.0.78 2018-01-30 22:22:44 -08:00
Peli de Halleux
fcf91caeb4
Zoom screen (#285)
* always start with full brick layout

* adding 'on start' to template

* render entire board when selected

* zoom brick when clicking on screen

* resize when zooming

* toggle zooming of the brick

* inject close icon when selected

* fix toggling
2018-01-30 22:22:21 -08:00
Galen Nickel
822227eb48 Brick ref topics 02 (#283)
* Add brick button topics

* Add the rest of the brick api
2018-01-30 20:58:18 -08:00
Peli de Halleux
8a331648d6
Field editor fixes in Firefox (#284)
* fixing speed field picker

* switching to open sans

* alignment-baseline not support in FF
2018-01-30 20:40:41 -08:00
Galen Nickel
4f70d341e4 Start on the 'brick' api topics (#280)
* Start on the 'brick' api topics

* Add the delay to clear screen example

* Better output for clearsceen example
2018-01-30 17:02:22 -08:00
Peli de Halleux
e06659ab4c
removing group icons (#282) 2018-01-30 16:40:08 -08:00
Peli de Halleux
437c36b983 0.0.77 2018-01-30 16:16:07 -08:00
Peli de Halleux
3d73f193a8
fix for #260 (#279) 2018-01-30 16:14:54 -08:00
Peli de Halleux
a71dee2923
rebuild for sampling (#261)
* rebuild for sampling

* bump pxt
2018-01-30 16:01:12 -08:00
Peli de Halleux
9ef5b8d4ad 0.0.76 2018-01-30 11:05:29 -08:00
Peli de Halleux
8aa47f3d1e
updated chassis (#250) 2018-01-30 08:49:10 -08:00
Peli de Halleux
02b0716043 0.0.75 2018-01-30 08:28:12 -08:00
Peli de Halleux
188d5b3aa7 threshold query api 2018-01-30 08:27:23 -08:00
Peli de Halleux
16c67f0e30
Refactoring datalog in common packages (#249)
* using datalog from common packages

* upgrading common package link

* updated block signatures

* more docs
2018-01-29 19:46:54 -08:00
Peli de Halleux
104185a41e 0.0.74 2018-01-29 15:21:37 -08:00
Peli de Halleux
73363d11b2
Download dialog (#248)
* download dialog

* updated pxt reference

* typo
2018-01-29 15:21:15 -08:00
Peli de Halleux
61996acdd9 0.0.73 2018-01-29 13:26:46 -08:00
Peli de Halleux
21deb45728 fixing release fiber 2018-01-29 13:26:31 -08:00
Peli de Halleux
34578d2370 0.0.72 2018-01-29 11:20:46 -08:00
Peli de Halleux
3f50b5c39a updated pxt references + hero banner 2018-01-29 11:20:34 -08:00
Peli de Halleux
d371225066 0.0.71 2018-01-23 14:53:09 -08:00
Peli de Halleux
387effbdd0 upgraded to run in parallel 2018-01-23 14:52:41 -08:00
Peli de Halleux
18480080e7 updated tutorial format 2018-01-19 15:42:23 -08:00
Peli de Halleux
bf6a932e5f
Color calibration (#245)
* better handling of thresholds, color calibration strategy

* updating calibration parameters
2018-01-19 13:11:11 -08:00
Peli de Halleux
23bb316403 settle robot once brake is applied 2018-01-18 21:28:00 -08:00
Peli de Halleux
138de504e5 minor high contrast fixes 2018-01-18 21:03:57 -08:00
Peli de Halleux
df13e40a45 fixing make it move 2018-01-18 16:47:00 -08:00
Peli de Halleux
511ea2374b fixing summary 2018-01-18 16:44:57 -08:00
Peli de Halleux
db4ed6daf3 fixing a bunch of snippets 2018-01-18 16:43:16 -08:00
Peli de Halleux
a60427e2cf
using audio context manager function (#243)
* using audio context manager function

* updated pxt reference

* trigger build
2018-01-18 13:53:33 -08:00
Peli de Halleux
ef5b4172e8 missing file logo 2018-01-18 12:42:11 -08:00
Peli de Halleux
7baf7cfede 0.0.70 2018-01-18 12:13:17 -08:00
Peli de Halleux
efd6718ea3 converted lesson to tutorial 2018-01-18 12:09:43 -08:00
Peli de Halleux
057a1d66dc
PID support (#242)
* updated block definitions

* updated dependency on common packages
2018-01-18 10:34:06 -08:00
Galen Nickel
5ddfcd5508 Prototype lesson 'Make it Move" (#241)
* Prototype lesson 'Make it Move"

* Wrong blockq type
2018-01-17 19:45:07 -08:00
Galen Nickel
00f0922189
Merge pull request #240 from Microsoft/line-detect-lesson
Prototype lesson for 'Line Detection'
2018-01-17 19:07:29 -08:00
ganicke
41f4b64087 Add to gallerys 2018-01-17 18:52:49 -08:00
ganicke
ea5ee1c007 Prototype lesson for 'Line Detection' 2018-01-17 17:02:11 -08:00
Peli de Halleux
603e4c0fc1 0.0.69 2018-01-16 17:06:52 -08:00
Peli de Halleux
e50c88008a updated gyrobox 2018-01-16 17:05:57 -08:00
Peli de Halleux
f057964a50 pausing until sound is done in mood 2018-01-16 16:44:32 -08:00
Peli de Halleux
2eda2061cf updated modified gyro boy 2018-01-16 16:26:49 -08:00
Peli de Halleux
a4ebf4c746 moving moods in separate namespace 2018-01-16 16:21:02 -08:00
Peli de Halleux
f1880897d4 0.0.68 2018-01-16 16:08:53 -08:00
Peli de Halleux
ad2e82060d removing BrickLight blockIdenity notations 2018-01-16 15:59:40 -08:00
Peli de Halleux
d1bb19e30e adding a mood block (image+sound+light) 2018-01-16 14:52:49 -08:00
Peli de Halleux
280963d1eb 0.0.67 2018-01-15 23:58:31 -08:00
Peli de Halleux
9fadf49b0e
Support for multiple motors in "used" logic. (#238)
* handle registerion of dual / single motors

* updated puppy
2018-01-15 23:57:21 -08:00
Peli de Halleux
3c2be25384 some core set adapted codes 2018-01-15 21:27:19 -08:00
Peli de Halleux
e1f623a94d Added description to timers 2018-01-15 03:41:14 -08:00
Peli de Halleux
cb5f9648f5 fixed sound name 2018-01-14 19:49:40 -08:00
Peli de Halleux
9158cfe4f6 0.0.66 2018-01-13 08:31:38 -08:00
Peli de Halleux
0b763978f2
gyro boy improvements (#236)
gyro boy improvements
2018-01-13 08:31:10 -08:00
Peli de Halleux
25fded6afb 0.0.65 2018-01-13 00:02:01 -08:00
Peli de Halleux
fc6fb0811f
Timers (#235)
* adding timer support

* updates strings
2018-01-13 00:00:55 -08:00
Peli de Halleux
49bedcbcc5 0.0.64 2018-01-12 16:12:02 -08:00
Sam El-Husseini
32876f4584
Merge pull request #234 from Microsoft/largemotorview
Fix large motor SVG hole
2018-01-12 13:51:00 -08:00
Sam El-Husseini
da9bea30b5 Update large motor view SVG so that the drop shadow is outside the hole SVG 2018-01-12 13:50:09 -08:00
Sam El-Husseini
d0aa68aeee 0.0.63 2018-01-12 13:33:45 -08:00
Sam El-Husseini
51731fbbc9 bump pxt-common-packages to 0.15.5, 2018-01-12 13:33:40 -08:00
Sam El-Husseini
751ea1494b motor slider fixes and fix motor output in vm 2018-01-12 13:33:25 -08:00
Sam El-Husseini
dfe84471e8
Merge pull request #144 from Microsoft/motorslider
Add motor slider control
2018-01-12 13:04:45 -08:00
Peli de Halleux
0f3de6cf07 0.0.62 2018-01-11 22:56:34 -08:00
Peli de Halleux
21195e4abf
Datalog (#233)
* support for custom csv separator

* simple datalog frameowrk

* api strings

* hide setfile

* storage fixes

* log seconds, not milliseconds
2018-01-11 22:53:28 -08:00
Peli de Halleux
c992100a38 added option to append CSV headers 2018-01-11 21:36:43 -08:00
Michał Moskal
20a4673f98 First draft of storage APIs (#122)
* First draft of storage APIs

* bumped pxt-core

* using fixed instances to seprate temp from permanent

* send console to storage

* sim support

* missing sim stubs

* adding storage blocks

* more sim support

* remove storage from default package

* fix rendering of ms

* render raw ms

* slize at better place

* duplicate bundled dir

* refactor limit

* simplify limit logic
2018-01-11 20:05:45 -08:00
Peli de Halleux
966fd81870 0.0.61 2018-01-11 14:08:14 -08:00
Peli de Halleux
cb9d2aeb39 bumping pxt dependency 2018-01-11 14:08:01 -08:00
Peli de Halleux
3cee55f4c2 0.0.60 2018-01-11 13:43:41 -08:00
Peli de Halleux
3815d2fd3b
simplifiying brick light api (#231) 2018-01-11 13:43:11 -08:00
Peli de Halleux
1453b7e0a3 gyro reset fix 2018-01-11 11:17:23 -08:00
Peli de Halleux
6fb5c54280 fix build break 2018-01-11 08:55:31 -08:00
Peli de Halleux
9d5ca35e83 fix battery encoding 2018-01-11 08:47:09 -08:00
Peli de Halleux
893dd0f9c4 rename "enter..." to "button enter" 2018-01-11 08:28:25 -08:00
Peli de Halleux
c3419c0b74
support for unregulated motors (#227) 2018-01-10 23:34:27 -08:00
Peli de Halleux
a4164470d8 updated api to align with labview 2018-01-10 22:29:35 -08:00
Peli de Halleux
0dd5ab9bde appliying manual speed 2018-01-10 14:08:50 -08:00
Sam El-Husseini
e93e659e8a nit: remove unnecessary comment 2018-01-10 13:51:35 -08:00
Sam El-Husseini
8357372fb5 Update to make it more like a crank 2018-01-10 13:47:39 -08:00
Sam El-Husseini
54cb076002
Merge pull request #226 from Microsoft/legoavatar
Add lego avatar
2018-01-10 13:03:15 -08:00
Sam El-Husseini
dbd3eb464b Add lego avatar 2018-01-10 12:59:53 -08:00
Sam El-Husseini
10cd39a4ec Merge branch 'master' into motorslider 2018-01-10 12:52:51 -08:00
Peli de Halleux
fddc4e647a 0.0.59 2018-01-10 12:52:48 -08:00
Peli de Halleux
798a351f15 updated package lock 2018-01-10 12:52:36 -08:00
Peli de Halleux
e61dffff03 fixing threshold 2018-01-10 11:45:08 -08:00
Peli de Halleux
b9f5096480 pause until motor measured move is done 2018-01-10 11:29:27 -08:00
Peli de Halleux
9912d68c8b fixing chassis 2018-01-10 11:14:25 -08:00
Peli de Halleux
951b9be6e4 fixing motors 2018-01-10 11:14:18 -08:00
Sam El-Husseini
aa8635c4e7 Always use the motor slider control 2018-01-10 10:00:48 -08:00
Sam El-Husseini
4e4f5495da Merge branch 'master' into motorslider 2018-01-10 09:56:59 -08:00
Sam El-Husseini
f64bf57000 Merge master 2018-01-10 09:56:32 -08:00
Sam El-Husseini
f1242724b5 Fix legofont icons 2018-01-10 09:55:58 -08:00
Peli de Halleux
cd0c9df86e bump to 3.0.8 2018-01-10 08:58:54 -08:00
Peli de Halleux
337d42287a 0.0.58 2018-01-09 22:14:43 -08:00
Peli de Halleux
ce3383f1b7
Turn ratio field editor (#225)
* Turn ratio field editor (initial draft)

* Add field turn ratio editor

* Fix arrow rotation

* Fix left and right direction, remove unnecessary SVG circles.

* Update UI a little. add marker.

* updated math for turnratio angle

* slightly cuter

* cleanup

* consistent naming

* more cleanup

* fixing motor node issue

* updated package version
2018-01-09 22:05:26 -08:00
Sam El-Husseini
e51721303a
Merge pull request #224 from Microsoft/fixportlabels
Fix port labels in the simulator.
2018-01-09 14:43:26 -08:00
Sam El-Husseini
50f6c77fdb Fix port labels in the simulator. Fixes #219 2018-01-09 14:43:01 -08:00
Peli de Halleux
5ed0135124
cleaning up images (#223)
* cleaning up images

* extra comma
2018-01-09 12:51:44 -08:00
Peli de Halleux
892a2d585f
Thresholds (#222)
* add threshold blocks

* updated strings

* added gap

* reorg color/gyro blocks

* fixing sound names

* adding stop block

* fixing exanmples
2018-01-09 12:46:48 -08:00
Sam El-Husseini
9890f2340a Add no-drag class and set on synced motor labels. Fixes #213 (#221) 2018-01-09 12:04:37 -08:00
Sam El-Husseini
109b809909 Sort field port values. Fixes #212 (#220) 2018-01-09 12:01:42 -08:00
Sam El-Husseini
16b9a5027d Add rotate icons 2017-12-29 11:39:06 -08:00
Sam El-Husseini
cbe68b3199 Add motor slider control 2017-12-28 13:23:30 -08:00
886 changed files with 32991 additions and 15410 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

9
.github/calibre/image-actions.yml vendored Normal file
View File

@ -0,0 +1,9 @@
jpeg:
quality: 80
png:
quality: 80
webp:
quality: 80
ignorePaths:
- "node_modules/**"
- "libs/**"

View File

@ -0,0 +1,16 @@
name: Compress images
on:
pull_request:
paths:
- 'docs/**.jpg'
- 'docs/**.png'
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: calibreapp/image-actions
uses: docker://calibreapp/github-image-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

40
.github/workflows/pxt-buildmain.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: pxt-buildmain
on:
push:
branches:
- 'master'
- 'main'
create:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
sudo apt-get install xvfb
sudo npm install -g pxt
npm install
- name: pxt ci
run: |
pxt ci
env:
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
PXT_ACCESS_TOKEN: ${{ secrets.PXT_ACCESS_TOKEN }}
PXT_RELEASE_REPO: ${{ secrets.PXT_RELEASE_REPO }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
CHROME_BIN: chromium-browser
DISPLAY: :99.0
CI: true

31
.github/workflows/pxt-buildpr.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: pxt-buildpr
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
sudo apt-get install xvfb
sudo npm install -g pxt
npm install
- name: pxt ci
run: |
pxt ci
env:
CHROME_BIN: chromium-browser
DISPLAY: :99.0
CI: true

39
.github/workflows/pxt-buildpush.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: pxt-buildpush
on:
push:
# main/master has its own build that includes the crowdin key
branches-ignore:
- 'main'
- 'master'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
sudo apt-get install xvfb
sudo npm install -g pxt
npm install
- name: pxt ci
run: |
pxt ci
env:
PXT_ACCESS_TOKEN: ${{ secrets.PXT_ACCESS_TOKEN }}
PXT_RELEASE_REPO: ${{ secrets.PXT_RELEASE_REPO }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
CHROME_BIN: chromium-browser
DISPLAY: :99.0
CI: true

2
.gitignore vendored
View File

@ -16,6 +16,8 @@ clients/win10/*.opendb
clients/**/bin/**
clients/**/obj/**
clients/electron/projects
libs/**/_locales/**
package-lock.json
videos/**

View File

@ -1,32 +1,34 @@
# LEGO Mindstorms EV3 target for PXT
# LEGO® MINDSTORMS® Education EV3 for Microsoft MakeCode [![Build Status](https://travis-ci.org/microsoft/pxt-ev3.svg?branch=master)](https://travis-ci.org/microsoft/pxt-ev3)
[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_rainbow/master/pxt-ev3_Push)](https://ci2.dot.net/job/Private/job/pxt_project_rainbow/job/master/job/pxt-ev3_Push/)
This repo contains the editor target hosted at https://makecode.mindstorms.com
This repo contains the editor target hosted at https://d541eec2-1e96-4b7b-a223-da9d01d0337a.pxt.io/
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
## Local Dev setup
## Local setup
These instructions assume familiarity with dev tools and languages.
* install Node.js 6+
* install Node.js 8.9.4+
* install Docker; make sure `docker` command is in your `PATH`
* (optional) install [Visual Studio Code](https://code.visualstudio.com/)
In a common folder,
* clone https://github.com/Microsoft/pxt to ``pxt`` folder
* clone https://github.com/Microsoft/pxt-common-packages to ``pxt-common-packages`` folder
* clone https://github.com/Microsoft/pxt-ev3 to ``pxt-ev3`` folder
* go to ``pxt`` and run
```
npm install
typings install
```
* to run the local server,
```
pxt serve --cloud
```
## Local Dev setup
In the common folder,
* clone https://github.com/Microsoft/pxt to ``pxt`` folder
* clone https://github.com/Microsoft/pxt-common-packages to ``pxt-common-packages`` folder
* go to ``pxt-common-packages`` and run
```
@ -58,18 +60,12 @@ cd libs/core
pxt deploy
```
### Hosted editor
Currently hosted at:
https://d541eec2-1e96-4b7b-a223-da9d01d0337a.pxt.io/
### Jenkins build
https://ci2.dot.net/job/Private/job/pxt_project_rainbow/job/master/
## License
MIT
## Trademarks
MICROSOFT, the Microsoft Logo, and MAKECODE are registered trademarks of Microsoft Corporation. They can only be used for the purposes described in and in accordance with Microsofts Trademark and Brand guidelines published at https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general.aspx. If the use is not covered in Microsofts published guidelines or you are not sure, please consult your legal counsel or the MakeCode team (makecode@microsoft.com).
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

41
SECURITY.md Normal file
View File

@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->

View File

@ -1,14 +0,0 @@
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
import * as fs from 'fs';
const deploy = require("./editor/deploy")
export function deployCoreAsync(resp: pxtc.CompileResult) {
return deploy.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true)
.then(() => {
fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], {
encoding: "base64"
})
})
}

View File

@ -1,6 +0,0 @@
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
import * as path from "path";
export let pxtCore = require("pxt-core");
// require.resolve() gives path to [pxt dir]/built/pxt.js, so move up twice to get pxt root dir
export let pxtCoreDir = path.resolve(require.resolve("pxt-core"), "..", "..");

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"noImplicitAny": true,
"noImplicitReturns": true,
"declaration": true,
"outDir": "../built",
"module": "commonjs",
"rootDir": ".",
"newLine": "LF",
"sourceMap": false,
"types": ["node"]
}
}

18
docfiles/footer.html Normal file
View File

@ -0,0 +1,18 @@
<footer class="ui vertical footer segment hideprint" aria-hidden="false">
<div class="ui center aligned container">
<div class="ui section divider"></div>
<div class="ui container horizontal small divided link list">
<!-- <a class="item" href="https://makecode.com/contact" target="_blank" rel="noopener">Contact Us</a> -->
<a class="item" href="https://makecode.com/privacy" target="_blank" rel="noopener">Privacy &amp; Cookies</a>
<a class="item" href="https://makecode.com/termsofuse" target="_blank" rel="noopener"> Terms Of Use</a>
<a class="item" href="https://makecode.com/trademarks" target="_blank" rel="noopener">Trademarks</a>
<div class="item">© 2018 Microsoft</div>
</div>
<div class="ui container horizontal small divided link list">
<a class="ui centered item" href="https://makecode.com/" title="Microsoft MakeCode" target="_blank" rel="noopener">Powered by Microsoft MakeCode</a>
</div>
<div class="ui centered container small list">
<p class="item">LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are trademarks and/ or copyrights of the LEGO Group. ©2018 The LEGO Group. All rights reserved.</p>
</div>
</div>
</footer>

View File

@ -1,5 +1,135 @@
# @extends
## Support #support
* [Troubleshoot](/troubleshoot)
* [EV3 Manager](https://ev3manager.education.lego.com/)
* [Bluetooth](/bluetooth)
* [Forum](https://forum.makecode.com)
* [LEGO Support](https://www.lego.com/service/)
* [FIRST LEGO League](/fll)
## Projects #projects
* [Getting Started](/getting-started)
* [Try](/getting-started/try)
* [Use](/getting-started/use)
* [Tutorials](/tutorials)
* [Wake Up!](/tutorials/wake-up)
* [Make An Animation](/tutorials/make-an-animation)
* [What Animal Am I?](/tutorials/what-animal-am-i)
* [Music Brick](/tutorials/music-brick)
* [Run Motors](/tutorials/run-motors)
* [Tank ZigZag](/tutorials/tank-zigzag)
* [Touch to Run](/tutorials/touch-to-run)
* [Touch Sensor Values](/tutorials/touch-sensor-values)
* [What Color?](/tutorials/what-color)
* [Line Following](/tutorials/line-following)
* [Red Light, Green Light](/tutorials/redlight-greenlight)
* [Reflected Light Measure](/tutorials/reflected-light-measure)
* [Reflected Light Calibration](/tutorials/reflected-light-calibration)
* [Object Near?](/tutorials/object-near)
* [Security Alert](/tutorials/security-alert)
* [Coding](/coding)
* [Autonomous Parking](/coding/autonomous-parking)
* [Object Detection](/coding/object-detection)
* [Line Detection](/coding/line-detection)
* [Design Engineering](/design-engineering)
* [Make It Move Without Wheels](/design-engineering/make-it-move)
* [Make It Smarter and Faster](/design-engineering/make-it-smarter)
* [Make a System that Communicates](/design-engineering/make-it-communicate)
* [Maker](/maker)
* [Make a Sound Machine](/maker/sound-machine)
* [Make a Security Gadget](/maker/security-gadget)
## Reference #reference
* [Reference](/reference)
* [Brick](/reference/brick)
* [show string](/reference/brick/show-string)
* [show number](/reference/brick/show-number)
* [show value](/reference/brick/show-value)
* [show mood](/reference/brick/show-mood)
* [show image](/reference/brick/show-image)
* [clear screen](/reference/brick/clear-screen)
* [show ports](/reference/brick/show-ports)
* [on event](/reference/brick/button/on-event)
* [is pressed](/reference/brick/button/is-pressed)
* [was pressed](/reference/brick/button/was-pressed)
* [pause until](/reference/brick/button/pause-until)
* [set light](/reference/brick/set-status-light)
* [battery level](/reference/brick/battery-level)
* [Motors](/reference/motors)
* [run](/reference/motors/motor/run)
* [stop](/reference/motors/motor/stop)
* [reset](/reference/motors/motor/reset)
* [set brake](/reference/motors/motor/set-brake)
* [set inverted](/reference/motors/motor/set-inverted)
* [set regulated](/reference/motors/motor/set-regulated)
* [tank](/reference/motors/synced/tank)
* [steer](/reference/motors/synced/steer)
* [angle](/reference/motors/motor/angle)
* [speed](/reference/motors/motor/speed)
* [clear counts](/reference/motors/motor/clear-counts)
* [stop all motors](/reference/motors/stop-all)
* [Sensors](/reference/sensors)
* [Touch](/reference/sensors/touch-sensor)
* [on event](/reference/sensors/touch-sensor/on-event)
* [pause until](/reference/sensors/touch-sensor/pause-until)
* [is pressed](/reference/sensors/touch-sensor/is-pressed)
* [was pressed](/reference/sensors/touch-sensor/was-pressed)
* [Gyro](/reference/sensors/gyro)
* [angle](/reference/sensors/gyro/angle)
* [rate](/reference/sensors/gyro/rate)
* [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)
* [Infrared](/reference/sensors/infrared)
* [on event](/reference/sensors/infrared/on-event)
* [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)
* [is pressed](/reference/sensors/beacon/is-pressed)
* [was pressed](/reference/sensors/beacon/was-pressed)
* [set remote channel](/reference/sensors/beacon/set-remote-channel)
* [Color](/reference/sensors/color-sensor)
* [on color detected](/reference/sensors/color-sensor/on-color-detected)
* [pause until color detected](/reference/sensors/color-sensor/pause-until-color-detected)
* [on light detected](/reference/sensors/color-sensor/on-light-detected)
* [pause until light condition detected](/reference/sensors/color-sensor/pause-until-light-detected)
* [color](/reference/sensors/color-sensor/color)
* [light](/reference/sensors/color-sensor/ambient-light)
* [Music](/reference/music)
* [play sound effect](/reference/music/play-sound-effect)
* [play sound effect until done](/reference/music/play-sound-effect-until-done)
* [play tone](/reference/music/play-tone)
* [ring tone](/reference/music/ring-tone)
* [stop all sounds](/reference/music/stop-all-sounds)
* [rest](/reference/music/rest)
* [change tempo by](/reference/music/change-tempo-by)
* [set tempo](/reference/music/set-tempo)
* [note frequency](/reference/music/note-frequency)
* [beat](/reference/music/beat)
* [set volume](/reference/music/set-volume)
* [Control](/reference/control)
* [Timer](/reference/control/timer)
* [seconds](/reference/control/timer/seconds)
* [millis](/reference/control/timer/millis)
* [reset](/reference/control/timer/reset)
* [pause until](/reference/control/timer/pause-until)
* [Console](/reference/console)
* [log](/reference/console/log)
* [log value](/reference/console/log-value)
* [send to screen](/reference/console/send-to-screen)
## #misc
## devs

View File

@ -6,38 +6,52 @@ Welcome to the **Microsoft MakeCode** editor for the **@boardname@**!
You can program the @boardname@ using [Blocks](/blocks) or [JavaScript](/javascript) in your web browser:
```block
input.buttonA.onEvent(ButtonEvent.Click, () => {
light.showRing(`blue blue blue blue blue blue blue blue blue blue`)
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
motors.largeA.run(50)
})
```
```typescript
input.buttonA.onEvent(ButtonEvent.Click, () => {
light.showRing(`blue blue blue blue blue blue blue blue blue blue`)
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
motors.largeA.run(50)
})
```
The editor work in [most modern browsers](/browsers), work [offline](/offline) once loaded and do not require any installation.
The editor works in [most modern browsers](/browsers). It works [offline](/offline) once loaded and doesn't require any installation. Take a look at some of the [features](/about/editor-features) of the editor.
## [Compile and Flash: Your Program!](/device/usb)
### ~ hint
When you have your code ready, you connect your @boardname@ to a computer via a USB cable
**then press the reset button** so it appears as a mounted drive (named **CPLAYBOOT**).
#### Using LEGO® MINDSTORMS® Education NXT
The MakeCode editor works with @boardname@. To create code for LEGO® MINDSTORMS® Education NXT, you need to [download](https://education.lego.com/downloads/retiredproducts/nxt/software) the software to program it.
### ~
## Compile and Flash: Your Program!
When you have your code ready, you connect your EV3 Brick to a computer with a USB cable so it appears as an attached drive (named **@drivename@**).
Compilation to machine code from [Blocks](/blocks) or [JavaScript](/javascript) happens in the browser. You save the binary
program to a **.uf2** file, which you then copy to the **CPLAYBOOT** drive, which flashes the device with the new program.
program to a **.uf2** file, which you then copy to the **@drivename@** drive. The process of copying will flash the device with the new program.
### ~ hint
#### Bluetooth support
**Experimental support** for Bluetooth download is now available. Please read the [Bluetooth](/bluetooth) page for more information.
### ~
## Simulator: Test Your Code
You can run your code using the micro:bit simulator, all within the confines of a web browser.
The simulator has support for the LED screen, buttons, as well as compass, accelerometer, and digital I/O pins.
You can run your code using the @boardname@ simulator, all inside the same browser window.
The simulator has support for the EV3 Brick screen, buttons, sensors, and motors.
```sim
loops.forever(() => {
light.pixels.showAnimation(light.animation(LightAnimation.Rainbow), 1000)
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
motors.largeA.run(50)
motors.mediumD.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected)
})
```
```package
light
```
```

View File

@ -0,0 +1,81 @@
# @extends
#### #blocks-images
| |
|-|
| ![Blocks Toolbox with Loops shelf open](/static/about/blocks-toolbox.png) |
| Blocks Toolbox |
#### #home-images
| |
|-|
| ![Home button](/static/about/home-button.png) |
| Home Button |
#### #share-images
| |
|-|
| ![Share button](/static/about/share-button.png) |
| Share Button |
#### #blocksjs-images
| |
|-|
| ![Switch from Blocks to JavaScript](/static/about/blocks-to-js.gif) |
| Switch from Blocks to JavaScript |
#### #help-images
| |
|-|
| ![Help button](/static/about/help-button.png) |
| Help Button |
#### #moresettings-images
| |
|-|
| ![More settings button](/static/about/more-settings.png) |
| More Button |
#### #undoredo-images
| | | |
|-|-|-|
| ![Undo button](/static/about/undo-button.png) | | ![Redo button](/static/about/redo-button.png) |
| Undo Button | | Redo Button |
#### #zoom-images
| | | |
|-|-|-|
| ![Zoom in button](/static/about/zoom-in.png) | | ![Zoom out button](/static/about/zoom-out.png) |
| Zoom In | | Zoom Out |
#### #saveproject-images
| |
|-|
| ![Save project field](/static/about/save-project.png) |
| Save Project |
#### #download-images
| |
|-|
| ![Download button](/static/about/download-button.png) |
| Download Button |
#### #explorer-images
| |
|-|
| ![Explorer button](/static/about/explorer-button.png) |
| Explorer Button |
| &nbsp; |
| ![Explorer File View](/static/about/explorer-view.png) |
| Explorer File View |

View File

@ -1,3 +1,3 @@
{
"appref": "v"
"appref": "v1.4"
}

View File

@ -3,6 +3,6 @@
### #specific
```cards
loops.forever(() => {});
loops.pause(0)
forever(() => {});
pause(0)
```

62
docs/bluetooth.md Normal file
View File

@ -0,0 +1,62 @@
# Bluetooth
This page describes the procedure to download MakeCode program to the EV3 brick
over Bluetooth.
## ~ hint
### WARNING: EXPERIMENTAL FEATURES AHEAD!
Support for Bluetooth download relies on [Web Serial](https://wicg.github.io/serial/),
an experimental browser feature. Web Serial is a work [in progress](https://www.chromestatus.com/feature/6577673212002304);
it may change or be removed in future versions without notice.
By enabling these experimental browser features, you could lose browser data or compromise your device security
or privacy.
## ~
https://youtu.be/VIq8-6Egtqs
## Supported browsers
* Chrome desktop, version 77 and higher, Windows 10 or Mac OS.
* [Microsoft Edge Insider desktop](https://www.microsoftedgeinsider.com), version 77 and higher, Windows 10 or Mac OS.
To make sure your browser is up to date, go to the '...' menu, click "Help" then "About".
Next you need to enable the experimental features (this may change in the future)
* go to **chrome://flags/#enable-experimental-web-platform-features** and **enable**
**Experimental Web Platform features**
![A screenshot of the flags page in chrome](/static/bluetooth/experimental.png)
## Machine Setup
* pair your EV3 brick with your computer over Bluetooth. This is the usual pairing procedure.
## Download over Bluetooth
* go to https://makecode.mindstorms.com/
* click on **Download** to start a file download as usual
* on the download dialog, you should see a **Bluetooth** button. Click on the
**Bluetooth** button to enable the mode.
* **make sure the EV3 brick is not running a program**
* click on **Download** again to download over bluetooth.
## Choosing the correct serial port
Unfortunately, the browser dialog does not make it easy to select which serial port is the brick.
* On Windows, choose ``Standard Serial over Bluetooth``. There might be multiple of those but only one works. Try your luck! Once you know the COM port number, remember it for the next time around.
* On Mac OS, choose ``cu.BRICKNAME-SerialPort``
## Known issues
* We do not detect properly that the program is running on the brick. Make sure to stop the program before starting the download procedure.
* The list of programs on the brick screen is not updated when uploading via bluetooth.
## Feedback
Please send us your feedback through https://forum.makecode.com.

View File

@ -1,171 +1,27 @@
# Coding Activites
12 computer science activities, with cross-curricular opportunities in design and technology, science, and math.
* [Download Curriculum Materials](https://education.lego.com/en-us/downloads/mindstorms-ev3)
## Three Point Turn
## Projects
```codecard
[
{
"name": "Three Point Turn 1",
"description": "Activity 1",
"url":"/coding/three-point-turn-1",
"cardType": "example"
"name": "Autonomous Parking",
"description": "Design cars that can park themselves safely without driver intervention.",
"url":"/coding/autonomous-parking",
"imageUrl": "/static/lessons/autonomous-parking.png",
"cardType": "side"
}, {
"name": "Three Point Turn 2",
"description": "Activity 2",
"url":"/coding/three-point-turn-2",
"cardType": "example"
"name": "Object Detection",
"description": "Design ways to avoid accidents between vehicles and objects in the road.",
"url":"/coding/object-detection",
"imageUrl": "/static/lessons/object-detection.jpg",
"cardType": "side"
}, {
"name": "Three Point Turn 3",
"description": "Activity 3",
"url":"/coding/three-point-turn-3",
"cardType": "example"
}]
```
## Reversing the robot
```codecard
[{
"name": "Reversing the robot 1",
"description": "Activity 1",
"url":"/coding/reversing-the-robot-1",
"cardType": "example"
}, {
"name": "Reversing the robot 2",
"description": "Activity 2",
"url":"/coding/reversing-the-robot-2",
"cardType": "example"
}, {
"name": "Reversing the robot 3",
"description": "Activity 3",
"url":"/coding/reversing-the-robot-3",
"cardType": "example"
}]
```
## Light the way
```codecard
[{
"name": "Light the way 1",
"description": "Activity 1",
"url":"/coding/light-the-way-1",
"cardType": "example"
}, {
"name": "Light the way 2",
"description": "Activity 2",
"url":"/coding/light-the-way-2",
"cardType": "example"
}, {
"name": "Light the way 3",
"description": "Activity 3",
"url":"/coding/light-the-way-3",
"cardType": "example"
}
]
```
## Traffic Lights
```codecard
[{
"name": "Traffic Lights 1",
"description": "Activity 1",
"url":"/coding/traffic-lights-1",
"cardType": "example"
}, {
"name": "Traffic Lights 2",
"description": "Activity 2",
"url":"/coding/traffic-lights-2",
"cardType": "example"
}, {
"name": "Traffic Lights 3",
"description": "Activity 3",
"url":"/coding/traffic-lights-3",
"cardType": "example"
}
]
```
## Reverse Bepper
```codecard
[{
"name": "Reverse Beeper 1",
"description": "Activity 1",
"url":"/coding/reverse-beeper-1",
"cardType": "example"
}, {
"name": "Reverse Beeper 2",
"description": "Activity 2",
"url":"/coding/reverse-beeper-2",
"cardType": "example"
}, {
"name": "Reverse Beeper 3",
"description": "Activity 3",
"url":"/coding/reverse-beeper-3",
"cardType": "example"
}]
```
## Ignition
```codecard
[{
"name": "Ignition 1",
"description": "Activity 1",
"url":"/coding/ingition-1",
"cardType": "example"
}, {
"name": "Ignition 2",
"description": "Activity 2",
"url":"/coding/ignition-2",
"cardType": "example"
}, {
"name": "Ignition 3",
"description": "Activity 3",
"url":"/coding/ignition-3",
"cardType": "example"
}]
```
## Cruise Control
```codecard
[{
"name": "Cruise Control 1",
"description": "Activity 1",
"url":"/coding/cruise-control-1",
"cardType": "example"
}, {
"name": "Cruise Control 2",
"description": "Activity 2",
"url":"/coding/cruise-control-2",
"cardType": "example"
}, {
"name": "Cruise Control 3",
"description": "Activity 3",
"url":"/coding/cruise-control-3",
"cardType": "example"
}]
```
## Roaming
```codecard
[{
"name": "Roaming 1",
"description": "Activity 1",
"url":"/coding/roaming-1",
"cardType": "example"
}, {
"name": "Roaming 2",
"description": "Activity 2",
"url":"/coding/roaming-2",
"cardType": "example"
"name": "Line Detection",
"description": "Design ways to improve driving safety by helping to prevent drivers from falling asleep and causing an accident.",
"url":"/coding/line-detection",
"imageUrl": "/static/lessons/line-detection.jpg",
"cardType": "side"
}]
```

View File

@ -0,0 +1,177 @@
# Autonomous Parking
Design cars that can park themselves safely without driver intervention.
![Autonomous parking graphic](/static/coding/autonomous-parking/auto-parking-connect.jpg)
## Connect
**Think about:**
* How do autonomous cars work?
* What would it take to ensure that autonomous cars are safe?
* What types of movements do autonomous cars need to perform?
## Construct
### Build
Build a @boardname@ vehicle that can park itself safely without driver intervention. Start by constructing this model:
[![EV3- Robot Driving Base](/static/coding/autonomous-parking/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)
### ~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:
* Are all the wires correctly connected from the motors to ports B and C?
* Are the wheels correctly installed?
* Are the wheels rotating freely?
### Program
Write a program that will make the robot turn three times in various ways.
**Think about:**
* How will you make the robot turn in different ways?
* How can the robot make a three point turn?
### ~hint
Consider using these blocks in your solution:
```block
motors.largeBC.tank(50, 50)
pause(500)
```
### ~
### Sample Solution - Three Point Turn
1. When the brick button is pressed, turn the driving base right and stop after 1.5 seconds.
2. Turn the driving base left and stop after 1 second.
3. Move the driving base forward for 3 seconds.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
motors.largeBC.tank(-30, -75)
loops.pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
})
```
### Download and test
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Contemplate
Choose one of the following autonomous driving scenarios and create a program for it:
* Parallel parking
* Angle parking
* Perpendicular parking
### ~hint
Document pseudocode for your program before choosing programming blocks.
### ~
### Sample Solution - Parallel Parking
1. When the brick button is pressed, drive forward in a straight line for 3 rotations.
2. Wait for 1 second.
3. Reverse motor rotation while turning for 1.5 rotations.
4. Reverse motor rotation while turning the other way for 1.5 rotations.
5. Drive backward in a straight line for 0.5 rotations.
6. Drive forward in a straight line for 0.5 rotations.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.steer(0, 50, 3, MoveUnit.Rotations)
pause(1000)
motors.largeBC.steer(-50, -50, 1.5, MoveUnit.Rotations)
motors.largeBC.steer(50, -50, 1.5, MoveUnit.Rotations)
motors.largeBC.steer(0, -50, 0.5, MoveUnit.Rotations)
motors.largeBC.steer(0, 50, 0.5, MoveUnit.Rotations)
})
```
### Download and test
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
### Differentiation
Create a program that simulates displaying appropriate warning lights while parking.
### ~hint
Consider using this block in your solution:
```block
brick.setStatusLight(StatusLight.OrangeFlash)
```
### ~
### Sample Solution - Simulating Reverse Gear and Reverse Warning Lights
1. When the brick button is pressed, drive forward in a straight line for 3 rotations.
2. Wait for 1 second.
3. Set brick status light to orange flash.
4. Reverse motor rotation while turning for 1.5 rotations.
5. Reverse motor rotation while turning the other way for 1.5 rotations.
6. Drive backward in a straight line for 0.5 rotations.
7. Set brick status light to off.
8. Drive forward in a straight line for 0.5 rotations.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.steer(0, 50, 3, MoveUnit.Rotations)
pause(1000)
brick.setStatusLight(StatusLight.OrangeFlash)
motors.largeBC.steer(-50, -50, 1.5, MoveUnit.Rotations)
motors.largeBC.steer(50, -50, 1.5, MoveUnit.Rotations)
motors.largeBC.steer(0, -50, 0.5, MoveUnit.Rotations)
brick.setStatusLight(StatusLight.Off)
motors.largeBC.steer(0, 50, 0.5, MoveUnit.Rotations)
})
```
### Download and test
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
### Share
**Think about:**
* What challenged you?
* Were there any surprises?
* How can you improve your program?
* Can your program be more streamlined? Have you used too many blocks?
* Is there a more efficient way to build your program?
* How can your program be used in real-world scenarios?
## Continue
* 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 robots 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?

View File

@ -1,10 +0,0 @@
# Cruise Control Activity 1
```blocks
let speed = 0;
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.setSpeed(speed);
})
```

View File

@ -1,15 +0,0 @@
# Cruise Control Activity 2
```blocks
let speed = 0;
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.setSpeed(speed);
})
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {
if (speed > -100)
speed = speed - 10;
motors.largeBC.setSpeed(speed);
})
```

View File

@ -1,28 +0,0 @@
# Cruise Control Activity 3
```blocks
let speed = 0
function decelerate() {
if (speed > -100) {
speed = speed - 10
}
}
function accelerate() {
if (speed < 100) {
speed = speed + 10
}
}
function update() {
brick.clearScreen()
brick.printLine("speed: " + speed, 1)
motors.largeBC.setSpeed(speed)
}
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {
accelerate()
update()
})
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
decelerate()
update()
})
```

View File

@ -0,0 +1,65 @@
# Cruise Control
Learn how to set and adjust motor speeds.
## Activity 1
Increase motor speed when touch sensor `1` is pressed.
```blocks
let speed = 0;
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.run(speed);
})
```
## Activity 2
Add a "reduce" motor speed action when touch sensor `2` is pressed.
```blocks
let speed = 0;
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.run(speed);
})
sensors.touch2.onEvent(ButtonEvent.Pressed, function () {
if (speed > -100)
speed = speed - 10;
motors.largeBC.run(speed);
})
```
## Activity 3
Refactor your code by moving the speed increase and speed decrease code into ``||functions:accelerate||`` and ``||functions:decelerate||`` functions. Run the motors at the new speed in an ``||functions:update||`` function.
```blocks
let speed = 0
function decelerate() {
if (speed > -100) {
speed = speed - 10
}
}
function accelerate() {
if (speed < 100) {
speed = speed + 10
}
}
function update() {
brick.clearScreen()
brick.showString("speed: " + speed, 1)
motors.largeBC.run(speed)
}
sensors.touch2.onEvent(ButtonEvent.Pressed, function () {
accelerate()
update()
})
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
decelerate()
update()
})
```

View File

@ -1,11 +0,0 @@
# Ignition Activity 1
```blocks
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
brick.showImage(images.eyesDizzy)
})
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectDetected, function () {
brick.showImage(images.eyesTiredMiddle)
})
brick.showImage(images.eyesSleeping)
```

View File

@ -1,12 +0,0 @@
# Ignition Activity 2
```blocks
while (true) {
if (sensors.touch1.wasPressed() &&
sensors.ultrasonic4.distance() < 10) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}
loops.pause(1);
}
```

View File

@ -1,13 +0,0 @@
# Ignition Activity 3
```blocks
while (true) {
if (sensors.ultrasonic4.distance() < 10 &&
sensors.touch1.wasPressed() &&
brick.buttonEnter.wasPressed()) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}
loops.pause(1);
}
```

46
docs/coding/ignition.md Normal file
View File

@ -0,0 +1,46 @@
# Ignition
Explore sensor events and sensor status.
## Activity 1
Wait for a touch sensor press or ultrasonic object detection. Show an expression on the screen when they happen.
```blocks
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
brick.showImage(images.eyesDizzy)
})
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectDetected, function () {
brick.showImage(images.eyesTiredMiddle)
})
brick.showImage(images.eyesSleeping)
```
## Activity 2
Play some motor sounds if touch sensor `1` is pressed at the same moment when and object comes close.
```blocks
while (true) {
if (sensors.touch1.isPressed() &&
sensors.ultrasonic4.distance() < 10) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}
}
```
## Activity 3
Play some motor sounds if touch sensor `1` is pressed when both the `enter` button is pressed on the brick and an object comes close.
```blocks
while (true) {
if (sensors.ultrasonic4.distance() < 10 &&
sensors.touch1.isPressed() &&
brick.buttonEnter.isPressed()) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}
}
```

View File

@ -1,9 +1,9 @@
# Light the way Activity 1
```blocks
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
brick.showImage(images.objectsLightOn)
loops.pause(5000)
pause(5000)
brick.clearScreen()
})
```

View File

@ -1,10 +1,10 @@
# Light the way Activity 2
```blocks
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright, function () {
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
brick.clearScreen()
})
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
brick.showImage(images.objectsLightOn)
})
```

View File

@ -1,13 +1,13 @@
# Light the way Activity 3
```blocks
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright, function () {
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
brick.clearScreen()
})
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
brick.showImage(images.objectsLightOn)
})
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
brick.showImage(images.objectsLightOn);
})
```

View File

@ -0,0 +1,241 @@
# Line Detection
Design ways to improve driving safety by helping to prevent drivers from falling asleep and causing an accident.
![Car following the line on the road](/static/coding/line-detection/car-road-line.jpg)
## Connect
Think about:
* How can autonomous cars react to different traffic light signals?
* What can happen if a driver falls asleep while driving?
* How can we detect when a driver is falling asleep?
## Construct
### Build
Build a @boardname@ vehicle that can help prevent drivers from falling asleep and causing an accident. Start by constructing this model:
[![EV3 robot with color sensor](/static/coding/line-detection/ev3-robot-color-sensor-down.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-color-sensor-down-driving-base-d30ed30610c3d6647d56e17bc64cf6e2.pdf)
Build red and green “lights” for your robot to detect. You can use LEGO bricks, colored tape, or marker on white paper. Building instructions:
[![IMAGE: Color Squares](/static/coding/line-detection/ev3-color-squares.jpg)](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:
* Are all the wires correctly connected from the motors to ports B and C?
* Are the wheels correctly installed?
* Are the wheels rotating freely?
* Are the wires connected from the Color Sensor to port 3?
![EV3 Driving Base](/static/coding/line-detection/ev3-robot-driving-base.jpg)
### Program
Autonomous cars need to recognize and respond to traffic lights automatically. Create a program that will make your robot stop at red lights. Make sure your robot is only responding to the color red. Once you have succeeded, program your robot to drive forward again when the light changes from red to green.
Before you program, think about:
* How will you program the robot to detect a color?
* How will you program the robot to stop at a color?
* Which programming blocks will you use?
### ~ hint
Consider using these blocks in your solution:
```block
loops.forever(function () {
})
motors.largeBC.steer(0, 50)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
```
### ~
### Sample Solution - Red light detection
1. Loop forever.
2. Start motors ``B`` and ``C`` (drive forward).
3. Wait for the color sensor to detect the color red.
4. Stop all motors.
```blocks
loops.forever(function () {
motors.largeBC.steer(0, 50)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
})
```
### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
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.
### Sample Solution - Red and green light detection in a loop
1. Start motors ``B`` and ``C`` (drive forward).
2. Wait for the color sensor to detect the color red.
3. Stop all motors.
4. Wait for the color sensor to detect the color green.
5. Loop forever.
```blocks
loops.forever(function () {
motors.largeBC.steer(0, 50)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Green)
})
```
### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
## Contemplate
To simulate what could happen if a driver falls asleep while driving, your robot could sound an alarm signal when it crosses the line. This feature is often available in new cars.
Program your robot to perform this function.
Draw a dark line with tape or marker for your robot to cross.
### ~hint
Consider using these blocks in your solution:
```block
motors.largeBC.steer(0, 50)
music.playSoundEffect(sounds.systemGeneralAlert)
```
### ~
### Sample Solution - Line detection in a loop
1. Start motors ``B`` and ``C`` (drive forward with a curve toward the line).
2. Wait for the color sensor to detect the color black.
3. Play sound effect ``system general alert``.
4. Start motors ``B`` and ``C`` (drive forward with a curve away from the line).
5. Wait for the color sensor to detect the color white.
6. Loop forever.
```blocks
loops.forever(function () {
motors.largeBC.steer(-30, 20)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Black)
music.playSoundEffect(sounds.systemGeneralAlert)
motors.largeBC.steer(30, 20)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.White)
})
```
#### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
#### Differentiation
Program your robot to drive on “autopilot” along a given route. You will need to create a program that recognizes and responds to a dark line (or white line). You will create a line-following program and your robot will need to travel along the line without losing contact with it.
You will need to constantly debug your program in order to make your robot travel as smoothly as possible along the line.
### ~hint
Consider using these blocks in your solution:
```block
while (true) {
}
motors.largeBC.steer(0, 50)
```
> **- OR -**
```block
if (true) {
} else {
}
```
### ~
### Sample Solutions - Line Following in Loop
#### Method 1
1. While the Color Sensor detects the color black, start motors ``B`` and ``C`` (drive forward with a curve toward the line).
2. While the Color Sensor detects the color white, start motors ``B`` and ``C`` (drive forward with a curve away from the line).
3. Loop forever.
```blocks
forever(function () {
while (sensors.color3.color() == ColorSensorColor.Black) {
motors.largeBC.steer(-30, 50)
}
while (sensors.color3.color() == ColorSensorColor.White) {
motors.largeBC.steer(30, 50)
}
})
```
#### Method 2
1. If the Color Sensor detects the color black, start motors ``B`` and ``C`` (drive forward with a curve toward the line).
Else the Color Sensor detects the color white, start motors ``B`` and ``C`` (drive forward with a curve away from the line).
2. Loop forever.
```blocks
forever(function () {
if (sensors.color3.color() == ColorSensorColor.Black) {
motors.largeBC.steer(-30, 50)
} else {
motors.largeBC.steer(30, 50)
}
})
```
### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick.
### Share
Think about:
* What challenged you?
* Were there any surprises?
* How can you improve your program?
* Can your program be more streamlined? Have you used too many blocks?
* Is there a more efficient way to build your program?
* How can your program be used in real-world scenarios?
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 robots 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?

View File

@ -0,0 +1,143 @@
# Object Detection
Design ways to avoid accidents between vehicles and objects in the road.
![Deer in the road](/static/coding/object-detection/road-deer.jpg)
## Connect
Think about:
* In what driving situations can a car hit an obstacle?
* What do you need to be aware of to avoid collisions with obstacles?
* What causes traffic jams in high density areas?
## Construct
### Build
Build a @boardname@ vehicle that can avoid accidents between vehicles and objects in the road. Start by constructing this model:
[![EV3 Robot Driving Base](/static/coding/object-detection/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)
Build an obstacle for your robot to detect. You can build the **cuboid model** out of LEGO bricks or an obstacle of your choice.
[![Cubiod block](/static/coding/object-detection/ev3-cuboid.jpg)](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:
* Are all the wires correctly connected from the motors to ports B and C?
* Are the wheels correctly installed?
* Are the wheels rotating freely?
* Are the wires connected from the Ultrasonic Sensor to port 4?
### Program
* 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:
* 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?
### ~hint
Consider using these blocks in your solution:
```block
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
motors.largeBC.steer(0, 50)
pauseUntil(() => true)
let near = sensors.ultrasonic4.distance() < 20
motors.stopAll()
```
### ~
### Sample Solution
1. Start the program when EV3 ``enter`` button is pressed.
2. Turn motors ``B`` and ``C`` on at speed ``50``.
3. Wait until Ultrasonic Sensor detects an obstacle at a distance of less than ``20`` cm.
4. Stops all motors.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.steer(0, 50)
pauseUntil(() => sensors.ultrasonic4.distance() < 20)
motors.stopAll()
})
```
### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the ``center`` button on the EV3 Brick to run the program.
## Contemplate
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.
If the Ultrasonic Sensor:
* Detects an object less than `10` cm away, make the robot stop.
* Detects an object between `10` and `20` cm away, make the robot slow down.
* Does not detect any object, continue to move at full speed.
### ~hint
Consider using this block in your solution:
```block
if (true) {
}
```
### ~
### Sample Solution
```blocks
loops.forever(function () {
motors.largeBC.steer(0, 50)
if (sensors.ultrasonic4.distance() < 10) {
motors.stopAll()
} else if (sensors.ultrasonic4.distance() < 20) {
motors.largeBC.steer(0, 10)
}
})
```
### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the ``center`` button on the EV3 Brick to run the program.
## 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.
* Refine your programs so that all of the robots continue driving at the same speed with equal distances between them.
* 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.
### Share
* 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 robots 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?

View File

@ -1,11 +1,11 @@
# Reverse Beeper Activity 1
```blocks
loops.forever(function () {
forever(function () {
music.playTone(440, sensors.ultrasonic4.distance());
loops.pause(50)
pause(50)
})
motors.largeBC.setSpeed(-20);
motors.largeBC.run(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.stopAllMotors();
motors.largeBC.stop();
```

View File

@ -1,13 +1,13 @@
# Reverse Beeper Activity 2
```blocks
loops.forever(function () {
forever(function () {
if (motors.largeB.speed() != 0 && sensors.ultrasonic4.distance() < 20) {
music.playTone(440, sensors.ultrasonic4.distance());
loops.pause(50)
pause(50)
}
})
motors.largeBC.setSpeed(-20);
motors.largeBC.run(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.stopAllMotors();
motors.largeBC.stop();
```

View File

@ -3,18 +3,17 @@
```blocks
let beep = false
beep = true
control.runInBackground(function () {
motors.largeB.setSpeed(-20)
motors.largeC.setSpeed(-20)
control.runInParallel(function () {
motors.largeBC.run(-20)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear)
motors.stopAllMotors()
motors.largeBC.stop()
beep = false
})
control.runInBackground(function () {
control.runInParallel(function () {
while (beep) {
if (sensors.ultrasonic4.distance() < 20) {
music.playTone(440, sensors.ultrasonic4.distance())
loops.pause(50)
pause(50)
}
}
})

View File

@ -1,14 +1,14 @@
# Reversing the robot Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
motors.largeBC.setSpeed(50)
sensors.touchSensor1.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.setSpeed(0)
loops.pause(1000)
brick.setLight(LightsPattern.OrangeFlash)
motors.largeBC.setSpeed(-50)
loops.pause(2000)
motors.largeBC.setSpeed(0)
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
motors.largeBC.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
motors.largeBC.run(0)
pause(1000)
brick.setStatusLight(StatusLight.OrangeFlash)
motors.largeBC.run(-50)
pause(2000)
motors.largeBC.run(0)
})
```

View File

@ -1,15 +1,15 @@
# Reversing the robot Activity 2
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
sensors.touchSensor1.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.setSpeed(50)
sensors.touchSensor2.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.setSpeed(0)
loops.pause(1000)
brick.setLight(LightsPattern.OrangeFlash)
motors.largeBC.setSpeed(-50)
loops.pause(2000)
motors.largeBC.setSpeed(0)
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
motors.largeBC.run(50)
sensors.touch2.pauseUntil(ButtonEvent.Pressed)
motors.largeBC.run(0)
pause(1000)
brick.setStatusLight(StatusLight.OrangeFlash)
motors.largeBC.run(-50)
pause(2000)
motors.largeBC.run(0)
})
```

View File

@ -1,19 +1,19 @@
# Reversing the robot Activity 3
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
brick.showImage(images.eyesSleeping)
sensors.touchSensor1.pauseUntil(TouchSensorEvent.Pressed)
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
brick.showImage(images.eyesNeutral)
motors.largeBC.setSpeed(50)
sensors.touchSensor2.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.run(50)
sensors.touch2.pauseUntil(ButtonEvent.Pressed)
brick.showImage(images.eyesTiredMiddle)
motors.largeBC.setSpeed(0)
loops.pause(1000)
brick.setLight(LightsPattern.OrangeFlash)
motors.largeBC.run(0)
pause(1000)
brick.setStatusLight(StatusLight.OrangeFlash)
brick.showImage(images.eyesDizzy)
motors.largeBC.setSpeed(-50)
loops.pause(2000)
motors.largeBC.setSpeed(0)
motors.largeBC.run(-50)
pause(2000)
motors.largeBC.run(0)
})
```

View File

@ -2,34 +2,30 @@
```blocks
let drive: number[] = []
brick.buttonLeft.onEvent(ButtonEvent.Click, function () {
brick.buttonLeft.onEvent(ButtonEvent.Bumped, function () {
drive.push(1)
})
brick.buttonRight.onEvent(ButtonEvent.Click, function () {
brick.buttonRight.onEvent(ButtonEvent.Bumped, function () {
drive.push(3)
})
brick.buttonUp.onEvent(ButtonEvent.Click, function () {
brick.buttonUp.onEvent(ButtonEvent.Bumped, function () {
drive.push(4)
})
brick.buttonDown.onEvent(ButtonEvent.Click, function () {
brick.buttonDown.onEvent(ButtonEvent.Bumped, function () {
drive.push(5)
})
pauseUntil(() => drive.length >= 5)
loops.pause(1000)
pause(1000)
music.playSoundEffectUntilDone(sounds.communicationGo)
for (let d of drive) {
if (d == 1) {
motors.largeC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeC.pauseUntilReady()
motors.largeC.run(50, 360, MoveUnit.Degrees)
} else if (d == 3) {
motors.largeB.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeB.pauseUntilReady()
motors.largeB.run(50, 360, MoveUnit.Degrees)
} else if (d == 4) {
motors.largeBC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
motors.largeBC.run(50, 360, MoveUnit.Degrees)
} else {
motors.largeBC.setSpeedFor(-50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
motors.largeBC.run(-50, 360, MoveUnit.Degrees)
}
}
music.playSoundEffectUntilDone(sounds.communicationGameOver)

View File

@ -2,38 +2,34 @@
```blocks
let drive: number[] = []
brick.buttonLeft.onEvent(ButtonEvent.Click, function () {
brick.buttonLeft.onEvent(ButtonEvent.Bumped, function () {
drive.push(1)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonRight.onEvent(ButtonEvent.Click, function () {
brick.buttonRight.onEvent(ButtonEvent.Bumped, function () {
drive.push(3)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonUp.onEvent(ButtonEvent.Click, function () {
brick.buttonUp.onEvent(ButtonEvent.Bumped, function () {
drive.push(4)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonDown.onEvent(ButtonEvent.Click, function () {
brick.buttonDown.onEvent(ButtonEvent.Bumped, function () {
drive.push(5)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonEnter.pauseUntil(ButtonEvent.Click);
loops.pause(1000)
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
pause(1000)
music.playSoundEffectUntilDone(sounds.communicationGo)
for (let d of drive) {
if (d == 1) {
motors.largeC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeC.pauseUntilReady()
motors.largeC.run(50, 360, MoveUnit.Degrees)
} else if (d == 3) {
motors.largeB.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeB.pauseUntilReady()
motors.largeB.run(50, 360, MoveUnit.Degrees)
} else if (d == 4) {
motors.largeBC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
motors.largeBC.run(50, 360, MoveUnit.Degrees)
} else {
motors.largeBC.setSpeedFor(-50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
motors.largeBC.run(-50, 360, MoveUnit.Degrees)
}
}
music.playSoundEffectUntilDone(sounds.communicationGameOver)

View File

@ -1,12 +1,12 @@
# Three Point Turn Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
pause(1500)
motors.largeBC.tank(-30, -75)
loops.pause(1000)
pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
pause(3000)
})
```

View File

@ -1,14 +1,14 @@
# Three Point Turn Activity 2
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
pause(1500)
motors.largeBC.tank(-30, -75)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.largeBC.tank(0, 0)
loops.pause(1000)
pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
pause(3000)
})
```

View File

@ -1,15 +1,15 @@
# Three Point Turn Activity 3
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
pause(1500)
motors.largeBC.tank(-30, -75)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.largeBC.tank(0, 0)
music.playSoundEffect(sounds.animalsDogBark1)
loops.pause(1000)
pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
pause(3000)
})
```

View File

@ -1,9 +1,9 @@
# Traffic Lights Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
motors.largeBC.tank(20, 20)
sensors.color3.pauseForColor(ColorSensorColor.Red)
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.largeBC.tank(0, 0)
})
```

View File

@ -1,7 +1,7 @@
# Traffic Lights Activity 3
```blocks
loops.forever(function () {
forever(function () {
if (sensors.color3.light(LightIntensityMode.Reflected) < 15) {
motors.largeBC.tank(30, 12)
} else {

View File

@ -0,0 +1,29 @@
# Design Engineering Projects
## Projects
```codecard
[
{
"name": "Make It Move Without Wheels",
"description": "Design, build and program a robot that can move itself using no wheels for locomotion.",
"imageUrl": "/static/lessons/make-it-move-without-wheels.png",
"url": "/design-engineering/make-it-move",
"cardType": "side"
},
{
"name": "Make It Smarter and Faster",
"description": "Design, build and program a robotic creature that can sense its environment and respond by moving.",
"imageUrl": "/static/lessons/make-it-smarter-and-faster.png",
"url": "/design-engineering/make-it-smarter",
"cardType": "side"
},
{
"name": "Make a System that Communicates",
"description": "Design, build and program a robotic system that follows a path and communicates its position at least twice along the way.",
"imageUrl": "/static/lessons/make-a-system-that-communicates.png",
"url": "/design-engineering/make-it-communicate",
"cardType": "side"
}
]
```

View File

@ -0,0 +1,163 @@
# Make A System That Communicates
## Connect
### Design Brief
Design, build and program a robotic system that follows a path and communicates its position at least twice along the way.
https://www.youtube.com/watch?v=6piMI1JPDQc
* Robotic systems are built from smaller, related subsystems. Look at the automobile system shown in the video. What subsystems can you see?
* What kinds of robots follow a path?
* What kind of system do you want to make?
### Brainstorm
Discuss different solutions to the design brief.
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?
![EV3 + LEGO Bricks](/static/lessons/make-it-communicate/ev3-plus-parts.jpg)
## Construct
### Build
You can start by tinkering with the LEGO elements in the picture and then build on.
More building ideas:
[![EV3 Frames](/static/lessons/make-it-communicate/ev3-frames.jpg)](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/ev3%20frames-5054ee378e624fb4cb31158d2fc8e5cf.pdf)
[![Tracks](/static/lessons/make-it-communicate/ev3-tracks.jpg)](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/tracks-32d7554813af3f25cf5012d54a4bad2b.pdf)
[![Color Sensor 2](/static/lessons/make-it-communicate/ev3-color-sensor2.jpg)](https://le-www-live-s.legocdn.com/sc/media/files/support/mindstorms%20ev3/building-instructions/design%20engineering%20projects/color%20sensor_v2-e7fd54b6fa3cdfe36f414c1d2510f9cb.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.
### ~
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:
* 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?
### ~hint
Explore the different Motor and Sensor blocks in the programming menu.
### ~
### Sample Solution
[![Video: EV3 Track Rover](/static/lessons/make-it-communicate/ev3-track-rover.jpg)](https://legoeducation.23video.com/v.ihtml/player.html?token=79c99735f906403a4dd7f2909935983d&source=embed&photo%5fid=19857954)
The Track Rover follows a path using the color sensor. It identifies two locations by color.
Track Rover solution combines these building ideas:
* EV3 frames
* Tracks
* Color sensor 2
Two copies of the tracks are built: one for the right side and a mirror image for the left side.
[![Track rover assembled](/static/lessons/make-it-communicate/ev3-track-rover2.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/track-rover-bi-6aadb1b053df0c58a0dea108b5ce0eea.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.
### ~
### 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.
* 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.
* Loops unlimited.
```blocks
forever(function () {
if (sensors.color3.color() == ColorSensorColor.Black) {
motors.largeB.run(-50)
motors.largeC.run(0)
} else if (sensors.color3.color() == ColorSensorColor.White) {
motors.largeC.run(-50)
motors.largeB.run(0)
} else if (sensors.color3.color() == ColorSensorColor.Green) {
motors.stopAll()
music.playSoundEffectUntilDone(sounds.colorsGreen)
motors.largeBC.run(-50)
} else if (sensors.color3.color() == ColorSensorColor.Red) {
motors.stopAll()
music.playSoundEffectUntilDone(sounds.colorsRed)
motors.largeBC.run(-50)
}
})
```
### Download and test
Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Contemplate
### Test and Analyze
As you work on your solution:
1. Describe one part of your design that worked especially well.
2. Describe one design change that you had to make.
3. What will you try next?
### Review and Revise
Take a moment to reflect on your robot solution.
Think about:
* Can the robots movement be more accurate?
* What are some ways that others have solved the problem?
Describe two ways you could improve your robot.
## Continue
### Personalize your project
* Add/remove LEGO elements to improve the way your robot moves.
* Click on the JavaScript tab and experiment with changing the values in the code.
* Add a custom image or sounds by adding blocks from the Brick or Music menus.
## Communicate
Here are some ideas:
* Create a video of your project, especially your final presentation and your robots performance.
* Explain some important features of your software program.
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
* Include an image of your program with comments.
* Add a team photograph!
Congratulations! What will you design next?

View File

@ -0,0 +1,105 @@
# Make It Move Without Wheels
## Connect
### Design Brief
Design, build and program a robot that can move itself using no wheels for locomotion.
![Make it move banner](/static/lessons/make-it-move/make-it-move-without-wheels.png)
Your robot will:
* Go a distance of at least 30cm
* Use at least one motor
* Use NO wheels for locomotion
### Brainstorm
In nature, creatures use many methods to get around. None of them, however, use wheels to move. Can we copy the method of animal locomotion with our robot? Using motors and legs, make a robot that can move without using any wheels.
## Construct
### Build
Think about a creatures movement for inspiration. Will you make the robot walk, crawl, hop, or wiggle? Your mechanism can be attached or unattached to the EV3 Brick. You can start by tinkering with the LEGO elements in the picture above and then build on.
### Building Hint
If you want some building help you can follow these instructions.
[![Toddle Bot](/static/lessons/make-it-move/toddle-bot.jpg)](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 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?
### Sample Code
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 displays the text ``"30cm"``
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeD.run(-100)
loops.pause(30000)
motors.stopAll()
brick.showString("30cm", 1)
})
```
### Download and test
Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Contemplate
### Test and Analyze
Think about:
* Is the robot using something other than wheels to move? Trace the movement from the motor axle to the mechanism(s) that drives the robot forward, backward or sideways. Wheels can be used to stabilize the robot but not to drive it.
* Does the robot display the distance moved? Is it accurate? How do you know?
* What is one part of your design that worked well?
* What is a change that you need to make?
* What will you try next?
## Continue
### Personalize your project
* Add/remove LEGO elements to improve the way your robot moves. Will your robot walk, wiggle, hop, or slither? Will it move slower, faster or farther?
* Click on the JavaScript tab and experiment with changing the values in the code.
* Add a custom image or sounds by adding blocks from the Brick or Music menus.
* Does your robot resemble a creature? Add arts and crafts materials to your project.
## Communicate
* Create a video of your project, especially your final presentation and your robots performance.
* Explain some important features of your software program.
* Produce a building guide for your model by taking a series of photographs as you deconstruct it.
* Include an image of your program with comments.
* Add a team photograph!
Congratulations! What will you design next?

View File

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

View File

@ -2,6 +2,207 @@
Here are some fun programs for your @boardname@!
## Maker
```codecard
[
{
"name": "Sound Of Color",
"description": "Play different sounds based on the color",
"url":"/maker/sound-of-color",
"cardType": "example",
"imageUrl": "/static/maker/sound-of-color.png"
},
{
"name": "Security Gadget",
"description": "Raise the alarm when your brick is lifted!",
"url":"/maker/security-gadget",
"cardType": "example",
"imageUrl": "/static/maker/security-gadget.png"
},
{
"name": "Movement Detector",
"description": "Raise the alarm when an movement sneaks in",
"url":"/maker/movement-detector",
"cardType": "example",
"imageUrl": "/static/maker/movement-detector.png"
},
{
"name": "Puppet",
"description": "Build an automated puppet",
"url":"/maker/puppet",
"cardType": "example",
"imageUrl": "/static/maker/puppet.png"
}
]
```
## Three Point Turn
```codecard
[
{
"name": "Three Point Turn 1",
"description": "Activity 1",
"url":"/coding/three-point-turn-1",
"cardType": "example"
}, {
"name": "Three Point Turn 2",
"description": "Activity 2",
"url":"/coding/three-point-turn-2",
"cardType": "example"
}, {
"name": "Three Point Turn 3",
"description": "Activity 3",
"url":"/coding/three-point-turn-3",
"cardType": "example"
}]
```
## Reversing the robot
```codecard
[{
"name": "Reversing the robot 1",
"description": "Activity 1",
"url":"/coding/reversing-the-robot-1",
"cardType": "example"
}, {
"name": "Reversing the robot 2",
"description": "Activity 2",
"url":"/coding/reversing-the-robot-2",
"cardType": "example"
}, {
"name": "Reversing the robot 3",
"description": "Activity 3",
"url":"/coding/reversing-the-robot-3",
"cardType": "example"
}]
```
## Light the way
```codecard
[{
"name": "Light the way 1",
"description": "Activity 1",
"url":"/coding/light-the-way-1",
"cardType": "example"
}, {
"name": "Light the way 2",
"description": "Activity 2",
"url":"/coding/light-the-way-2",
"cardType": "example"
}, {
"name": "Light the way 3",
"description": "Activity 3",
"url":"/coding/light-the-way-3",
"cardType": "example"
}
]
```
## Traffic Lights
```codecard
[{
"name": "Traffic Lights 1",
"description": "Activity 1",
"url":"/coding/traffic-lights-1",
"cardType": "example"
}, {
"name": "Traffic Lights 2",
"description": "Activity 2",
"url":"/coding/traffic-lights-2",
"cardType": "example"
}, {
"name": "Traffic Lights 3",
"description": "Activity 3",
"url":"/coding/traffic-lights-3",
"cardType": "example"
}
]
```
## Reverse Bepper
```codecard
[{
"name": "Reverse Beeper 1",
"description": "Activity 1",
"url":"/coding/reverse-beeper-1",
"cardType": "example"
}, {
"name": "Reverse Beeper 2",
"description": "Activity 2",
"url":"/coding/reverse-beeper-2",
"cardType": "example"
}, {
"name": "Reverse Beeper 3",
"description": "Activity 3",
"url":"/coding/reverse-beeper-3",
"cardType": "example"
}]
```
## Ignition
```codecard
[{
"name": "Ignition 1",
"description": "Activity 1",
"url":"/coding/ingition-1",
"cardType": "example"
}, {
"name": "Ignition 2",
"description": "Activity 2",
"url":"/coding/ignition-2",
"cardType": "example"
}, {
"name": "Ignition 3",
"description": "Activity 3",
"url":"/coding/ignition-3",
"cardType": "example"
}]
```
## Cruise Control
```codecard
[{
"name": "Cruise Control 1",
"description": "Activity 1",
"url":"/coding/cruise-control-1",
"cardType": "example"
}, {
"name": "Cruise Control 2",
"description": "Activity 2",
"url":"/coding/cruise-control-2",
"cardType": "example"
}, {
"name": "Cruise Control 3",
"description": "Activity 3",
"url":"/coding/cruise-control-3",
"cardType": "example"
}]
```
## Roaming
```codecard
[{
"name": "Roaming 1",
"description": "Activity 1",
"url":"/coding/roaming-1",
"cardType": "example"
}, {
"name": "Roaming 2",
"description": "Activity 2",
"url":"/coding/roaming-2",
"cardType": "example"
}]
```
## Fun stuff
```codecard
@ -11,5 +212,15 @@ Here are some fun programs for your @boardname@!
"description": "Keep your brick entertained and happy",
"url":"/examples/happy-unhappy",
"cardType": "example"
}, {
"name": "Turtle",
"description": "Encode moves and run them on a driving base",
"url":"/examples/turtle",
"cardType": "example"
}, {
"name": "Distance Measurer",
"description": "Use a motor to measure angle and distance",
"url": "/examples/distance-measurer",
"cardType": "example"
}]
```

View File

@ -0,0 +1,178 @@
# Gyroboy
Work in progress
```blocks
let motorSpeed1 = 0
let motorSpeed2 = 0
let motorSpeed3 = 0
let motorSpeed = 0
let fallen = false
let motorSpeed0 = 0
let oldControlDrive = 0
let controlDrive = 0
let power = 0
let motorAngle = 0
let gyroAngle = 0
let controlSteering = 0
let state = 0
let motorPosition = 0
let temp = 0
let gyroRate = 0
let timestep = 0
sensors.color1.onColorDetected(ColorSensorColor.Red, function () {
music.playTone(2000, 100)
controlDrive = 0
controlSteering = 0
})
// reads the motor angle and computes the motor speed,
// position
function computeMotors() {
temp = motorAngle
// read angle on both motors
motorAngle = motors.largeD.angle() + motors.largeA.angle()
// and estimate speed as angle difference
motorSpeed0 = motorAngle - temp
// average last 4 speed readings
motorSpeed = (motorSpeed0 + motorSpeed1 + motorSpeed2 + motorSpeed3) / 4 / timestep
// shift all previous recorded speeds by one
motorSpeed3 = motorSpeed2
motorSpeed2 = motorSpeed1
motorSpeed1 = motorSpeed0
// compute position from speed
motorPosition = motorPosition + timestep * motorSpeed
}
// read the gyro rate and computes the angle
function computeGyro() {
gyroRate = sensors.gyro2.rate()
gyroAngle = gyroAngle + timestep * gyroRate
}
function reset() {
state = 0
// sleeping
moods.sleeping.show();
// reset counters
motors.largeA.reset()
motors.largeD.reset()
// motors are unregulated
motors.largeA.setRegulated(false)
motors.largeD.setRegulated(false)
// clear the gyro sensor to remove drift
sensors.gyro2.reset()
// fall detection timer
control.timer2.reset()
// timestep computation timer
control.timer3.reset()
motorAngle = 0
motorPosition = 0
motorSpeed = 0
motorSpeed0 = 0
motorSpeed1 = 0
motorSpeed2 = 0
motorSpeed3 = 0
gyroRate = 0
gyroAngle = 0
fallen = false
power = 0
controlSteering = 0
controlDrive = 0
// awake
moods.awake.show();
gyroAngle = -0.25
state = 1;
}
// compute set point for motor position and required
// motor power
function computePower() {
// apply control and compute desired motor position
motorPosition -= timestep * controlDrive;
// estimate power based on sensor readings and control
// values
power = 0.8 * gyroRate + 15 * gyroAngle + (0.08 * motorSpeed + 0.12 * motorPosition) - 0.01 * controlDrive
// ensure that power stays within -100, 100
if (power > 100) {
power = 100
} else if (power < -100) {
power = -100
}
}
// test if the robot has fallen off
function checkFallen() {
if (Math.abs(power) < 100) {
control.timer2.reset()
}
if (control.timer2.seconds() > 2) {
fallen = true
}
}
// stop all motors and wait for touch button to be
// pressed
function stop() {
motors.stopAll()
state = 0
moods.knockedOut.show();
sensors.touch3.pauseUntil(ButtonEvent.Pressed)
moods.neutral.show();
}
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectNear, function () {
moods.dizzy.show()
controlSteering = 0
oldControlDrive = controlDrive
controlDrive = -10
motors.mediumC.run(30, 30, MoveUnit.Degrees);
motors.mediumC.run(-30, 60, MoveUnit.Degrees);
motors.mediumC.run(30, 30, MoveUnit.Degrees);
if (Math.randomRange(-1, 1) >= 1) {
controlSteering = 70
} else {
controlSteering = -70
}
pause(4000)
music.playTone(2000, 100)
controlSteering = 0
controlDrive = oldControlDrive
moods.neutral.show()
})
// compute the elapsed time since the last iteration
function computeTimestep() {
timestep = control.timer3.seconds()
control.timer3.reset()
}
sensors.color1.onColorDetected(ColorSensorColor.Green, function () {
moods.winking.show()
controlDrive = 150
controlSteering = 0
})
sensors.color1.onColorDetected(ColorSensorColor.Blue, function () {
moods.middleRight.show()
controlSteering = 70
})
// apply power to motors
function controlMotors() {
motors.largeA.run(power + controlSteering * 0.1)
motors.largeD.run(power - controlSteering * 0.1)
}
sensors.color1.onColorDetected(ColorSensorColor.Yellow, function () {
moods.middleLeft.show()
controlSteering = -70
})
sensors.color1.onColorDetected(ColorSensorColor.White, function () {
moods.sad.show();
controlDrive = -75
})
timestep = 0.014
// main loop
forever(function () {
reset()
while (!fallen) {
control.timer3.pauseUntil(5)
computeTimestep()
computeGyro()
computeMotors()
computePower()
controlMotors()
checkFallen()
}
stop()
})
```

View File

@ -0,0 +1,215 @@
# Gyroboy LabView
```typescript
let mSum = 0;
let mPos = 0;
let mSpd = 0;
let mD = 0;
let mDP1 = 0;
let mDP2 = 0;
let mDP3 = 0;
let Crdv = 0;
let cLo = 0;
let gAng = 0;
let ok = false;
let pwr = 0;
let Cstr = 0;
let Cdrv = 0;
let gMn = 0;
let gMx = 0;
let gSum = 0;
let gyro = 0;
let gOS = 0;
let gSpd = 0;
let tInt = 0.014;
let lpwr = 0
let rpwr = 0
let tStart = 0
let st = 0
let oldDr = 0
function RST() {
motors.largeA.reset()
motors.largeD.reset()
motors.largeA.setRegulated(false)
motors.largeD.setRegulated(false)
sensors.gyro2.reset()
sensors.gyro2.rate()
control.timer2.reset()
pause(5000)
mSum = 0;
mPos = 0;
mD = 0;
mDP1 = 0;
mDP2 = 0;
mDP3 = 0;
Crdv = 0;
cLo = 0;
gAng = 0;
ok = false;
pwr = 0;
st = 0;
Cstr = 0;
Cdrv = 0;
}
function OS() {
// OSL
do {
gMn = 1000;
gMx = -100;
gSum = 0;
// gChk
for (let i = 0; i < 200; i++) {
gyro = sensors.gyro2.rate()
gSum = gyro;
gMx = Math.max(gMx, gyro)
gMn = Math.min(gMn, gyro)
pause(4);
}
} while (gMx - gMn > 2);
gOS = gSum / 200;
}
function GT() {
if (cLo == 0) {
tInt = 0.014;
control.timer1.reset();
} else {
tInt = control.timer1.seconds() / cLo;
}
cLo++;
}
function GG() {
gyro = sensors.gyro2.rate();
gOS = 0.0005 * gyro + (1 - 0.0005) * gOS
gSpd = gyro - gOS;
gAng = gAng + tInt * gSpd;
}
function GM() {
let temp = mSum
mSum = motors.largeD.angle() + motors.largeA.angle();
mD = mSum - temp;
mPos = mPos + mD;
mSpd = ((mDP1 + mDP2 + mDP3 + mD) / 4) / tInt;
mDP3 = mDP2;
mDP2 = mDP1;
mDP1 = mD;
}
function EQ() {
mPos = mPos - Cdrv * tInt;
pwr = (0.8 * gSpd + 15 * gAng) + (0.08 * mSpd + 0.12 * mPos) - 0.01 * Cdrv
if (pwr > 100) pwr = 100
else if (pwr < -100) pwr = -100
}
function cntrl() {
mPos = mPos - tInt * Cdrv
lpwr = (pwr + Cstr * 0.1)
rpwr = (pwr - Cstr * 0.1)
}
function CHK() {
if (Math.abs(pwr) < 100)
control.timer2.reset();
if (control.timer2.seconds() > 2) {
ok = true;
}
}
// M
forever(function () {
RST();
brick.showImage(images.eyesSleeping)
OS()
gAng = -0.25;
music.playSoundEffect(sounds.movementsSpeedUp)
brick.showImage(images.eyesAwake)
st = 1;
// BALANCE
while (!ok) {
GT();
let t1 = control.timer1.millis()
GG();
GM();
EQ();
cntrl();
motors.largeA.run(lpwr)
motors.largeD.run(rpwr)
CHK()
let t2 = control.timer1.millis();
let p = 5 - (t2 - t1);
pause(Math.max(1, p))
}
motors.stopAll()
st = 0;
brick.setStatusLight(StatusLight.RedPulse);
brick.showImage(images.eyesKnockedOut)
music.playSoundEffect(sounds.movementsSpeedDown)
sensors.touch3.pauseUntil(ButtonEvent.Pressed)
brick.setStatusLight(StatusLight.Off);
})
// BHV
forever(function () {
switch (st) {
case 0:
Cdrv = 0;
Cstr = 0;
break;
case 1:
Cdrv = 40;
pause(4000);
Cdrv = 0;
music.playTone(1000, 100);
st = 2;
break;
case 2:
switch (sensors.color1.color()) {
case ColorSensorColor.Red:
music.playTone(2000, 100);
Cdrv = 0;
Cstr = 0;
break;
case ColorSensorColor.Green:
music.playTone(2000, 100);
Cdrv = 150;
Cstr = 0;
break;
case ColorSensorColor.Blue:
music.playTone(2000, 100);
Cstr = 70;
break;
case ColorSensorColor.Yellow:
music.playTone(2000, 100);
Cstr = -70;
break;
case ColorSensorColor.White:
music.playTone(2000, 100);
Cdrv = -75;
break;
}
if (sensors.ultrasonic4.distance() < 25) {
Cstr = 0;
oldDr = Cdrv;
Cdrv = -10;
motors.mediumC.run(30, 30, MoveUnit.Degrees);
motors.mediumC.run(-30, 60, MoveUnit.Degrees);
motors.mediumC.run(30, 30, MoveUnit.Degrees);
if (Math.randomRange(-1, 1) >= 1)
Cstr = 70;
else
Cstr = -70;
pause(4000);
music.playTone(2000, 100)
Cstr = 0;
Cdrv = oldDr;
}
break;
}
pause(80);
})
```

View File

@ -0,0 +1,390 @@
# Puppy
```typescript
let P_T = 0;
let ISS = 0;
let F_T = 0;
let P_C = 0;
let F_C = 0;
let DB_S = 0;
let NS = false;
let IBP = 0;
let IAP = 0;
let C = false;
let TC = false;
let OTC = false;
let COL = 0;
let OCOL = 0;
let _C = false;
let GTO = 0;
function DN() {
motors.largeAD.setBrake(true);
motors.largeAD.tank(50, 50, 1, MoveUnit.Seconds);
pause(100);
motors.largeA.clearCounts()
motors.largeD.clearCounts()
}
function MNRH() {
motors.mediumC.setBrake(true)
brick.showImage(images.legoEv3icon)
brick.setStatusLight(StatusLight.OrangePulse)
while (!brick.buttonEnter.wasPressed()) {
if (brick.buttonUp.wasPressed()) {
motors.mediumC.run(-100);
} else if (brick.buttonDown.wasPressed()) {
motors.mediumC.run(100);
} else {
motors.mediumC.stop();
}
}
motors.mediumC.stop();
motors.mediumC.clearCounts();
brick.setStatusLight(StatusLight.Green);
}
function IS(t: number) {
ISS = t;
switch (t) {
case 0:
brick.showImage(images.eyesNeutral);
break;
case 1:
brick.showImage(images.eyesSleeping);
break;
case 2:
brick.showImage(images.eyesTear);
// draw rect...
break;
case 3:
brick.showImage(images.eyesHurt);
break;
case 4:
brick.showImage(images.eyesAngry);
break;
case 5:
brick.showImage(images.eyesTiredMiddle);
break;
case 6:
brick.showImage(images.eyesTiredRight);
break;
case 7:
brick.showImage(images.eyesTiredLeft);
break;
case 8:
brick.showImage(images.eyesLove);
break;
}
}
function UP() {
if (motors.largeA.angle() > -50) {
control.runInParallel(function () {
motors.largeD.clearCounts()
motors.largeD.run(-35);
pauseUntil(() => motors.largeD.angle() < -25);
motors.largeD.stop();
motors.largeD.setRegulated(false)
motors.largeD.run(-15)
pauseUntil(() => motors.largeD.angle() < -65);
motors.largeD.stop();
})
motors.largeA.clearCounts()
motors.largeA.run(-35);
pauseUntil(() => motors.largeA.angle() < -25);
motors.largeA.stop();
motors.largeA.setRegulated(false)
motors.largeA.run(-15)
pauseUntil(() => motors.largeA.angle() < -65);
motors.largeA.stop();
pause(500);
}
}
function RST() {
P_T = Math.randomRange(3, 6);
F_T = Math.randomRange(2, 4);
P_C = 1;
F_C = 1;
control.timer1.reset();
control.timer2.reset();
control.timer3.reset();
CS(0);
}
function CS(db: number) {
if (DB_S != db) {
DB_S = db;
NS = true;
}
}
function MON() {
if (control.timer2.seconds() > 10) {
control.timer2.reset();
P_C--;
if (P_C < 0) {
P_C = 0;
}
}
if (control.timer1.seconds() > 20) {
control.timer1.reset()
F_C--;
if (F_C < 0) {
F_C = 0;
}
}
if (control.timer3.seconds() > 30) {
control.timer3.reset();
CS(1);
}
}
function UIS() {
if (control.timer5.seconds() > IBP) {
control.timer5.reset();
if (ISS == 1) {
ISS = 6;
IBP = Math.randomRange(1, 5);
} else {
ISS = 1;
IBP = 0.25;
}
IS(ISS);
}
if (control.timer6.seconds() > IAP) {
if (ISS != 1) {
control.timer6.reset();
IAP = Math.randomRange(1, 10)
if (ISS != 7) {
ISS = 7
} else {
ISS = 6;
}
IS(ISS);
}
}
}
function UPDB() {
if ((P_T == P_C) && (F_T == F_C)) {
CS(6);
}
if ((P_T > P_C) && (F_T < F_C)) {
CS(3);
}
if ((P_T < P_C) && (F_T > F_C)) {
CS(5);
}
if ((P_C == 0) && (F_C > 0)) {
CS(2)
}
if (F_C == 0) {
CS(4)
}
}
function PTC() {
C = false;
OTC = TC;
TC = sensors.touch1.isPressed()
if (TC != OTC && TC) {
P_C++;
control.timer3.reset();
if (DB_S != 4) {
IS(2);
music.playSoundEffect(sounds.animalsDogSniff);
C = true;
}
}
return C;
}
function FDC() {
OCOL = COL;
COL = sensors.color4.color();
_C = false;
if ((COL != 0) && (OCOL != COL)) {
F_C++;
_C = true;
control.timer3.reset();
IS(2);
music.playSoundEffect(sounds.expressionsCrunching)
}
return _C;
}
function IDL() {
if (NS) {
NS = false;
UP();
}
UIS();
UPDB();
PTC();
FDC();
}
function MHT(Pos: number) {
let _R = Pos - motors.mediumC.angle();
if (_R >= 0) {
motors.mediumC.run(100, _R, MoveUnit.Degrees);
} else {
motors.mediumC.run(-100, Math.abs(_R), MoveUnit.Degrees);
}
}
function SLP() {
if (NS) {
NS = false;
IS(5)
DN()
MHT(3000)
IS(1)
music.playSoundEffect(sounds.expressionsSnoring)
}
if (sensors.touch1.isPressed() || brick.buttonEnter.isPressed()) {
music.stopAllSounds();
control.timer3.reset();
CS(7);
}
}
function PLF() {
if (NS) {
NS = false
IS(0)
UP()
music.playSoundEffect(sounds.animalsDogBark2)
control.timer4.reset()
GTO = Math.randomRange(4, 8);
}
if(PTC()) {
CS(0);
}
if (control.timer4.seconds() > GTO) {
music.playSoundEffect(sounds.animalsDogBark2)
control.timer4.reset();
GTO = Math.randomRange(4, 8);
}
}
function NGR() {
NS = false
IS(4)
music.playSoundEffect(sounds.animalsDogGrowl);
UP();
pause(1500);
music.stopAllSounds()
music.playSoundEffect(sounds.animalsDogBark1)
P_C--;
CS(0);
}
function HNG() {
if (NS) {
NS = false;
IS(3)
DN();
music.playSoundEffect(sounds.animalsDogWhine);
}
if(FDC()) {
CS(0)
}
if (PTC()) {
CS(3);
}
}
function PPP() {
NS = false;
IS(2);
UP();
pause(100)
motors.largeA.run(-30, 70, MoveUnit.Degrees);
pause(800);
music.playSoundEffect(sounds.mechanicalHorn1);
pause(1000);
for(let i = 0; i < 3; ++i) {
motors.largeA.run(-30, 20, MoveUnit.Degrees);
motors.largeA.run(30, 20, MoveUnit.Degrees);
}
motors.largeA.run(30, 70, MoveUnit.Degrees);
F_C = 1;
CS(0);
}
function HPY() {
IS(8)
MHT(0);
motors.largeAD.run(10, 0.8, MoveUnit.Seconds);
for(let i = 0; i < 3; ++i) {
music.playSoundEffect(sounds.animalsDogBark1);
motors.largeAD.run(-100, 0.2, MoveUnit.Seconds);
pause(300)
motors.largeAD.run(10, 0.3, MoveUnit.Seconds)
}
pause(500);
music.stopAllSounds();
DN();
RST();
}
function STL() {
UP();
motors.largeAD.run(-20, 60, MoveUnit.Degrees);
music.playSoundEffect(sounds.animalsDogWhine);
motors.largeAD.run(20, 60, MoveUnit.Degrees);
}
function WKU() {
let stateC = false;
IS(5);
music.playSoundEffect(sounds.animalsDogWhine)
MHT(0)
DN()
STL()
pause(1000);
UP()
CS(0;)
}
DN();
MNRH();
// compare button state???
IS(1);
UP();
RST();
forever(function () {
MON();
switch (DB_S) {
case 0:
IDL();
break;
case 1:
SLP();
break;
case 2:
PLF();
break;
case 3:
NGR();
break;
case 4:
HNG();
break;
case 5:
PPP();
break;
case 6:
HPY();
break;
case 7:
WKU();
break;
}
})
```

View File

@ -0,0 +1,51 @@
# Robot Arm
```typescript
function INI() {
motors.largeB.setBrake(true)
motors.largeC.setBrake(true)
motors.mediumA.setBrake(true)
motors.largeB.run(-50)
pauseUntil(() => sensors.color3.light(LightIntensityMode.Reflected) > 25);
motors.largeB.stop();
motors.mediumA.run(30, 1, MoveUnit.Seconds);
motors.mediumA.run(-50, 90, MoveUnit.Degrees);
motors.largeC.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed);
motors.largeC.run(-50, 0.86, MoveUnit.Rotations);
}
INI()
let down = false;
forever(function () {
brick.showImage(images.informationQuestionMark)
brick.setStatusLight(StatusLight.OrangePulse);
pauseUntil(() => (down = brick.buttonDown.wasPressed()) || brick.buttonUp.wasPressed())
brick.setStatusLight(StatusLight.Off)
music.playSoundEffect(sounds.mechanicalAirRelease)
brick.showImage(images.informationAccept)
if (down) {
brick.showImage(images.informationForward)
motors.largeC.run(65, 0.85, MoveUnit.Rotations);
} else {
brick.showImage(images.informationBackward)
motors.largeC.run(-65, 0.85, MoveUnit.Rotations);
}
motors.largeB.run(20, 275, MoveUnit.Degrees)
motors.mediumA.run(30, 1, MoveUnit.Seconds)
motors.largeB.run(-55)
pauseUntil(() => sensors.color3.light(LightIntensityMode.Reflected) > 25);
motors.largeB.stop();
if (down) {
motors.largeC.run(-65, 0.86, MoveUnit.Rotations);
} else {
motors.largeC.run(65, 0.85, MoveUnit.Rotations);
}
motors.largeB.run(20, 275, MoveUnit.Degrees);
motors.mediumA.run(-30, 90, MoveUnit.Degrees);
motors.largeB.run(-55)
pauseUntil(() => sensors.color3.light(LightIntensityMode.Reflected) > 25);
motors.largeB.stop()
})
```

View File

@ -0,0 +1,51 @@
# Crane LabView
```blocks
function INI() {
motors.largeB.setBrake(true)
motors.largeC.setBrake(true)
motors.mediumA.setBrake(true)
motors.largeB.run(-50)
pauseUntil(() => sensors.color3.light(LightIntensityMode.Reflected) > 25);
motors.largeB.stop();
motors.mediumA.run(30, 1, MoveUnit.Seconds);
motors.mediumA.run(-50, 90, MoveUnit.Degrees);
motors.largeC.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed);
motors.largeC.run(-50, 0.86, MoveUnit.Rotations);
}
INI()
let down = false;
forever(function () {
brick.showImage(images.informationQuestionMark)
brick.setStatusLight(StatusLight.OrangePulse);
pauseUntil(() => (down = brick.buttonDown.wasPressed()) || brick.buttonUp.wasPressed())
brick.setStatusLight(StatusLight.Off)
music.playSoundEffect(sounds.mechanicalAirRelease)
brick.showImage(images.informationAccept)
if (down) {
brick.showImage(images.informationForward)
motors.largeC.run(65, 0.85, MoveUnit.Rotations);
} else {
brick.showImage(images.informationBackward)
motors.largeC.run(-65, 0.85, MoveUnit.Rotations);
}
motors.largeB.run(20, 275, MoveUnit.Degrees)
motors.mediumA.run(30, 1, MoveUnit.Seconds)
motors.largeB.run(-55)
pauseUntil(() => sensors.color3.light(LightIntensityMode.Reflected) > 25);
motors.largeB.stop();
if (down) {
motors.largeC.run(-65, 0.86, MoveUnit.Rotations);
} else {
motors.largeC.run(65, 0.85, MoveUnit.Rotations);
}
motors.largeB.run(20, 275, MoveUnit.Degrees);
motors.mediumA.run(-30, 90, MoveUnit.Degrees);
motors.largeB.run(-55)
pauseUntil(() => sensors.color3.light(LightIntensityMode.Reflected) > 25);
motors.largeB.stop()
})
```

View File

@ -0,0 +1,34 @@
# Distance Measurer
```blocks
let distance = 0
let angle = 0
let measuring = false
let radius = 0
// Start and stop measuring with the enter button
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
if (measuring) {
// turn off the measuring
measuring = false
brick.setStatusLight(StatusLight.Off)
} else {
// turn on the measuring clear the counters so that
// the motor tracks the angle
measuring = true
motors.largeB.clearCounts()
brick.setStatusLight(StatusLight.GreenPulse)
}
})
radius = 2.5
brick.showString("Press ENTER to measure", 4)
forever(function () {
if (measuring) {
angle = motors.largeB.angle()
distance = angle / 180 * Math.PI * radius
brick.clearScreen()
brick.showValue("angle", angle, 2)
brick.showValue("distance", distance, 3)
}
pause(100)
})
```

View File

@ -0,0 +1,215 @@
# Gyro Boy LabView
```blocks
let mSum = 0;
let mPos = 0;
let mSpd = 0;
let mD = 0;
let mDP1 = 0;
let mDP2 = 0;
let mDP3 = 0;
let Crdv = 0;
let cLo = 0;
let gAng = 0;
let ok = false;
let pwr = 0;
let Cstr = 0;
let Cdrv = 0;
let gMn = 0;
let gMx = 0;
let gSum = 0;
let gyro = 0;
let gOS = 0;
let gSpd = 0;
let tInt = 0.014;
let lpwr = 0
let rpwr = 0
let tStart = 0
let st = 0
let oldDr = 0
function RST() {
motors.largeA.reset()
motors.largeD.reset()
motors.largeA.setRegulated(false)
motors.largeD.setRegulated(false)
sensors.gyro2.reset()
sensors.gyro2.rate()
control.timer2.reset()
pause(5000)
mSum = 0;
mPos = 0;
mD = 0;
mDP1 = 0;
mDP2 = 0;
mDP3 = 0;
Crdv = 0;
cLo = 0;
gAng = 0;
ok = false;
pwr = 0;
st = 0;
Cstr = 0;
Cdrv = 0;
}
function OS() {
// OSL
do {
gMn = 1000;
gMx = -100;
gSum = 0;
// gChk
for (let i = 0; i < 200; i++) {
gyro = sensors.gyro2.rate()
gSum = gyro;
gMx = Math.max(gMx, gyro)
gMn = Math.min(gMn, gyro)
pause(4);
}
} while (gMx - gMn > 2);
gOS = gSum / 200;
}
function GT() {
if (cLo == 0) {
tInt = 0.014;
control.timer1.reset();
} else {
tInt = control.timer1.seconds() / cLo;
}
cLo++;
}
function GG() {
gyro = sensors.gyro2.rate();
gOS = 0.0005 * gyro + (1 - 0.0005) * gOS
gSpd = gyro - gOS;
gAng = gAng + tInt * gSpd;
}
function GM() {
let temp = mSum
mSum = motors.largeD.angle() + motors.largeA.angle();
mD = mSum - temp;
mPos = mPos + mD;
mSpd = ((mDP1 + mDP2 + mDP3 + mD) / 4) / tInt;
mDP3 = mDP2;
mDP2 = mDP1;
mDP1 = mD;
}
function EQ() {
mPos = mPos - Cdrv * tInt;
pwr = (0.8 * gSpd + 15 * gAng) + (0.095 * mSpd + 0.13 * mPos) - 0.01 * Cdrv
if (pwr > 100) pwr = 100
else if (pwr < -100) pwr = -100
}
function cntrl() {
mPos = mPos - tInt * Cdrv
lpwr = (pwr + Cstr * 0.1)
rpwr = (pwr - Cstr * 0.1)
}
function CHK() {
if (Math.abs(pwr) < 100)
control.timer2.reset();
if (control.timer2.seconds() > 2) {
ok = true;
}
}
// M
forever(function () {
RST();
brick.showImage(images.eyesSleeping)
OS()
gAng = -0.25;
music.playSoundEffect(sounds.movementsSpeedUp)
brick.showImage(images.eyesAwake)
st = 1;
// BALANCE
while (!ok) {
GT();
let t1 = control.timer1.millis()
GG();
GM();
EQ();
cntrl();
motors.largeA.run(lpwr)
motors.largeD.run(rpwr)
CHK()
let t2 = control.timer1.millis();
let p = 5 - (t2 - t1);
pause(Math.max(1, p))
}
motors.stopAll()
st = 0;
brick.setStatusLight(StatusLight.RedPulse);
brick.showImage(images.eyesKnockedOut)
music.playSoundEffect(sounds.movementsSpeedDown)
sensors.touch3.pauseUntil(ButtonEvent.Pressed)
brick.setStatusLight(StatusLight.Off);
})
// BHV
forever(function () {
switch (st) {
case 0:
Cdrv = 0;
Cstr = 0;
break;
case 1:
Cdrv = 40;
pause(4000);
Cdrv = 0;
music.playTone(1000, 100);
st = 2;
break;
case 2:
switch (sensors.color1.color()) {
case ColorSensorColor.Red:
music.playTone(2000, 100);
Cdrv = 0;
Cstr = 0;
break;
case ColorSensorColor.Green:
music.playTone(2000, 100);
Cdrv = 150;
Cstr = 0;
break;
case ColorSensorColor.Blue:
music.playTone(2000, 100);
Cstr = 70;
break;
case ColorSensorColor.Yellow:
music.playTone(2000, 100);
Cstr = -70;
break;
case ColorSensorColor.White:
music.playTone(2000, 100);
Cdrv = -75;
break;
}
if (sensors.ultrasonic4.distance() < 25) {
Cstr = 0;
oldDr = Cdrv;
Cdrv = -10;
motors.mediumC.run(30, 30, MoveUnit.Degrees);
motors.mediumC.run(-30, 60, MoveUnit.Degrees);
motors.mediumC.run(30, 30, MoveUnit.Degrees);
if (Math.randomRange(-1, 1) >= 1)
Cstr = 70;
else
Cstr = -70;
pause(4000);
music.playTone(2000, 100)
Cstr = 0;
Cdrv = oldDr;
}
break;
}
pause(80);
})
```

View File

@ -3,10 +3,10 @@
Use a touch sensor to make the brick happy.
```blocks
sensors.touchSensor1.onEvent(TouchSensorEvent.Pressed, function () {
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
brick.showImage(images.expressionsBigSmile)
})
sensors.touchSensor1.onEvent(TouchSensorEvent.Released, function () {
sensors.touch1.onEvent(ButtonEvent.Released, function () {
brick.showImage(images.expressionsSick)
})
```

View File

@ -14,7 +14,7 @@ v = sensors.color3.light(LightIntensityMode.Reflected)
min = v
max = v
setpoint = v
while (!(brick.buttonEnter.wasPressed())) {
while (!(brick.buttonEnter.isPressed())) {
brick.clearScreen()
brick.showString("Move robot on terrain", 1)
brick.showString("Press ENTER when done", 2)
@ -26,9 +26,9 @@ while (!(brick.buttonEnter.wasPressed())) {
brick.showValue("min", min, 4)
brick.showValue("max", v, 5)
brick.showValue("setpoint", setpoint, 6)
loops.pause(100)
pause(100)
}
loops.forever(function () {
forever(function () {
brick.clearScreen()
v = sensors.color3.light(LightIntensityMode.Reflected)
brick.showValue("light", v, 1)
@ -43,8 +43,8 @@ loops.forever(function () {
motors.largeBC.steer(P + (I + D), 100)
lasterror = error
if (brick.buttonEnter.wasPressed()) {
motors.largeBC.setSpeed(0)
brick.buttonDown.pauseUntil(ButtonEvent.Click)
motors.largeBC.run(0)
brick.buttonDown.pauseUntil(ButtonEvent.Bumped)
}
})
```

18
docs/extensions.md Normal file
View File

@ -0,0 +1,18 @@
# Extensions
## #gallery
## Using Extensions
In the web editor, click on ``Settings`` then ``Extensions`` to search and add extensions to the project.
The Blocks and JavaScript definitions will be automatically loaded in the editor.
## Custom extensions
The [Build Your Own Extension](https://makecode.com/extensions/getting-started) manual is for advanced users who want to publish their own extension.
## ~ hint
**Extensions** were previously called **Packages** in MakeCode.
## ~

BIN
docs/file-manager.pdf Normal file

Binary file not shown.

134
docs/fll.md Normal file
View File

@ -0,0 +1,134 @@
# MakeCode for _FIRST_ LEGO League
![FIRST LEGO League logo](/static/fll/fll-logo.png)
**For teams participating in City Shaper challenge**, you can use MakeCode for your challenge (see [City Shaper Challenge, page 7 bottom](https://firstinspiresst01.blob.core.windows.net/fll/2020/city-shaper-game-guide-pdf.pdf)!
Weve compiled a list of resources and information that we hope will be helpful for you.
* **Got a question? Post it on the forums** at https://forum.makecode.com/
## FAQ
### I found a bug what do I do?
If you found a bug, please try if it hasn't been fixed yet! Go to https://makecode.mindstorms.com/beta and try if the bug is corrected. Otherwise, please tell us at https://forum.makecode.com/.
### How do I use MakeCode with my EV3?
* You will need to install the latest EV3 firmware on your brick. Instructions on how to do that are located here: https://makecode.mindstorms.com/troubleshoot.
* You will need a computer with a USB port to connect to the EV3 in order to download your programs.
* You will need internet access and a browser on your computer to get to https://makecode.mindstorms.com.
* You can [install the app](/offline-app) to use the editor offline.
### I know LabView, how is MakeCode different?
We have compiled a guide for EV3 LabView users at https://makecode.mindstorms.com/labview.
### Whats the best way to get started with MakeCode?
Go to https://makecode.mindstorms.com. The home screen is filled with videos, tutorials and examples that might be relevant for your missions.
On the home page, scroll down to the **FLL / City Shaper** section for specific lessons related to Mission 2.
### Can I load both LEGO MINDSTORMS EV3 Software and MakeCode programs onto my EV3?
Yes.
### Can I run the program again on the brick?
![EV3 Brick with Try in BrkProg_Save Folder in File Manager](/static/getting-started/try-in-file-manager.png)
Use the Brick Buttons and navigate to the File Manager tab. Open the **BrkProg_SAVE** folder,
select your program and click the center button to run it again.
### Does it work without internet?
No, the editor is cached in your browser cache. However, you can also download the [offline app](/offline-app) in case you need to install it on a computer.
### How do I figure out what a block does?
You can right-click on any block and select “Help” in the context menu to open the documentation page describing what that block does.
![Select help in context menu for block](/static/fll/context-help.jpg)
### How do I program in JavaScript?
Click the **JavaScript** button at the top of the page to get to the JavaScript editor. Students can drag and drop code snippets from the Toolbox on the left, or type directly in the editor. You can switch back and forth between **Blocks** and **JavaScript** as you program.
![Coding in JavaScript](/static/fll/code-js.gif)
Also, watch the [Text-based Coding](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=3513a83b87fe536b2dc512237465fd1b&source=embed&photo%5fid=35719471) video for more about coding using the JavaScript editor.
### How do I use the Simulator?
The Simulator will show the physical representation of your code blocks. For example, based on this code snippet, the Simulator will show the touch sensor on Port 1, and a large motor on Port D.
```blocks
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
motors.largeD.run(50)
})
```
![Simulator demonstration](/static/fll/simulator.gif)
Note that the Simulator is also interactive, so you can simulate inputs with any of the sensors.
See the video [Block-based Coding and Simulation](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=629730c938e452f0fd7653fbc4708166&source=embed&photo%5fid=35719470) for more about using the simulator.
### How do I save my programs?
MakeCode will automatically save your recent projects in the browser. However, you can also save a copy of your project as a file on your computer:
* From the **Settings** menu, select **Save Project**
* This will download your program from the browser as a _lego-myproject.uf2_ file
![Save project menu selection](/static/fll/save-project.jpg)
* You can import your saved projects by clicking the Import button on the Home Page
![Import button on home screen](/static/fll/import-button.jpg)
### How do I share my programs?
You can share your projects by clicking on the **share** button in the top left of the screen. This will create a URL which you can send others to open and view your project.
![Share button in editor](/static/fll/share-button.jpg)
![Share button and dialogs demo](/static/fll/share-program.gif)
Sharing programs is also shown in the [Tips and Tricks](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=5c594c2373367f7870196f519f3bfc7a&source=embed&photo%5fid=35719472) video.
### Can I use Bluetooth to transfer my program?
The official answer is currently no. That being said, we have **Experimental support** for Bluetooth download. Please read the [Bluetooth](/bluetooth) page for more information.
https://youtu.be/VIq8-6Egtqs
## Are there YouTube videos on MakeCode for EV3?
The MakeCode has a [FLL / City Shaper YouTube Channel](https://www.youtube.com/watch?v=IqL0Pyeu5Ng&list=PLMMBk9hE-SeqkOObethhlZtBTEK6FYx3n) with useful videos.
https://youtu.be/-AirqwC9DL4
## Do you have examples of program used in competitions?
The MakeCode team ran a team with friends and family in South Seattle and scored 175 points.
The programs used for the crane, swing, red blocks and ramp are at https://github.com/lego-marshmallows (the robot build is not detailled).
### Why can't I delete my program (*.uf2) files from the Brick?
There's a bug in the firmware which prevents you from deleting the programs (``*.uf2`` files) from your EV3 Brick. There isn't a firmware update to fix this yet.
We have prepared a special program that lets you delete UF2 files from the brick.
Download [these PDF instructions](/file-manager.pdf) and drop the PDF on the brick drive.
This will present you with an menu for deleting files.
For other common questions, try the FAQ page https://makecode.mindstorms.com/faq.
## Workarounds
1. Deleting Programs from the EV3 brick
>* Description: Unable to delete program files from the EV3 brick after downloading them
>* Status: LEGO Education team is working on a fix, no estimated date yet

36
docs/getting-started.md Normal file
View File

@ -0,0 +1,36 @@
# Getting Started
## Projects
```codecard
[
{
"name": "Prepare",
"imageUrl": "/static/lessons/firmware.png",
"description": "To use Microsoft MakeCode with your EV3 Brick, you will need to install the latest LEGO® MINDSTORMS® Education EV3 firmware.",
"label": "New? Start Here!",
"labelClass": "red ribbon large",
"url": "https://makecode.mindstorms.com/troubleshoot"
},
{
"name": "Try",
"imageUrl": "/static/lessons/try.png",
"description": "Get a quick introduction to programming.",
"url": "/getting-started/try",
"cardType": "side"
},
{
"name": "Use",
"imageUrl": "/static/lessons/use.png",
"description": "Build a robot and drive into the world of robotics!",
"url": "/getting-started/use",
"cardType": "side"
},
{
"name": "First LEGO League",
"imageUrl": "/static/fll/fll-big.png",
"description": "Information about using MakeCode in FLL competitions",
"url": "/fll"
}
]
```

View File

@ -0,0 +1,200 @@
# Try
## Introduction @unplugged
Get a quick introduction to programming with EV3.
![Display on EV3 Brick with Music Notes](/static/getting-started/01_EyesOn_Intro.png)
We are excited to help you get started with @boardname@. In this project we will guide you through connecting your EV3 Brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
## Turn on your EV3 Brick @unplugged
Power on your EV3 Brick by pressing the Center Button.
![Hand pressing power button](/static/getting-started/02_PowerOn.png)
## Connect Your EV3 Brick to Your Device @unplugged
Use the USB cable to connect your EV3 Brick to your device.
![Computer and cable connected to EV3 Brick](/static/getting-started/03_insert-usb-02.png)
## Handle a button press @fullscreen
Drag out a ``||brick:on button||`` block from Buttons section in the ``||brick:Brick||`` Toolbox drawer.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
## Change of mood @fullscreen
Drag a Brick Screen ``||brick:show mood||`` block inside the ``||brick:on button||`` block.
Change mood to ``neutral``.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
brick.showMood(moods.neutral)
})
```
## Simulate @fullscreen
**Try out your code in the simulator!**
Click the center button on the EV3 Brick in the web page. It should display the mood you selected on the screen. Don't hesitate to use the simulator to try out your code during this tutorial!
![EV3 Brick simulator](/static/getting-started/simulate.png)
## Play some tunes @fullscreen
Drag a Music ``||music:play sound effect||`` block below the ``||brick:show mood||`` block.
Change sound effect to ``communication hello``.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
brick.showMood(moods.neutral)
music.playSoundEffect(sounds.communicationHello)
})
```
## Download to your brick @unplugged
**Download:** 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.
### Did It Work?
Verify that the program you just created shows eyes on the Brick Display, and that the EV3 Brick played the sound “Hello!”
![EV3 Brick with eyes on the display](/static/getting-started/05_EyesOn.png)
**Well done!**
## Run it Again
![EV3 Brick with Try in BrkProg_Save Folder in File Manager](/static/getting-started/try-in-file-manager.png)
Use the Brick Buttons and navigate to the File Manager tab. Open the **BrkProg_SAVE** folder, select **Try** and click the center button to run it again.
## Connect a Large Motor @unplugged
Now you will learn to control the Large Motor.
![EV3 Brick with hands connecting Large Motor to Port D](/static/getting-started/06_PlugInLargeMotor.png)
Connect a Large Motor to **Port D** of your EV3 Brick using any of the connector cables.
## Run a motor @fullscreen
Drag a ``||motors:run large A motor||`` block inside the ``||brick:on button||`` block.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeA.run(50)
})
```
## Tune your motor @fullscreen
Change ``large motor A`` to ``large motor D``.
Click on the **(+)** sign and change to ``1`` rotation.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
## Download @unplugged
**Download:** 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.
### Did It Rotate?
Confirm that your motor has turned one rotation at power level 50 before stopping.
Download and run the program as many times as you want in order to verify this, or tinker with different power levels and different rotations.
![Large Motor D w/Rotating “WHRRR,” Hand, EV3 Brick](/static/getting-started/08_WorkingLargeMotor.png)
## Connect a Touch Sensor @unplugged
We will now control the Large Motor using a Touch Sensor.
Keeping the Large Motor connected to **Port D**, connect a Touch Sensor to **Port 1** of your EV3 Brick.
![Hands connecting Touch Sensor to Port 1 on EV3 Brick](/static/getting-started/09_Connect_Touch.png)
## Modify Your Program @fullscreen
* Add a ``||sensors:pause until touch 1 pressed||`` Sensor block on top of the ``||motors:run large motor D||`` block.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
## Download @unplugged
**Download:** 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.
### Press the Touch Sensor
Confirm that the Large Motor has turned one rotation AFTER you press the Touch Sensor.
Download and run the program as many times as you want in order to verify this, or tinker with different Touch Sensor and Large Motor values.
![Hand Touch Sensor Pressed & EV3 Brick & Large Motor](/static/getting-started/11_TouchMotorWorking.png)
## Connect a Color Sensor @unplugged
Now we will try to control the Large Motor using another sensor.
![Hand connecting Color Sensor to Port 4, Large Motor D, EV3 Brick](/static/getting-started/12_ConnectColor.png)
Keeping the Large Motor connected to **Port D**, connect the Color Sensor to **Port 4**.
## Update your code @fullscreen
Using the same program, replace the ``||sensors:pause until touch 1||`` block with a ``||sensors:pause color sensor 3||`` for color block.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Green)
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
Don't forget to select the color you want to detect (e.g., green)!
## Download @unplugged
**Download:** 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.
### Place a Colored Brick in Front of the Color Sensor
Confirm that the Large Motor has turned one rotation AFTER the Color Sensor has detected the colored brick.
Download and run the program as many times as you want in order to verify this, or tinker with different Color Sensor and Large Motor values.
![IMG: Colored bricks in front of Color Sensor, hands, EV3 Brick](/static/getting-started/14_ColorSensorWorking.png)
## JavaScript @fullscreen
Click on the **JavaScript** tab and change the color the Color Sensor detects to Black, Blue, Green, Yellow, Red, White, or Brown. Use Title Case for the color names.
```typescript
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Blue)
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
## Well Done! @unplugged
You have now learned how to control some of the inputs and outputs of the EV3.

171
docs/getting-started/try.md Normal file
View File

@ -0,0 +1,171 @@
# Try
Get a quick introduction to programming with EV3.
![Display on EV3 Brick with Music Notes](/static/getting-started/01_EyesOn_Intro.png)
We are excited to help you get started with @boardname@. In this project we will guide you through connecting your EV3 Brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
## Turn on your EV3 Brick
Power on your EV3 Brick by pressing the Center Button.
![Hand pressing power button](/static/getting-started/02_PowerOn.png)
## Connect Your EV3 Brick to Your Device
Use the USB cable to connect your EV3 Brick to your device.
![Computer and cable connected to EV3 Brick](/static/getting-started/03_insert-usb-02.png)
## Create and Run your First Program
**Code it:** Create the program shown here.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
brick.showMood(moods.neutral)
music.playSoundEffect(sounds.communicationHello)
})
```
* Drag out a ``||brick:on button||`` block from Buttons section in the ``||brick:Brick||`` Toolbox drawer.
* Drag a Brick Screen ``||brick:show mood||`` block inside the ``||brick:on button||`` block.
* Change mood to ``neutral``.
```block
brick.showMood(moods.neutral)
```
* Drag a Music ``||music:play sound effect||`` block below the ``||brick:show mood||`` block.
* Change sound effect to ``communication hello``.
```block
music.playSoundEffect(sounds.communicationHello)
```
**Download:** 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.
## Did It Work?
![EV3 Brick with eyes on the display](/static/getting-started/05_EyesOn.png)
Verify that the program you just created shows eyes on the Brick Display, and that the EV3 Brick played the sound “Hello!”
**Well done!**
## Run it Again
![EV3 Brick with Try in BrkProg_Save Folder in File Manager](/static/getting-started/try-in-file-manager.png)
Use the Brick Buttons and navigate to the File Manager tab. Open the **BrkProg_SAVE** folder, select **Try** and click the center button to run it again.
## Connect a Large Motor
Now you will learn to control the Large Motor.
![EV3 Brick with hands connecting Large Motor to Port D](/static/getting-started/06_PlugInLargeMotor.png)
Connect a Large Motor to **Port D** of your EV3 Brick using any of the connector cables.
## Create and Run This Program
**Code it:** Create the program shown here.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
* Start a new program.
* Drag a ``||motors:run large A motor||`` block inside the ``||brick:on button||`` block.
* Change ``large motor A`` to ``large motor D``.
* Click on the **(+)** sign.
* Change to ``1`` rotation.
**Download:** 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.
## Did It Rotate?
Confirm that your motor has turned one rotation at power level 50 before stopping.
![Large Motor D w/Rotating “WHRRR,” Hand, EV3 Brick](/static/getting-started/08_WorkingLargeMotor.png)
Download and run the program as many times as you want in order to verify this, or tinker with different power levels and different rotations.
## Connect a Touch Sensor
We will now control the Large Motor using a Touch Sensor.
![Hands connecting Touch Sensor to Port 1 on EV3 Brick](/static/getting-started/09_Connect_Touch.png)
Keeping the Large Motor connected to **Port D**, connect a Touch Sensor to **Port 1** of your EV3 Brick.
## Modify Your Program
**Code it:** Add code to the program for the Touch Sensor.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
* Add a ``||sensors:pause until touch 1 pressed||`` Sensor block on top of the ``||motors:run large motor D||`` block.
```block
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
```
**Download:** 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.
## Press the Touch Sensor
Confirm that the Large Motor has turned one rotation AFTER you press the Touch Sensor.
![Hand Touch Sensor Pressed & EV3 Brick & Large Motor](/static/getting-started/11_TouchMotorWorking.png)
Download and run the program as many times as you want in order to verify this, or tinker with different Touch Sensor and Large Motor values.
## Connect a Color Sensor
Now we will try to control the Large Motor using another sensor.
![Hand connecting Color Sensor to Port 4, Large Motor D, EV3 Brick](/static/getting-started/12_ConnectColor.png)
Keeping the Large Motor connected to **Port D**, connect the Color Sensor to **Port 4**.
**Code it:** Modify Your Program to use the Color Sensor.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
sensors.color4.pauseUntilColorDetected(ColorSensorColor.Green)
motors.largeD.run(50, 1, MoveUnit.Rotations)
})
```
* Using the same program, replace the ``||sensors:pause until touch 1||`` block with a ``||sensors:pause color sensor 4||`` for color block.
```block
sensors.color4.pauseUntilColorDetected(ColorSensorColor.Green)
```
* Select the color you want to detect (e.g., green).
**Download:** 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.
## Place a Colored Brick in Front of the Color Sensor
![IMG: Colored bricks in front of Color Sensor, hands, EV3 Brick](/static/getting-started/14_ColorSensorWorking.png)
Confirm that the Large Motor has turned one rotation AFTER the Color Sensor has detected the colored brick.
Download and run the program as many times as you want in order to verify this, or tinker with different Color Sensor and Large Motor values.
Click on the **JavaScript** tab and change the color the Color Sensor detects to Black, Blue, Green, Yellow, Red, White, or Brown. Use Title Case for the color names.
## Well Done!
You have now learned how to control some of the inputs and outputs of the EV3.

121
docs/getting-started/use.md Normal file
View File

@ -0,0 +1,121 @@
# Use
Build a robot and drive into the world of robotics!
![EV3 Driving Base full w/cuboid](/static/getting-started/EV3_GettingStarted_13.jpg)
In this project we will guide you through building a Driving Base Robot and programming it to move straight and turn. You will also build and Object Detector Module, and program it to detect an object. Its a good idea to have done the [Try](/getting-started/try) sequence first.
## Connect
What if your school had a multipurpose robot? How would you use it?
![Apple Picker Robot](/static/getting-started/02_ApplePickerRobot.jpg)
Would you use it to clean the school or plant trees?
## Build Your Driving Base Robot
Build the robot driving base:
[![EV3 Driving Base](/static/lessons/common/ev3-driving-base.jpg)](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.
Start by building this program:
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.steer(0, 50, 1, MoveUnit.Rotations)
})
```
* Drag a ``||motors:steer large motors B+C||`` block inside an ``||brick:on button||`` block.
* Click on the **(+)** sign.
* Change to ``1`` rotation.
### ~hint
**Hint:** You will have to modify the number of rotations until you find the number that matches the robot moving forward 1 meter and stopping.
### ~
**Download:** 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.
## Make It Turn
**Code it:** Create a new program that turns the Driving Base 180 degrees.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.steer(-50, 50, 1, MoveUnit.Rotations)
})
```
### ~hint
**Hint:** You will have to modify the turn ratio and the number of rotations until the robot reaches 180 degrees.
### ~
**Download:** 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.
## Add an Ultrasonic Sensor to Your Driving Base
Build and attach an Ultrasonic Sensor to your driving base:
[![EV3 Ultrasonic Sensor Driving Base Building Instructions Main Image](/static/lessons/common/ev3-ultrasonic-sensor-driving-base.jpg)](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.
Create a new program:
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.tank(50, 50)
sensors.ultrasonic4.setThreshold(UltrasonicSensorEvent.ObjectDetected, 6)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected);
motors.stopAll()
})
```
* Drag a ``||motors:tank large motors B+C||`` motor block inside the ``||brick:on button||`` block.
* Drag the Ultrasonic Sensor threshold ``||sensors:set ultrasonic 4||`` block and place it below the motor block.
* Drag a ``|sensors:pause until ultrasonic 4||`` block and place it under the threshold block.
* Drag a ``||motors:stop all motors||`` block and place it below the sensor block.
### ~hint
**Hint:** You will have to modify the values of the Ultrasonic Sensor block until the robot reaches the desired position.
### ~
**Download:** 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.
Click on the **JavaScript** tab. Change and test the number value of the Ultrasonic
Sensor.
```typescript
sensors.ultrasonic4.setThreshold(UltrasonicSensorEvent.ObjectDetected, 10)
```
**Congratulations!**
You are ready to move on to the next steps.
Try a [Design Engineering](/design-engineering), [Coding](/coding), or [Maker](/maker) activity.

View File

@ -1,3 +1,3 @@
{
"appref": "v"
"appref": "v1.2.31"
}

254
docs/labview.md Normal file
View File

@ -0,0 +1,254 @@
# Coding in MakeCode
This guide helps users who are used to working with @boardname@ become familiar with using blocks in MakeCode.
## Snap together the blocks
Just like in LabView, blocks in the MakeCode editor can be dragged from the cabinet and snapped together
to create a sequence of program instructions.
Take a look a the LabView program below: it **starts**, turns on motor A, waits a second, and finally stops motor A.
![sequence of block](/static/labview/sequencing.png)
The blocks in MakeCode have similar functions and go together in the same way: they snap into the ``||loops:on start||`` block and then connect to each other vertically.
```blocks
motors.largeA.run(50)
pause(1000)
motors.largeA.stop()
```
Any block program can be converted to JavaScript and you can edit it as lines of code too.
```typescript
motors.largeA.run(50)
pause(1000)
motors.largeA.stop()
```
## Download to the EV3
Before you actually run your program on the EV3 Brick, you can first try it in the simulator. The MakeCode editor includes a simulator in the browser for you to test your code. You can make changes to your program and check them out it the simulator to make sure your code works the way want. The similator knows when you modify your code and it restarts automatically to run the new code.
Once you're ready to transfer your program to the EV3 Brick, click the ``|Download|`` button and follow the instructions.
## Single motors
This program controls a large motor on port A in several different ways. It sets just the speed and then sets speed for: an amount of time, angle of movement, and a number of rotations.
![Single motor blocks](/static/labview/motors.png)
```blocks
motors.largeA.run(50);
motors.largeA.run(50, 1000, MoveUnit.MilliSeconds);
motors.largeA.run(50, 360, MoveUnit.Degrees);
motors.largeA.run(50, 1, MoveUnit.Rotations);
motors.largeA.stop();
```
## Steering
The **steering** blocks let you to synchronize two motors at a precise rate. They can also specify the duration, angle, or number of rotations for the motors to turn.
![Steering blocks](/static/labview/steer.png)
```blocks
motors.largeBC.steer(0, 50);
motors.largeBC.steer(0, 50, 1000, MoveUnit.MilliSeconds);
motors.largeBC.steer(0, 50, 360, MoveUnit.Degrees);
motors.largeBC.steer(0, 50, 1, MoveUnit.Rotations);
motors.largeBC.stop();
```
### ~ hint
The **turn ratio range is -200, 200** unlike LabView who used -100,100.
### ~
## Tank
The **tank** blocks control the speed of two motors. These are commonly used for a differential drive robot. The blocks can also specify the duration, angle, or number of rotations.
![Tank block](/static/labview/tank.png)
```blocks
motors.largeBC.tank(50, 50);
motors.largeBC.tank(50, 50, 1000, MoveUnit.MilliSeconds);
motors.largeBC.tank(50, 50, 360, MoveUnit.Degrees);
motors.largeBC.tank(50, 50, 1, MoveUnit.Rotations);
motors.largeBC.stop();
```
## Coasting and braking
By default, all motors coast when any command used to move finishes. You can keep them from coasting with the ``||motors:set brake||`` block.
![Brake block](/static/labview/brake.png)
```blocks
motors.largeD.setBrake(true);
motors.largeD.run(50, 1, MoveUnit.Rotations)
```
## Inverting and regulating motors
If you wan to change the direction that a motor turns, use the ``||motors:set inverted||`` block.
![Brake block](/static/labview/invertmotor.png)
```blocks
motors.largeA.setInverted(true);
```
By default, the speed of motors is regulated. This means that if your robot goes up a hill,
the regulator will adjust the power to match the desired speed. You can disable this feature
using ``||motors:set regulated||``.
![Brake block](/static/labview/unregulatedmotor.png)
```blocks
motors.largeA.setRegulated(false);
```
## Brick
The **Brick** category has a number of blocks to display graphics on the brick screen.
![brick image](/static/labview/brickimage.png)
```blocks
brick.clearScreen()
brick.showImage(images.expressionsWink)
```
![brick status light](/static/labview/brickstatuslight.png)
```blocks
brick.setStatusLight(StatusLight.Off);
brick.setStatusLight(StatusLight.Red);
brick.setStatusLight(StatusLight.OrangePulse);
```
## Waiting (pausing)
It is quite common to have to wait for a task to finish or for a sensor state to change, such as when a touch button pressed. The ``||loops:pause||`` and ``||sensors:pause until||`` blocks provide a way for your program to wait for a period of time.
![pause for time](/static/labview/pausefortime.png)
```blocks
motors.largeD.run(50)
pause(1000)
motors.largeD.stop();
```
![pause for touch](/static/labview/pausefortouch.png)
```blocks
motors.largeD.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
motors.largeD.stop();
```
![pause for distance](/static/labview/pausefordistance.png)
```blocks
motors.largeD.run(50)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear)
motors.largeD.stop();
```
You can also use the ``||loops:pause until||`` block to wait on any [boolean](/types/boolean) expression. As your program runs, it waits until the condition (expression) inside becomes true.
```blocks
motors.largeD.run(50)
pauseUntil(() => sensors.touch1.isPressed())
motors.largeD.stop()
```
## Loops
![Single loop](/static/labview/loopinfinite.png)
```blocks
forever(() => {
motors.largeD.run(50, 1, MoveUnit.Rotations);
motors.largeD.run(-50, 1, MoveUnit.Rotations);
})
```
![While loop](/static/labview/while.png)
```blocks
for(let i = 0; i < 10; i++) {
motors.largeD.run(50, 1, MoveUnit.Rotations);
motors.largeD.run(-50, 1, MoveUnit.Rotations);
}
let k = 0;
while(k < 10) {
motors.largeD.run(50, 1, MoveUnit.Rotations);
motors.largeD.run(-50, 1, MoveUnit.Rotations);
k++;
}
```
## Variables
![Variable block](/static/labview/speedoflightvar.png)
```blocks
let light = 0;
forever(function () {
light = sensors.color3.light(LightIntensityMode.Reflected);
motors.largeD.run(light)
})
```
## Concurrent loops
You can start up multiple ``||loops:forever||`` loops that run at the same time. Actually, only the code in just one of the loops is really running at any exact moment in time. Each loop, though, gets a turn to run all of its code and this makes them run [_concurrently_](https://en.wikipedia.org/wiki/Concurrent_computing).
![Multiple loops running at the same time](/static/labview/multipleloops.png)
```blocks
forever(() => {
motors.largeD.run(50, 1, MoveUnit.Rotations);
motors.largeD.run(-50, 1, MoveUnit.Rotations);
})
forever(() => {
brick.showImage(images.eyesMiddleRight)
pause(1000)
brick.showImage(images.eyesMiddleLeft)
pause(1000)
})
```
## Conditional
The ``||logic:if||`` block allows you to run different code depending on whether some condition ([boolean](/types/boolean) expression) is `true` or `false`. Also, this is similar to the ``||loops:switch||`` block.
![Brake block](/static/labview/ife.png)
```blocks
forever(function() {
if(sensors.touch1.isPressed()) {
motors.largeD.run(50)
} else {
motors.largeD.stop()
}
})
```
## Random
The ``||math:pick random||`` block returns a random number selected from a range of numbers.
![Brake block](/static/labview/random.png)
```blocks
forever(function () {
motors.largeBC.steer(Math.randomRange(-5, 5), 50)
pause(100)
})
```

27
docs/lessons.md Normal file
View File

@ -0,0 +1,27 @@
# Lessons
Learning activities for @boardname@ with MakeCode.
## Motors and motion
```codecard
[{
"name": "Make it Move",
"imageUrl":"/static/lessons/make-it-move.jpg",
"url": "/lessons/make-it-move",
"cardType": "project",
"description": "Make a robot that moves itself without wheels."
}, {
"name": "Make it Move TUTORIAL",
"imageUrl":"/static/lessons/make-it-move.jpg",
"url": "/lessons/make-it-move-tutorial",
"cardType": "tutorial",
"description": "Make a robot that moves itself without wheels."
}, {
"name": "Line Detection",
"imageUrl":"/static/lessons/line-detection.jpg",
"url": "/lessons/line-detection",
"cardType": "project",
"description": "Make your robot drive itself by following lines."
}]
```

View File

@ -0,0 +1,274 @@
# Line Detection
## Objective
Design ways to improve driving safety by helping to prevent drivers from falling asleep and causing an accident.
![Car driving on highway](/static/lessons/line-detection/car-driving.jpg)
## Connect
Make sure that you can answer the following questions:
* Can autonomous cars react to different traffic light signals?
* What can happen if a driver falls asleep while driving?
* How can we detect when a driver is falling asleep?
Think about what you have learned, then document it. Describe the problem in your own words. Creatively record your ideas and findings.
## Construct
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.
### ~
![Color sensor on the driving base](/static/lessons/line-detection/color-sensor-driving.jpg)
## Program
Autonomous cars need to recognize and respond to traffic lights automatically.
First, create a program that will make your robot stop at red lights.
Make sure your robot is only responding to the color red.
Once you have succeeded, program your robot to drive forward again when the light changes from red to green.
There are two coding tasks for this lesson:
1. Create a program that will make your robot stop at red lights.
2. Create a program that drives the robot forward until the Color Sensor sees red. The robot then stops.
## Coding task 1 - Stop at red lights
**Goal:** Create a program that will make your robot stop at red lights.
### Step 1
Create a program that drives the robot forward until the Color Sensor sees red. The robot then stops.
Place a ``||motors:steer large B+C||`` block from ``||motors:Motors||`` under ``||loops:on start||``. Change the speed to 20%.
```blocks
motors.largeBC.steer(0, 20)
```
### Step 2
Place a ``||loops:while||`` loop block under ``||motors:steer large B+C||``.
```blocks
motors.largeBC.steer(0, 20)
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) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
}
```
### Step 4
Place a ``||motors:stop all motors||`` block under the ``||sensors:pause until color detected||`` block.
Study the program...what do you think the program will do?
**Hint:** The motors will run until the Color Sensor senses the color red, then all motors will stop. The motors will run until the sensor reading in the while block is true.
```blocks
motors.largeBC.steer(0, 20)
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
}
```
### Step 5
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.
## Coding task 2 - Detect light changes
**Goal:** Program your robot to drive forward again when the light changes from red to green.
### Step 1
Place a ``||loops:while||`` loop block under ``||loops:on start||``.
```blocks
while (true) {
}
```
### Step 2
Place a ``||motors:steer large B+C||`` block from ``||motors:Motors||`` inside the ``||loops:while||`` loop block. Change the speed to 20%.
```blocks
while (true) {
motors.largeBC.steer(0, 20)
}
```
### Step 4
Place a ``||loops:while||`` loop block under the ``||motors:steer large B+C||`` block.
```blocks
while (true) {
motors.largeBC.steer(0, 20)
while (true) {
}
}
```
### Step 5
Place a ``||sensors:pause until color detected||`` block from ``||sensors:Sensors||`` inside the ``||loops:while||`` loop block. Change the color to red.
```blocks
while (true) {
motors.largeBC.steer(0, 20)
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
}
}
```
### Step 6
Place a ``||motors:stop all motors||`` block under the ``||sensors:pause until color detected||`` block.
```blocks
while (true) {
motors.largeBC.steer(0, 20)
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
}
}
```
### Step 7
Place a ``||loops:while||`` loop block under the second ``||loops:while||`` loop block.
```blocks
while (true) {
motors.largeBC.steer(0, 20)
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
}
while (true) {
}
}
```
### Step 8
Place a ``||sensors:pause unril color detected||`` block inside the new ``||loops:while||`` loop block. Change the color to red.
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)
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
motors.stopAll()
}
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
}
}
```
### Step 9
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
To simulate what could happen if a driver falls asleep while driving, your robot could sound an alarm signal when it crosses the line. This feature is often available in new cars.
Program your robot to perform this function.
Think about what you have learned, then document it. Describe your pseudocode for this task. Creatively record your ideas, and findings.
### Programming hint
```blocks
motors.largeBC.steer(0, 20)
while (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Yellow)
music.playSoundEffect(sounds.systemGeneralAlert)
}
while (true) {
while (true) {
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
motors.largeB.run(10)
motors.largeC.run(-10)
}
while (true) {
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
motors.largeA.run(-10)
motors.largeA.run(10)
}
}
```
## Continue
Program your robot to drive on “autopilot” along a given route. You will need to create a program that recognizes and responds to a dark line (or white line). You will create a line-following program and your robot will need to travel along the line without losing contact with it.
You will need to constantly debug your program in order to make your robot travel as smoothly as possible along the line.
### Programming hint
```blocks
while (true) {
while (true) {
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
motors.largeB.run(10)
motors.largeC.run(-10)
}
while (true) {
sensors.color3.pauseUntilLightDetected(LightIntensityMode.Reflected, Light.Bright)
motors.largeB.run(-10)
motors.largeC.run(10)
}
}
```
## Share
Consider the following questions:
1. What challenged you?
2. Where there any surprises?
3. How could you improve your program?
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?
Think about what you have learned, then document it. Creatively record and present your ideas, creations, and findings.

View File

@ -0,0 +1,78 @@
# Make It Move Without Wheels
## Objective @unplugged
Design, build and program a robot that can move itself:
Your robot will:
* Go a distance of at least 30cm
* Use at least one motor
* Use NO wheels for locomotion
![@boardname@ with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
## Construct @unplugged
Build a Walker Bot!
The Walker Bot is one example of many possible solutions for making a robot move without wheels.
The Walker Bot combines an EV3 Frame and two legs that are mirror-images to create left and right legs.
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.
### ~
![@boardname@ Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
## Program 1 @fullscreen
In nature, creatures use many methods to get around. None of them, however, use wheels to move. Can we copy the method of animal locomotion with our robot? Using motors and legs, make the robot move without using any wheels.
Place a ``||motors:tank large B+C||`` block from ``||motors:Motors||`` under ``||loops:on start||``.
Change the speed to `-60%` (for motor B) and `+60%` (for motor C).
Change the rotations to `9`.
The ``||motors:tank large B+C||`` block will run for `9` rotations when the **center** button is pressed on the EV3 Brick. The motors are set for the reverse direction because they are mounted upside down in this model.
```blocks
motors.largeBC.tank(-60, 60, 9, MoveUnit.Rotations)
```
## Program 2 @fullscreen
Place a ``||motors:stop all motors||`` block under ``||motors:tank large B+C||``.
The ``||motors:tank large B+C||`` block will run for `9` rotations when the **center** button is pressed on the EV3 Brick then stop.
```blocks
motors.largeBC.tank(-60, 60, 9, MoveUnit.Rotations)
motors.stopAll()
```
## Program 3 @fullscreen
Place a ``||brick:show string||`` block under ``||motors:stop all motors||``.
Change the `"Hello World"` text to `"30 cm"`.
The ``||motors:tank large B+C||`` will run for `9` rotations when the **center** button is pressed on the EV3 Brick then stop and display "30 cm" on the EV3 Bricks screen.
```blocks
motors.largeBC.tank(-60, 60, 9, MoveUnit.Rotations)
motors.stopAll()
brick.showString("30 cm", 1)
```
## Download @fullscreen
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.

View File

@ -0,0 +1,79 @@
# Make It Move Without Wheels
## Objective
Design, build and program a robot that can move itself:
Your robot will:
* Go a distance of at least 30cm
* Use at least one motor
* Use NO wheels for locomotion
![@boardname@ with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
## Construct
Build a Walker Bot!
The Walker Bot is one example of many possible solutions for making a robot move without wheels.
The Walker Bot combines an EV3 Frame and two legs that are mirror-images to create left and right legs.
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.
### ~
![@boardname@ Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
## Program
In nature, creatures use many methods to get around. None of them, however, use wheels to move. Can we copy the method of animal locomotion with our robot? Using motors and legs, make the robot move without using any wheels.
### Step 1
Place a ``||motors:tank large B+C||`` block from ``||motors:Motors||`` under ``||loops:on start||``.
Change the speed to `-60%` (for motor B) and `+60%` (for motor C).
Change the rotations to `9`.
The ``||motors:tank large B+C||`` block will run for `9` rotations when the **center** button is pressed on the EV3 Brick. The motors are set for the reverse direction because they are mounted upside down in this model.
```blocks
motors.largeBC.tank(-60, 60, 9, MoveUnit.Rotations)
```
### Step 2
Place a ``||motors:stop all motors||`` block under ``||motors:tank large B+C||``.
The ``||motors:tank large B+C||`` block will run for `9` rotations when the **center** button is pressed on the EV3 Brick then stop.
```blocks
motors.largeBC.tank(-60, 60, 9, MoveUnit.Rotations)
motors.largeBC.stop()
```
### Step 3
Place a ``||brick:show string||`` block under ``||motors:stop all motors||``.
Change the `"Hello World"` text to `"30 cm"`.
The ``||motors:tank large B+C||`` will run for `9` rotations when the **center** button is pressed on the EV3 Brick then stop and display "30 cm" on the EV3 Bricks screen.
```blocks
motors.largeBC.tank(-60, 60, 9, MoveUnit.Rotations)
motors.largeBC.stop()
brick.showString("30 cm", 1)
```
### Step 4
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.

View File

@ -1,47 +1,24 @@
# Maker Activites
These six activities require the LEGO® MINDSTORMS® Education EV3 Core Set (45544). Supporting materials for teachers and middle school students are provided, offering everything teachers and students need to explore their inner makers as they follow the design process to solve open-ended, themed challenges...
* [Download Curriculum Materials](https://education.lego.com/en-us/downloads/mindstorms-ev3)
## Activites
```codecard
[
{
"name": "Sound Machine",
"description": "Create instruments with your EV3 Brick!",
"name": "Make A Sound Machine",
"description": "Make a Sound Machine that can play a rhythm, music or just noise!",
"url":"/maker/sound-machine",
"cardType": "example",
"imageUrl": "/static/maker/sound-machine.png"
"imageUrl": "/static/lessons/make-a-sound-machine.png",
"cardType": "side"
},
{
"name": "Sound Of Color",
"description": "Play different sounds based on the color",
"url":"/maker/sound-of-color",
"cardType": "example",
"imageUrl": "/static/maker/sound-of-color.png"
},
{
"name": "Security Gadget",
"description": "Raise the alarm when your brick is lifted!",
"name": "Make A Security Gadget",
"description": "Invent a Security Gadget that will protect your belongings by warning you!",
"url":"/maker/security-gadget",
"cardType": "example",
"imageUrl": "/static/maker/security-gadget.png"
},
{
"name": "Intruder Detector",
"description": "Raise the alarm when an intruder sneaks in",
"url":"/maker/intruder-detector",
"cardType": "example",
"imageUrl": "/static/maker/intruder-detector.png"
},
{
"name": "Puppet",
"description": "Build an automated puppet",
"url":"/maker/puppet",
"cardType": "example",
"imageUrl": "/static/maker/puppet.png"
"imageUrl": "/static/lessons/make-a-security-device.png",
"cardType": "side"
}
]
```

View File

@ -1,11 +0,0 @@
# Intruder Detector
This program will activate an alarm when an object moves in front of the Ultrasonic Sensor.
TODO support for event when value changes
```blocks
input.ultrasonic4.onObjectNear(function () {
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
})
```

View File

@ -0,0 +1,9 @@
# Movement Detector
This program will activate an alarm when an object moves in front of the Ultrasonic Sensor.
```blocks
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectNear, function () {
music.playSoundEffectUntilDone(sounds.informationActivate)
})
```

View File

@ -3,15 +3,13 @@
Use this program with the Programmable Brick and Large Motor.
```blocks
loops.forever(function () {
output.largeMotorA.setPower(30)
output.largeMotorA.on(true)
loops.pause(100)
output.largeMotorA.on(false)
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
output.largeMotorA.setPower(-30)
output.largeMotorA.on(true)
loops.pause(100)
output.largeMotorA.on(false)
forever(function () {
motors.largeA.run(30)
pause(100)
motors.largeA.stop()
music.playSoundEffectUntilDone(sounds.animalsCatPurr)
motors.largeA.run(-30)
pause(100)
motors.largeA.stop()
})
```

View File

@ -1,9 +1,139 @@
# Security Gadget
This program will activate an alarm when an object is lifted from the Touch Sensor.
# Make a Security Gadget
Invent a Security Gadget that will protect your belongings by warning you!
![Maker Make a Security Gadget Main Image](/static/lessons/make-a-security-gadget/lego-maker-security-detect.jpg)
## Connect
Over time, people have come up with many different ways to help protect their personal belongings from theft. These inventions include simple alarm systems and even traps!
![Make a Security Gadget 3 Stock Footage Images](/static/lessons/make-a-security-gadget/three-stock.jpg)
Look at the photos and think about:
* What do you see?
* Can you see any new design opportunities?
* What problems can you see?
* How could you make use of the LEGO bricks, the EV3 Programmable Brick, motors, and sensors?
### Things Youll Need
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
Additional materials to add to your Security Gadget:
* String
* Arts and crafts materials such as:
>* Cardboard
>* Construction paper
>* Pipe cleaners
>* Plastic or paper cups
>* Recycled materials
>* Rubber bands
>* Wire
### Prior Knowledge
This activity uses sensor inputs. You may want to try the [Use](/getting-started/use) or [Object Detection](/coding/object-detection) activity before this one. Or, you can start out with this activity and tinker with coding sensor inputs on your own.
## Contemplate
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
### Defining the Problem
1. What problems did you imagine?
2. Pick one problem and explain it to a partner.
### Brainstorm
Now that you have defined a problem, start to generate ideas for solving it.
### ~hint
Some things to do while brainstorming:
* Use the bricks from the LEGO set to help you brainstorm or sketch your ideas on paper.
* The goal of brainstorming is to explore as many solutions as possible. You can use the tinkering examples in the Sample Solutions section below as inspiration for getting started.
* Share your ideas and get some feedback. It may lead to more ideas!
### ~
### Define the Design Criteria
1. You should have generated a number of ideas. Now select the best one to make.
2. Write out two or three specific design criteria your design must meet.
### Go Make
It is time to start making!
* Use the components from the @boardname@ Core Set and additional materials to make your chosen solution.
* Test and analyze your design as you go and record any improvements that you make.
### Review and Revise Your Solution
* Have you managed to solve the problem that you defined?
* Look back at your design criteria. How well does your solution work?
* How can you improve your design?
### Communicate Your Solution
Now that you have finished you can:
* Make a sketch or take a photo or video of your model.
* Label the three most important parts and explain how they work.
* Share your work with others.
## Continue
### Phone Protector - Sample Solution
This example program combined with the small model will sound an alarm if someone picks it up. The program activates an alarm when an object is lifted from the Touch Sensor.
![Security Gadget Tinkering Example #1 Phone Stand](/static/lessons/make-a-security-gadget/lego-maker-security-gadget.jpg)
#### Programming
1. Drag a ``||sensors:pause until touch||`` block and place it inside the ``||loops:forever||`` loop.
2. Drag a ``||music:play sound effect||`` block and place it below the ``||sensors:pause until||`` block.
3. Change the sound effect to ``mechanical horn1``.
```blocks
input.touchSensor1.onEvent(TouchSensorEvent.Released, function () {
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
forever(function () {
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
music.playSoundEffect(sounds.mechanicalHorn1)
})
```
```
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.
### Object Detection - Sample Solution
This example program combined with the small model will sound an alarm if someone (or something) crosses its path! The program activates an alarm when an object moves in front of the Ultrasonic Sensor.
![Security Gadget Tinkering Example #1 Mouse detector](/static/lessons/make-a-security-gadget/lego-maker-security-detect.jpg)
#### Programming
1. Drag a ``||sensors:pause until ultrasonic||`` block and place it inside the ``||loops:forever||`` loop.
2. Drag a ``||music:play sound effect||`` block and place it below the ``||sensors:pause until||`` block.
3. Change the sound effect to ``mechanical horn1``.
```blocks
forever(function () {
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected)
music.playSoundEffect(sounds.mechanicalHorn1)
})
```
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.

View File

@ -1,12 +1,163 @@
# Sound Machine
# Make a Sound Machine
Make a Sound Machine that can play a rhythm, music or just noise!
![Maker Make a Sound Machine Main Image](/static/lessons/make-a-sound-machine/lego-maker-sound-machine-1.jpg)
## Connect
Music is made up of a combination of sounds, notes and rhythm. A rhythm is a regular movement or repeated pattern of movements that can be used in many different ways. In mechanical machines, a rhythm can help keep a machine running smoothly. It can also be used to generate different sounds in music.
![Sound Machine 3 Stock Footage Images](/static/lessons/make-a-sound-machine/three-stock.jpg)
Look at the photos and think about:
* What do you see?
* Can you see any new design opportunities?
* What problems can you see?
* How could you make use of the LEGO bricks, the EV3 Programmable Brick, motors, and sensors?
### Things Youll Need
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
Additional materials to add to your Sound Machine:
* Small musical instruments, such as chimes, bells, and small drums
* Arts and crafts materials such as:
>* Cardboard
>* Construction paper
>* Pipe cleaners
>* Plastic or paper cups
>* Recycled materials
>* Rubber bands
>* Wire
### Prior Knowledge
This activity uses motor rotations and sensor inputs. You may want to try the [Use](/getting-started/use) or [Object Detection](/coding/object-detection) activity before this one. Or, you can start out with this activity and tinker with coding motor and sensor inputs on your own.
## Contemplate
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
### Defining the Problem
1. What problems did you imagine?
2. Pick one problem and explain it to a partner.
### Brainstorm
Now that you have defined a problem, start to generate ideas for solving it.
### ~hint
Some things to do while brainstorming:
* Use the bricks from the LEGO set to help you brainstorm or sketch your ideas on paper.
* The goal of brainstorming is to explore as many solutions as possible. You can use the tinkering examples in the Sample Solutions section below as inspiration for getting started.
* Share your ideas and get some feedback. It may lead to more ideas!
### ~
### Define the Design Criteria
* You should have generated a number of ideas. Now select the best one to make.
* Write out two or three specific design criteria your design must meet.
### Go Make
It is time to start making!
* Use the components from the @boardname@ Core Set and additional materials to make your chosen solution.
* Test and analyze your design as you go and record any improvements that you make.
### Review and Revise Your Solution
* Have you managed to solve the problem that you defined?
* Look back at your design criteria. How well does your solution work?
* How can you improve your design?
### Communicate Your Solution
Now that you have finished you can:
* Make a sketch or take a photo or video of your model.
* Label the three most important parts and explain how they work.
* Share your work with others.
## Continue
### Rhythm Maker - Sample Solution
This example program combined with the small model will make a beat and rhythm on any surface when the program is run.
![Sound Machine Tinkering Example](/static/lessons/make-a-sound-machine/lego-maker-sound-machine.jpg)
#### Programming
1. Drag a run ``||motors:large motor A||`` block inside the ``||loops:forever||`` loop.
2. Press the **(+)**.
3. Change the rotations to `2`.
4. Drag a ``||loops:pause||`` block and place it under the motor block.
5. Change the duration to ``200`` ms.
6. Drag a ``||run large motor A||`` block inside the ``||loops:forever||`` loop.
7. Press the **(+)**.
8. Change the power to `100`.
9. Change the rotations to `1`.
```blocks
loops.forever(function () {
output.motorA.on(50)
loops.pause(200)
output.motorA.on(100)
loops.pause(200)
forever(function () {
motors.largeA.run(50, 2, MoveUnit.Rotations)
pause(200)
motors.largeA.run(100, 1, MoveUnit.Rotations)
})
```
```
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.
### Color Sensor Sounds - Sample Solution
You can also tinker with the use of sensors.
![Sound Machine Color Sensor](/static/lessons/make-a-sound-machine/lego-maker-sound-machine-color-sensor.jpg)
#### Programming
1. Drag an ``||logic:if else||`` Logic block and place it inside the ``||loops:forever||`` loop.
2. Drag a ``||sensors:pause color sensor||`` block and place it inside the ``||logic:if true then||`` block.
3. Change the color to ``blue``.
4. Drag a ``||music:play tone||`` block and place under the sensor block.
5. Change the tone to ``Middle G`` (392 Hz).
6. Drag a ``||sensors:pause color sensor||`` block and place it inside the ``||logic:else||`` block.
7. Change the color to ``red``.
8. Drag a ``||music:play tone||`` block and place under the new sensor block.
9. Change the tone to ``High C`` (523 Hz).
10. Press the **(+)**.
11. Drag a ``||sensors:pause color sensor||`` block and place it inside the ``||logic:else if||`` block.
12. Change the color to ``green``.
13. Drag a ``||music:play tone||`` block and place under the new sensor block.
14. Change the tone to ``High D`` (587 Hz).
```blocks
forever(function () {
if (true) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Blue)
music.playTone(392, music.beat(BeatFraction.Whole))
} else if (false) {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Red)
music.playTone(523, music.beat(BeatFraction.Half))
} else {
sensors.color3.pauseUntilColorDetected(ColorSensorColor.Green)
music.playTone(587, music.beat(BeatFraction.Half))
}
})
```
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.

View File

@ -3,13 +3,13 @@
This program will play different sounds when the wheel is rotated. The sound is determined by which color is placed in front of the color Sensor.
```blocks
input.color3.onColorDetected(ColorSensorColor.Blue, function () {
sensors.color3.onColorDetected(ColorSensorColor.Blue, function () {
music.playTone(Note.G4, music.beat(BeatFraction.Half))
})
input.color3.onColorDetected(ColorSensorColor.Red, function () {
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
music.playTone(Note.C5, music.beat(BeatFraction.Half))
})
input.color3.onColorDetected(ColorSensorColor.Green, function () {
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
music.playTone(Note.D5, music.beat(BeatFraction.Half))
})
```

791
docs/offline-app.html Normal file
View File

@ -0,0 +1,791 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta charset="UTF-8">
<title>LEGO® MINDSTORMS® Education EV3 Offline App</title>
<meta name="Description" content="A MakeCode for LEGO® MINDSTORMS® Education EV3 offline app" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- @include indexhead.html -->
<style>
p.item {
color: rgba(0, 0, 0, 0.4);
}
.topbar {
background: rgb(170, 39, 143) !important;
}
.ui.inverted.content {
/* background: #00a5c8; */
background: #2a7af3;
}
.content.segment {
min-height: 80%;
}
.content .welcomeheader {
font-weight: 300;
}
.footer.segment {
padding: 5em 0em;
}
.image.left {
padding-left: 2em;
}
.image.right {
padding-right: 2em;
float: right;
}
.segments {
max-width: 60%;
}
.segments.terms-container {
margin-top: 5em;
}
.terms-container .segment {
background-color: rgb(250, 250, 250);
}
@media only screen and (max-width: 800px) {
.grid .column .image {
display: none;
}
.segments {
max-width: 95%;
}
}
</style>
<!-- Auto-generated styles for the license terms -->
<style type="text/css">
.terms ol {
margin: 0;
padding: 0
}
.terms table td,
.terms table th {
padding: 0
}
.c2 {
margin-left: 22.5pt;
padding-top: 6pt;
text-indent: -18pt;
padding-bottom: 6pt;
line-height: 1.15;
orphans: 2;
widows: 2;
text-align: left
}
.c8 {
margin-left: 40.5pt;
padding-top: 6pt;
text-indent: -18pt;
padding-bottom: 6pt;
line-height: 1.15;
orphans: 2;
widows: 2;
text-align: left
}
.c15 {
padding-top: 0pt;
padding-bottom: 12pt;
line-height: 1.15;
orphans: 2;
widows: 2;
text-align: left;
height: 11pt
}
.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;
orphans: 2;
widows: 2;
text-align: left
}
.c10 {
margin-left: 40.5pt;
padding-top: 6pt;
padding-bottom: 6pt;
line-height: 1.15;
orphans: 2;
widows: 2;
text-align: left
}
.c6 {
margin-left: 40.5pt;
padding-top: 0pt;
padding-bottom: 0pt;
line-height: 1.15;
orphans: 2;
widows: 2;
text-align: left
}
.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: #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
}
.c9 {
color: inherit;
text-decoration: inherit
}
.c5 {
font-weight: 700
}
.c1 {
font-size: 10pt
}
.c19 {
font-size: 11pt
}
.terms .title {
padding-top: 0pt;
color: #000000;
font-size: 26pt;
padding-bottom: 3pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms .subtitle {
padding-top: 0pt;
color: #666666;
font-size: 15pt;
padding-bottom: 16pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms li {
color: #000000;
font-size: 11pt;
font-family: "Arial"
}
.terms p {
margin: 0;
color: #000000;
font-size: 11pt;
font-family: "Arial"
}
.terms h1 {
padding-top: 20pt;
color: #000000;
font-size: 20pt;
padding-bottom: 6pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms h2 {
padding-top: 18pt;
color: #000000;
font-size: 16pt;
padding-bottom: 6pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms h3 {
padding-top: 16pt;
color: #434343;
font-size: 14pt;
padding-bottom: 4pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms h4 {
padding-top: 14pt;
color: #666666;
font-size: 12pt;
padding-bottom: 4pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms h5 {
padding-top: 12pt;
color: #666666;
font-size: 11pt;
padding-bottom: 4pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
orphans: 2;
widows: 2;
text-align: left
}
.terms h6 {
padding-top: 12pt;
color: #666666;
font-size: 11pt;
padding-bottom: 4pt;
font-family: "Arial";
line-height: 1.15;
page-break-after: avoid;
font-style: italic;
orphans: 2;
widows: 2;
text-align: left
}
</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 downloadWin64() {
// TODO: Keep this link up-to-date with the desired release version
window.open("https://makecode.com/api/release/ev3/v1.2.26/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/v1.2.26/mac64");
tickEvent("offlineapp.download", { "target": "ev3", "platform": "mac64" });
}
</script>
</head>
<body id="root" class="root">
<div class="ui inverted vertical center aligned segment content">
<div class="ui grid topbar">
<div class="three wide column">
<img class="ui small image left" src="/static//lego_education_logo_white.png" />
</div>
<div class="ten wide column">
<h1 class="ui inverted welcomeheader">MakeCode Offline App</h1>
</div>
<div class="three wide column">
<img class="ui small image right" src="/static//Microsoft-logo_rgb_c-white.png" />
</div>
</div>
<div class="ui compact segments terms-container">
<div class="ui secondary center aligned segment">
Please read and accept the following terms to download the app.
</div>
<div class="ui left aligned segment terms">
<div class="c17">
<p class="c11">
<span class="c4 c1">MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS</span>
</p>
<p class="c11">
<span class="c4 c1">MICROSOFT MAKECODE FOR LEGO MINDSTORMS EDUCATION EV3</span>
</p>
<p class="c7">
<span class="c4 c1"></span>
</p>
<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="c7">
<span class="c3 c1"></span>
</p>
<p class="c11">
<span class="c4 c1">IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.</span>
</p>
<p class="c2">
<span class="c5 c1">1.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="c2">
<span class="c5 c1">2.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="c2">
<span class="c5 c1">3.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span class="c5 c1">ASSOCIATED ONLINE SERVICES.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Some features of the software provide access
to, or rely on, online services to provide you information about updates to the software or extensions,
or to enable you to retrieve content, collaborate with others, or otherwise supplement your development
experience. As used throughout these license terms, the term <q>software</q> includes these online
services and features. By using these online services and features you consent to the to the
transmission of information as described in Section 5, DATA.
</span>
</p>
<p class="c2">
<span class="c5 c1">4.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span class="c5 c1">LICENSES FOR OTHER COMPONENTS.</span>
<span class="c3 c1">&nbsp;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="c2">
<span class="c5 c1">5.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span class="c1 c4">DATA.</span>
</p>
<p class="c8">
<span class="c5 c1">a.</span>
<span class="c1">&nbsp; &nbsp;</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="c14 c1">
<a class="c9" href="http://go.microsoft.com/fwlink/?LinkId=398505">http://go.microsoft.com/fwlink/?LinkId=398505</a>
</span>
<span class="c1">.</span>
<span class="c3 c1">&nbsp;Your use of the software operates as your consent to these practices.</span>
</p>
<p class="c8">
<span class="c5 c1">b.</span>
<span class="c1">&nbsp; &nbsp;</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 </span>
<span class="c1 c14">
<a class="c9" href="http://go.microsoft.com/?linkid=9840733">http://go.microsoft.com/?linkid=9840733</a>
</span>
<span class="c3 c1">.</span>
</p>
<p class="c2">
<span class="c5 c1">6.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="c2">
<span class="c5 c1">7.</span>
<span class="c1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span class="c5 c1">SCOPE OF LICENSE.</span>
<span class="c3 c1">&nbsp;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. &nbsp;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="c8">
<span class="c3 c1">- &nbsp; &nbsp; work around any technical limitations in the software;</span>
</p>
<p class="c8">
<span class="c3 c1">- &nbsp; &nbsp; 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="c8">
<span class="c3 c1">- &nbsp; &nbsp; remove, minimize, block or modify any notices of Microsoft or its suppliers in the
software;
</span>
</p>
<p class="c8">
<span class="c3 c1">- &nbsp; &nbsp; use the software in any way that is against the law; or</span>
</p>
<p class="c8">
<span class="c3 c1">- &nbsp; &nbsp; share, publish, rent or lease the software, or provide the software as a stand-alone
offering for others to use.</span>
</p>
<p class="c2">
<span class="c5 c1">8. &nbsp; 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>
</p>
<p class="c2">
<span class="c5 c1">9.</span>
<span class="c1">&nbsp; &nbsp;</span>
<span class="c5 c1">EXPORT RESTRICTIONS.</span>
<span class="c3 c1">&nbsp;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="c2">
<span class="c5 c1">10.</span>
<span class="c1">&nbsp;</span>
<span class="c5 c1">SUPPORT SERVICES. </span>
<span class="c3 c1">Because the software is &ldquo;as is,&rdquo; we may not provide support services for it.</span>
</p>
<p class="c2">
<span class="c5 c1">11.</span>
<span class="c1">&nbsp;</span>
<span class="c5 c1">ENTIRE AGREEMENT.</span>
<span class="c3 c1">&nbsp;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="c2">
<span class="c5 c1">12.</span>
<span class="c1">&nbsp;</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="c2">
<span class="c5 c1">13.</span>
<span class="c1">&nbsp;</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="c8">
<span class="c5 c1">a.</span>
<span class="c1">&nbsp; &nbsp;</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="c8">
<span class="c5 c1">b.</span>
<span class="c1">&nbsp; &nbsp;</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="c8">
<span class="c5 c1">c.</span>
<span class="c1">&nbsp; &nbsp;</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">&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="c6">
<span class="c4 c1">&nbsp;</span>
</p>
<p class="c6">
<span class="c5 c1">(ii)</span>
<span class="c1">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="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 &quot;cardinal obligations&quot;).
In other cases of slight negligence, Microsoft will not be liable for slight negligence.</span>
</p>
<p class="c2">
<span class="c5 c1">14.</span>
<span class="c1">&nbsp;</span>
<span class="c5 c1">LEGAL EFFECT.</span>
<span class="c3 c1">&nbsp;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="c2">
<span class="c5 c1">15.</span>
<span class="c1">&nbsp;</span>
<span class="c4 c1">DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED &ldquo;AS-IS.&rdquo; &nbsp;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="c2">
<span class="c5 c1">16.</span>
<span class="c1">&nbsp;</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="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="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="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="c12">
<span class="c4 c1">Remarque : Ce logiciel &eacute;tant distribu&eacute; au Qu&eacute;bec, Canada, certaines des clauses
dans ce contrat sont fournies ci-dessous en fran&ccedil;ais.</span>
</p>
<p class="c11">
<span class="c5 c1">EXON&Eacute;RATION DE GARANTIE.</span>
<span class="c1 c3">&nbsp;Le logiciel vis&eacute; par une licence est offert &laquo; tel quel &raquo;. Toute utilisation
de ce logiciel est &agrave; votre seule risque et p&eacute;ril. Microsoft n&rsquo;accorde aucune
autre garantie expresse. Vous pouvez b&eacute;n&eacute;ficier de droits additionnels en vertu
du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles
sont permises par le droit locale, les garanties implicites de qualit&eacute; marchande, d&rsquo;ad&eacute;quation
&agrave; un usage particulier et d&rsquo;absence de contrefa&ccedil;on sont exclues.
</span>
</p>
<p class="c11">
<span class="c5 c1">LIMITATION DES DOMMAGES-INT&Eacute;R&Ecirc;TS ET EXCLUSION DE RESPONSABILIT&Eacute; POUR LES DOMMAGES.</span>
<span class="c3 c1">&nbsp;Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages
directs uniquement &agrave; hauteur de 5,00 $ US. Vous ne pouvez pr&eacute;tendre &agrave; aucune
indemnisation pour les autres dommages, y compris les dommages sp&eacute;ciaux, indirects ou
accessoires et pertes de b&eacute;n&eacute;fices.</span>
</p>
<p class="c12">
<span class="c3 c1">Cette limitation concerne :</span>
</p>
<p class="c2">
<span class="c3 c1">- &nbsp; &nbsp; &nbsp; &nbsp; tout ce qui est reli&eacute; 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="c2">
<span class="c3 c1">- &nbsp; &nbsp; &nbsp; &nbsp; les r&eacute;clamations au titre de violation de contrat ou de garantie,
ou au titre de responsabilit&eacute; stricte, de n&eacute;gligence ou d&rsquo;une autre faute
dans la limite autoris&eacute;e par la loi en vigueur.</span>
</p>
<p class="c12">
<span class="c3 c1">Elle s&rsquo;applique &eacute;galement, m&ecirc;me si Microsoft connaissait ou devrait conna&icirc;tre
l&rsquo;&eacute;ventualit&eacute; d&rsquo;un tel dommage. Si votre pays n&rsquo;autorise pas
l&rsquo;exclusion ou la limitation de responsabilit&eacute; pour les dommages indirects, accessoires
ou de quelque nature que ce soit, il se peut que la limitation ou l&rsquo;exclusion ci-dessus
ne s&rsquo;appliquera pas &agrave; votre &eacute;gard.</span>
</p>
<p class="c16">
<span class="c5 c1">EFFET JURIDIQUE.</span>
<span class="c3 c1">&nbsp;Le pr&eacute;sent contrat d&eacute;crit certains droits juridiques. Vous pourriez avoir d&rsquo;autres
droits pr&eacute;vus par les lois de votre pays. Le pr&eacute;sent contrat ne modifie pas les
droits que vous conf&egrave;rent les lois de votre pays si celles-ci ne le permettent pas.</span>
</p>
<p class="c15">
<span class="c3 c1"></span>
</p>
<p class="c16">
<span class="c3 c1">&nbsp;</span>
</p>
<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. &copy;2018 The LEGO Group. All rights reserved.</span>
</p>
<p class="c11">
<span class="c3 c1">&nbsp;</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 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">
<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>
</div>
<!-- @include footer.html -->
<!-- @include tracking.html -->
</body>
</html>

5
docs/offline.md Normal file
View File

@ -0,0 +1,5 @@
# @extends
## Offline app #target-app
The MakeCode editor is available as app which you can install on a computer with Windows or Mac OS. Once installed, the **[MakeCode Offline App](/offline-app)** lets you create, run, and download your projects to the @boardname@. It works the same as the Web application does in your browser but it's a stand-alone application that will work when a connection to the internet is restricted or not available.

3
docs/packages-ref.json Normal file
View File

@ -0,0 +1,3 @@
{
"redirect": "/extensions"
}

View File

@ -0,0 +1,3 @@
{
"redirect": "https://makecode.com/extensions/approval"
}

View File

@ -0,0 +1,3 @@
{
"redirect": "https://makecode.com/extensions/getting-started"
}

View File

@ -0,0 +1,3 @@
{
"redirect": "https://makecode.com/extensions/versioning"
}

View File

@ -1,9 +1,88 @@
# Projects
Here are some cool projects that you can build with your @boardname@!
```codecard
[
{
"name": "Getting Started",
"url": "/getting-started",
"imageUrl": "/static/lessons/firmware.png"
},
{
"name": "Brick Tutorials",
"url": "/tutorials/brick",
"imageUrl": "/static/tutorials/wake-up.png"
},
{
"name": "Motor Tutorials",
"url": "/tutorials/motors",
"imageUrl": "/static/tutorials/run-motors.png"
},
{
"name": "Touch Sensor Tutorials",
"url": "/tutorials/touch-sensor",
"imageUrl": "/static/tutorials/touch-to-run.png"
},
{
"name": "Color Sensor Tutorials",
"url": "/tutorials/color-sensor",
"imageUrl": "/static/tutorials/what-color.png"
},
{
"name": "Ultrasonic Sensor Tutorials",
"url": "/tutorials/ultrasonic-sensor",
"imageUrl": "/static/tutorials/object-near.png"
},
{
"name": "Gyro Tutorials",
"url": "/tutorials/gyro",
"imageUrl": "/static/tutorials/calibrate-gyro.png"
},
{
"name": "Infrared Sensor Tutorials",
"url": "/tutorials/infrared-sensor",
"imageUrl": "/static/tutorials/security-alert.png"
},
{
"name": "FLL / City Shaper",
"url": "/tutorials/city-shaper",
"imageUrl": "/static/tutorials/city-shaper/robot1.jpg"
},
{
"name": "Design Engineering",
"url": "/design-engineering",
"imageUrl": "/static/lessons/make-it-move-without-wheels.png"
},
{
"name": "Coding",
"url": "/coding",
"imageUrl": "/static/lessons/autonomous-parking.png"
},
{
"name": "Maker",
"url": "/maker",
"imageUrl": "/static/lessons/make-a-sound-machine.png"
},
{
"name": "Tutorial Videos",
"url": "/videos",
"imageUrl": "https://legoeducation.videomarketingplatform.co/27288170/35719444/5d009e5f93fbf479c2e5ed2bf87a7990/thumbnail.png"
}
]
```
## Basic
## See Also
Basic projects to build with your @boardname@.
[Getting Started](/getting-started),
[Brick Tutorials](/tutorials/brick),
[Motor Tutorials](/tutorials/motors),
[Touch Sensor Tutorials](/tutorials/touch-sensor),
[Color Sensor Tutorials](/tutorials/color-sensor),
[Ultrasonic Sensor Tutorials](/tutorials/ultrasonic-sensor),
[Gyro Tutorials](/tutorials/gyro),
[Infrared Sensor Tutorials](/tutorials/infrared-sensor),
[FLL / City Shaper](/tutorials/city-shaper),
[Design Engineering](/design-engineering),
[Coding](/coding),
[Maker](/maker),
[Tutorial Videos](/videos)
Coming soon.

69
docs/projects/SUMMARY.md Normal file
View File

@ -0,0 +1,69 @@
# Projects
* [Getting Started](/getting-started)
* [Prepare](https://makecode.mindstorms.com/troubleshoot)
* [Try](/getting-started/try)
* [Use](/getting-started/use)
* [First LEGO League](/fll)
* [Brick Tutorials](/tutorials/brick)
* [Wake Up!](/tutorials/wake-up)
* [Make an Animation](/tutorials/make-an-animation)
* [What Animal Am I?](/tutorials/what-animal-am-i)
* [Music Brick](/tutorials/music-brick)
* [Pause On Start](/tutorials/pause-on-start)
* [Motor Tutorials](/tutorials/motors)
* [Run Motors](/tutorials/run-motors)
* [Spin Turn](/tutorials/spin-turn)
* [Pivot Turn](/tutorials/pivot-turn)
* [Smooth Turn](/tutorials/smooth-turn)
* [Tank ZigZag](/tutorials/tank-zigzag)
* [Coast Or Brake](/tutorials/coast-or-brake)
* [Turtle](/tutorials/turtle)
* [Touch Sensor Tutorials](/tutorials/touch-sensor)
* [Touch to Run](/tutorials/touch-to-run)
* [Sensor Values](/tutorials/touch-sensor-values)
* [Stop At Object](/tutorials/stop-at-object)
* [Color Sensor Tutorials](/tutorials/color-sensor)
* [What Color?](/tutorials/what-color)
* [Line Following](/tutorials/line-following)
* [Red Light, Green Light](/tutorials/redlight-greenlight)
* [Move To Color](/tutorials/move-to-color)
* [Reflected Light Measure](/tutorials/reflected-light-measure)
* [Reflected Light Calibration](/tutorials/reflected-light-calibration)
* [Ultrasonic Sensor Tutorials](/tutorials/ultrasonic-sensor)
* [Object Near](/tutorials/object-near)
* [Wall Follower](/tutorials/wall-follower)
* [Gyro Tutorials](/tutorials/gyro)
* [Calibrate](/tutorials/calibrate-gyro)
* [Turn](/tutorials/turn-with-gyro)
* [Move Straight](/tutorials/move-straight-with-gyro)
* [Drifter](/tutorials/drifter)
* [Infrared Sensor Tutorials](/tutorials/infrared-sensor)
* [Security Alert](/tutorials/security-alert)
* [FLL / City Shaper](/tutorials/city-shaper)
* [Crane Mission / Robot 1](/tutorials/city-shaper/robot-1)
* [Crane Mission / Robot 2](/tutorials/city-shaper/robot-2)
* [Crane Mission / Video 1](https://youtu.be/IqL0Pyeu5Ng)
* [Bluetooth download (beta)](https://youtu.be/VIq8-6Egtqs)
* [Turn with Gyro](https://youtu.be/I7ncuXAfBwk)
* [Moving with Gyro](https://youtu.be/ufiOPvW37xc)
* [Line following with 1 color sensor](https://youtu.be/_LeduyKQVjg)
* [Proportional line following with 1 color sensor](https://youtu.be/-AirqwC9DL4)
* [Proportional line following with 2 color sensors](https://youtu.be/QWOflBuu9Oo)
* [Design Engineering](/design-engineering)
* [Make It Move Without Wheels](/design-engineering/make-it-move)
* [Make It Smarter and Faster](/design-engineering/make-it-smarter)
* [Make a System that Communicates](/design-engineering/make-it-communicate)
* [Coding](/coding)
* [Autonomous Parking](/coding/autonomous-parking)
* [Object Detection](/coding/object-detection)
* [Line Detection](/coding/line-detection)
* [Maker](/maker)
* [Make A Sound Machine](/maker/sound-machine)
* [Make A Security Gadget](/maker/security-gadget)
* [Tutorial Videos](/videos)
* [undefined](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=5d009e5f93fbf479c2e5ed2bf87a7990&source=embed&photo%5fid=35719444)
* [undefined](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=2008a566f1fb034d58d5ebe19ba8621f&source=embed&photo%5fid=35719467)
* [undefined](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=629730c938e452f0fd7653fbc4708166&source=embed&photo%5fid=35719470)
* [undefined](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=3513a83b87fe536b2dc512237465fd1b&source=embed&photo%5fid=35719471)
* [undefined](https://legoeducation.videomarketingplatform.co/v.ihtml/player.html?token=5c594c2373367f7870196f519f3bfc7a&source=embed&photo%5fid=35719472)

View File

@ -1,8 +1,24 @@
# Reference
```namespaces
music.playSoundEffect(sounds.animalsCatPurr);
sensors.color(null);
motors.stopAll();
brick.showMood(moods.sleeping);
```
## Advanced
```namespaces
console.log("");
control.runInParallel(function(){});
```
## See Also
[touch sensor](/reference/sensors/touch-sensor),
[color sensor](/reference/sensors/color-sensor)
[brick](/reference/brick),
[sensors](/reference/sensors),
[motors](/reference/motors),
[music](/reference/music),
[control](/reference/control),
[console](/reference/console)

31
docs/reference/brick.md Normal file
View File

@ -0,0 +1,31 @@
# Brick
## Screen
```cards
brick.showMood(moods.sleeping);
brick.showImage(images.expressionsBigSmile);
brick.showString("Hello world!", 1);
brick.showNumber(0, 1);
brick.showValue("item", 0, 1);
brick.clearScreen();
brick.showPorts();
```
## Buttons
```cards
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
});
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
brick.buttonEnter.isPressed()
brick.setStatusLight(StatusLight.Red);
brick.buttonEnter.wasPressed()
```
## Other
```cards
brick.batteryLevel()
```

View File

@ -0,0 +1,33 @@
# battery Level
Return the current battery level.
```sig
brick.batteryLevel();
```
## Returns
* a [number](/types/number) which is the current charge level of the brick's battery. This is a percentage of total charge left in the battery.
## Example
Show the battery level percentage on the screen. Also, show a green light if the battery level is above 15%. If the battery level is below 15% but above 5%, show a orange light. But, if the battery level is below 5%, show a pulsing red light.
```blocks
let battery = 0;
forever(function() {
brick.showString("Battery level:", 1)
brick.showNumber(battery, 2)
battery = brick.batteryLevel();
if (battery > 15)
{
brick.setStatusLight(StatusLight.Green);
} else if (battery > 5) {
brick.setStatusLight(StatusLight.Orange);
} else {
brick.setStatusLight(StatusLight.RedPulse)
}
pause(30000)
})
```

View File

@ -0,0 +1,47 @@
# battery Property
Return the information about the battery
```sig
brick.batteryInfo(BatteryProperty.Level)
```
## Parameters
* property: the kind of information
## Returns
* a [number](/types/number) which represents the value of the property requested.
## Example
Show the battery level percentage on the screen. Also, show a green light if the battery level is above 15%. If the battery level is below 15% but above 5%, show a orange light. But, if the battery level is below 5%, show a pulsing red light.
```blocks
let battery = 0;
forever(function() {
brick.showString("Battery level:", 1)
brick.showNumber(battery, 2)
battery = brick.batteryInfo(BatteryProperty.Level);
if (battery > 15)
{
brick.setStatusLight(StatusLight.Green);
} else if (battery > 5) {
brick.setStatusLight(StatusLight.Orange);
} else {
brick.setStatusLight(StatusLight.RedPulse)
}
pause(30000)
})
```
Or see all the values
```blocks
forever(function () {
brick.showValue("bat V", brick.batteryInfo(BatteryProperty.Voltage), 1)
brick.showValue("bat %", brick.batteryInfo(BatteryProperty.Level), 2)
brick.showValue("bat I", brick.batteryInfo(BatteryProperty.Current), 3)
})
```

View File

@ -0,0 +1,53 @@
# is Pressed
Check if a button is being pressed or not.
```sig
brick.buttonEnter.isPressed()
```
## ~hint
**Touch sensors**
Your @boardname@ has touch sensors that work like buttons. Instead of saying `enter` or `left` as the source button, use a touch sensor block with a sensor name like `touch 1`.
```block
if (sensors.touch1.isPressed()) {
console.log("Hey, I feel pressed.");
}
```
Read about [touch sensors](/reference/sensors/touch-sensor) and using them as touch buttons.
## ~
## Returns
* a [boolean](types/boolean): `true` if the button is pressed, `false` if the button is not pressed
## Example
Set the brick light to green when the `down` is pressed. When the button is not pressed, the brick light is red.
```blocks
let isRed = false;
forever(function() {
if (brick.buttonLeft.isPressed()) {
brick.setStatusLight(StatusLight.Green);
isRed = false;
} else {
if (!isRed) {
brick.setStatusLight(StatusLight.Red);
isRed = true;
}
}
})
```
## See also
[was pressed](/reference/brick/button/was-pressed),
[on event](/reference/brick/button/on-event)
[Touch sensors](/reference/sensors/touch-sensor)

View File

@ -0,0 +1,57 @@
# on Event
Run some code when a button is clicked, pressed down, or released.
```sig
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
});
```
## ~hint
**Touch sensors**
Your @boardname@ has touch sensors that work like buttons. Instead of saying `enter` or `left` as the source button, use a touch sensor block with a sensor name like `touch 1`.
```block
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
brick.setStatusLight(StatusLight.Orange);
});
```
Read about [touch sensors](/reference/sensors/touch-sensor) and using them as touch buttons.
## ~
## Parameters
* **ev**: the button action to run some code for. The button actions (events) are:
> * ``click``: button was clicked (pressed and released)
> * ``up``: button is released from just being pressed
> * ``down``: button is just pressed down
* **body**: the code you want to run when something happens with a button
## Example
Check for event on the ENTER button. Put a message on the screen when the button is pressed, clicked, or released.
```blocks
brick.showString("ENTER is: UP", 1);
brick.buttonEnter.onEvent(ButtonEvent.Released, function () {
brick.showString("ENTER is: UP ", 1);
});
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
brick.showString("ENTER is: DOWN ", 1);
});
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
brick.showString("ENTER was: CLICKED", 1);
});
```
### See also
[is pressed](/reference/brick/button/is-pressed),
[was pressed](/reference/brick/button/was-pressed),
[Touch sensor](/reference/sensors/touch-sensor)

View File

@ -0,0 +1,37 @@
# pause Until
Causes your program to wait until an event at a button happens.
```sig
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
```
## Parameters
* **ev**: the button action to wait for. The button actions (events) are:
> * ``click``: button was clicked (pressed and released)
> * ``up``: button is released from just being pressed
> * ``down``: button is just pressed down
## Example
Wait for the `up` button to go up before continuing with displaying a message on the screen.
```blocks
let waitTime = 0;
brick.showString("We're going to wait", 1);
brick.showString("for you to press and", 2);
brick.showString("release the UP button", 3);
waitTime = control.millis();
brick.buttonUp.pauseUntil(ButtonEvent.Bumped);
brick.clearScreen();
if (control.millis() - waitTime > 5000) {
brick.showString("Ok, that took awhile!", 1)
} else {
brick.showString("Ah, you let go!", 1)
}
```
## See also
[on event](/reference/brick/button/on-event)

View File

@ -0,0 +1,49 @@
# was Pressed
Check if a button was pressed earlier.
```sig
brick.buttonEnter.wasPressed()
```
The fact that a button was pressed earlier is remembered. Once **was pressed** is used, this fact is forgotten and the result is `false` the next time you check with **was pressed** button _state_ is reset). But, if you press the button again before you check with **was pressed**, it will tell you `true`.
## ~hint
**Touch sensors**
Your @boardname@ has touch sensors that work like buttons. Instead of saying `enter` or `left` as the source button, use a touch sensor block with a sensor name like `touch 1`.
```typescript
if (sensors.touch1.wasPressed()) {
console.log("Hey, I was pressed.");
}
```
Read about [touch sensors](/reference/sensors/touch-sensor) and using them as touch buttons.
## ~
## Returns
* a [boolean](types/boolean): `true` if the button was pressed before, `false` if the button was not pressed before
## Example
Set the brick light to green if the `right` button was pressed before the `left` button. If not, the brick light is turned off when the `left` button is pressed.
```typescript
brick.buttonLeft.onEvent(ButtonEvent.Bumped, function() {
if (brick.buttonRight.wasPressed()) {
brick.setStatusLight(StatusLight.Green)
} else {
brick.setStatusLight(StatusLight.Off)
}
})
```
## See also
[is pressed](/reference/brick/button/is-pressed),
[on event](/reference/brick/button/on-event),
[Touch sensors](/reference/sensors/touch-sensor)

View File

@ -0,0 +1,22 @@
# clear Screen
Clear any text or numbers displayed on the screen. The screen will be blank.
```sig
brick.clearScreen();
```
## Example
Clear the screen after displaying the message.
```blocks
brick.showString("This message will", 1);
brick.showString("self-destruct in:", 2);
brick.showString("seconds", 5);
for (let i = 0; i < 10; i++) {
brick.showNumber(10 - i, 4);
pause(1000);
}
brick.clearScreen();
```

View File

@ -0,0 +1,18 @@
# exit Program
Stops the program and returns to the brick menu
```sig
brick.exitProgram();
```
## Example
Do a sequence of motor commands and stop the program.
```blocks
motors.largeA.run(50)
pause(500)
motors.stopAll()
brick.exitProgram();
```

Some files were not shown because too many files have changed in this diff Show More