add turnRgbLedOff() in sim (#69)

* Fix Black and White Typo (#2138)

* Fixed typo: Back->Black

* Added Upgrade Rules to fix spelling

* Removed extra isEmpty

* Added previous BackAndWhite to allow for compilation of old scripts

* always shake when button is pressed (#2161)

* add PLENbit (#2140)

* Bumping pxt-core to 5.15.5

* 1.4.15

* stop background before foreground (#2174)

* Bumping pxt-core to 5.15.6

* 1.4.16

* Bumping pxt-core to 5.15.7

* 1.4.17

* Bumping pxt-core to 5.15.8

* 1.4.18

* add backgrounds for use with .dmg (#2200)

* add normal size and 2x size backgrounds for dmg

* update arrow color to dark gray

* Bumping pxt-core  to 5.15.9

* 1.4.19

* Adding v1-ref.json pointing to 1.2.13

* Bumping microbit to 2.0.0

* 2.0.1

* Pointing beta-ref to v2

* Bumping pxt-core to 5.15.10

* 2.0.2

* this repo is empty (#2201)

* Update radio event parm usage descriptions (#2165)

* add browser db prefix for v2 (#2208)

* 2.0.3

* Releasing 2.0.3 to live (#2209)

* dynamically sniff offline app version (#2059)

* Revert "dynamically sniff offline app version (#2059)" (#2211)

This reverts commit b480b34f7e.

* Updating electron to 2.0.3 (#2210)

* Updating offline reference to 2.0.3 (#2212)

* Bumping version to 2.1.0

* 2.1.1

* Spelling (#2214)

* Update write-received-packet-to-serial.md (#2217)

A support ticket pointed out issues that they'd encountered when trying to follow this document:

- `sendValue` only supports an 8 character string. This is documented in the `sendValue` docs but a longer string had been used here
- Only `radio.onReceivedNumber` is used so the sample output is not consistent with the users experience. I've changed it so that all packets are handled

* Use gcPreAllocateBlock() to fix #2177, #2215 (#2216)

* Use gcPreAllocateBlock() to fix #2177, #2215
* bump pcp 6.9.4

* 2.1.2

* Correct dice example (#2262)

Changed random(6) to random(5) so the number reflect real dice.

* add 4tronix minibit (#2249)

* Update targetconfig.json (#2258)

remove mock-iot-extension as it is just an experimental development by The Foundation

* Update calibrate-compass.md (#2265)

Based on user feedback in Slack https://microbit-community.slack.com/archives/C1ZMKRFHD/p1563274019078400?thread_ts=1563268925.077500&cid=C1ZMKRFHD

* add wukong (#2239)

* Decrease size of GC heap to allow more DAL allocs (#2246)

* 2.1.3

* add Kitronik view text (#2125)

* Release 2.0.6 to live (#2308)

* Update nexus:bit entry  (#2315)

* update nexus:bit entry

* update nexus:bit entry

* Logic Lab mini-course (#2307)

* Logic Lab mini-course

* example syntax

* Updating Readme with branch information.

* bump pxt for ios <=9 fix (#2311)

* Update pxt/common-packages and fix build (#2323)

* fix build off of pxt/ and pxt-common-packages master

* check in generated files

* add-pxt-bmp280 (#2325)

* Bumping pxt-core to 5.19.8 & common-packages to 6.14.9

* 2.1.4

* Error codes page update (#2327)

* Start adding new codes

* few tiny edits

* Add more errors and rearrange

* Update docs/device/error-codes.md

Co-Authored-By: Michał Moskal <michal@moskal.me>

* juggle category

* set error range in hint

Co-Authored-By: Michał Moskal <michal@moskal.me>

* Update docs/device/error-codes.md

Co-Authored-By: Mark <mark@microbit.org>

* fix build (#2360)

* fix broken build

* just try the more 'official' fix if possible

* back to the way that actually works..

* bump pxt to include accessibility changes (#2404)

* 2.1.5

* make hc mode sim color have higher contrast (#2409)

* Show project settings (#2401)

* markdown link fix (#2400)

* add HTS221 (#2384)

* Editor controllers fixes (#2412)

* updated strings

* bump pxt

* anotehr attempt

* 2.1.6

* turn on samples when reading accelerometer (#2413)

* 2.1.7

* hide pin p19/p20 (#2268)

* Fix remove life animation causing microbit stuck (#2314)

On the real microbit board, if the program execute other game blocks while
the remove life animation is playing, it would cause strange behavior or
even make the game stuck.

* Port of Programmable Logic lesson for Logic Lab course (#2359)

* port of programmable logic lesson

* trigger rebuild

* express as logical equation in snippet

* go logical for snippet inputs

* emit enum as bitmask (#2414)

* 2.1.8

* add alt attributes to download screens (#2415)

* add alt attributes to download screens, fixes microsoft/pxt-microbit#2291

* better descriptions

* fixing links in translate page

* Modify the LED coordinates to be between 0 and 4. (#2416)

Without this change, there is a 11/36 chance no LED lights as [`Math.random(a,b)`](https://docs.python.org/2/library/random.html#random.uniform) (thus the `pick random` block) chooses a number in the (inclusive, closed) interval `[a, b]`.

* Set LED plot row/column ranges for 'Reaction Time' (#2420)

* add LIS2MDL (#2385)

* add LIS2DW12 (#2386)

* add LPS22 (#2387)

* add LSM6DSO (#2388)

* add gator environment (#2326)

* add STTS751 (#2389)

* add inventura extension (#2421)

* add new sparkfun extensions (#2238)

* add new sparkfun extensions

* remove gator environment pending fixes

* add dfplayer mini extension (#2417)

* Update 'servo calibrator' link (#2424)

* I2C Addressing Note (#2428)

* I2C on-board sensor address note

* note for 7bit to 8bit shift

* Add nested summaries for newer courses (#2425)

* bump pxt (#2432)

* bump pxt

* bump

* bump

* fix version

* 2.1.9

* bump package.json (#2433)

* 2.1.10

* bump pxt (#2434)

* 2.1.11

* bump for diff3 (#2435)

* enable experiment

* bump pxt

* 2.1.12

* Add the Stu Lowe coding cards (#2438)

* Add the Stu Lowe coding cards

* Move 'Coding Cards' below 'Hardware'

* Add isDeleted (#2445)

* add xinabox OD01 and breakout display section (#2397)

* add xinabox OD01 and breakout display section

* Update targetconfig.json

* Update extensions.md

* Link to power supply limitations (#2443)

Fixes: #2442

* Pxt v5.23.17 (#2446)

* bump pxt

* regen docs

* fix version syntax

* restore extension

* removed dup

* 2.1.13

* add-sw01 (#2393)

* Locking old issues

* add Keyestudio robot car (#2452)

* Allow globals in reclaimed bluetooth memory (#2455)

* isTouchingEdge() should not return true for deleted sprite (#2449)

* add query variant to hide toolbar (#2458)

* Adding link to stable refs (#2460)

* Update extensions.md (#2456)

Move the :VIEW Text32 from other to Display now there is a display sections

* 2.1.14

* fixing radio stack (#2461)

* fixing radio stack

* updated shims

* 2.1.15

* Stable points to latest 2.0.9 (#2469)

* Releasing 2.0.9 to live (#2470)

* Fixing signal strength (#2474)

* Pointing to 2.0.10

* Releasing 2.0.10 (#2476)

With radio strength signal fix for hot or cold

* Removing old bitbot as we have a new bitbot package (#2479)

* updated pxt (#2465)

* updated pxt

* bump pxt

* updated react

* updated ptx

* Remove empty variable element from XML

* Bump pxt-core to 5.25.15

* bump pxt

* Bump pxt to 5.25.17

* Add precision to music slider

* 2.1.16

* add drive:bit (#2484)

* micro:bit RSSI fix (#2480)

* read rssi from packet

* updated shims

* fix build

* fix help

* move deprecated function to ts

* some formatting

* restore rssi block

* restory notations

* actually copy bytes

* removing logging code

* simpler wake up code

* comment

* fix build

* bump pxt

* go back to safety

* bump microbit

* restor package.json

* revert jquery v

* use macro

* check length

* bump pxt (#2490)

* 2.1.17

* Use default resize function for microbit gesture dropdown (#2491)

* Name Badge project page (#2477)

* Name Bagde project page

* gotta please the summary check

* link typo, ugh

* Revert "Name Badge project page (#2477)"

This reverts commit 2e2860632b.

* add freenove starter kit (#2493)

* radio.setFrequencyBand support (#2495)

* setfrequencyband support

* revert line change

* add bounds check

* Name Badge project page (#2496)

* Name Bagde project page

* gotta please the summary check

* link typo, ugh

* get rid of the pptx

* Simplify the Fahrenheit from Celsius computation. (#2497)

As the micro:bit introduces floating point arithmetic for both the existing `f = 18 * c / 10 + 32` computation and the new `f = 1.8 * c + 32` computation, there isn't any benefit for the former.

* Enable Polish localization (#2499)

* bump package

* 2.1.18

* shrink maintenance gif

* 2.1.19

* Rotary phone dial (#2502)

* some write up

* adding images

* text

* more text

* adding vids

* adding escape room

* remove newer lesson

* remove .mp4

* Card page edits

* adding image

* adding to toys

* rotary edits

* fix typo

* bump pxt 5.28.7 (#2503)

* bump pxt

* bump to pxt 5.28.8

* 2.1.20

* bump pxt 5.28.9 (#2504)

* 2.1.21

* bump pxt 5.28.10

* 2.1.22

* bump pxt 5.28.11

* 2.1.23

* bump pxt 5.28.12

* 2.1.24

* Update README.md

* robot unicorn (#2512)

* robot unicorn

* Edits to the unicorn

* fix missing radio and boardname

* bump pxt 5.28.18 (#2517)

* bump pxt 5.28.18

* updated summary

* 2.1.25

* bump pxt 5.28.21

* 2.1.26

* bump to pxt5.28.23

* 2.1.27

* Add redirect to pins info to serial heading (#2520)

* Add redirect to pins info to serial heading

* adding links

* vump to pxt 5.28.24

* 2.1.28

* bump to pxt 5.28.26

* 2.1.29

* add build instructions

* updated build notes

* bump pxt 5.28.27

* 2.1.30

* missing svg

* remove crowdin project to disable upload from master branch

* reeanble crowdin, no upload

* 2.1.31

* bump pxt common to 6.16.25

* missing radio package

* Fix GC heap reclamation (#2528)

* bump to pxt 5.28.31

* bump pxt 5.28.32

* 2.1.32

* 2.1.33

* fix typo

* pxt-microbit-next? (#2543)

Since the repo https://github.com/microsoft/pxt-microbit-next doesn't exist, I am assuming that the word `next` is not meant to be here.

* Extensions: Add Inksmith Climate Action Kit (#2535)

* Fixes for typos found in Crowdin - 11252019 (#2538)

* Extension: add Kitronik Halo HD (#2541)

* Extension: Add EBOTICS MIBO (#2542)

* add Bright Wearables Brightboard (#2537)

* Docs: Change default value in Javascript. (#2540)

* Change default value in Javascript.

Per @microbit-mark 's suggestion, add an example of how to change the default interval value by switching to Javascript.

* edits to new example

* bump pxt 5.30.6

* 2.1.34

* update git and vscode settings

* revert changes to 2.1.28

* package-lock

* v2.1.34

* Change Hero Image

* add RVR (#2516)

* Extension: add minicruise (#2545)

* Fix minutes display for 'Digital Watch' project (#2547)

* Fix minutes display for 'Digital Watch' project

* minutes less than 10

* bump pxt

* 2.1.35

* updated pxt

* 2.1.36

* package lock

* Tutorial Typo Fix

* bumppxt

* 2.1.37

* update error guide link (#2554)

* adding radio firefly (#2549)

* Update 'Metal Detector' example (#2559)

* bump pxt

* 2.1.38

* typoFix

* Update Pins

* Add C7, C8 and C9 Serial Pins

* Add C7, C8 and C9 Serial Pins

* Pins update

* Add maqueen (#2560)

* Extensions: Add DFRobot Maqueen

* fix

* revert pin C7, C8 and C9

* add extension doc file

* revert pxt bump

* Docs: Extensions remove headliner

* Remove outdated #ifdef (#2564)

* Extensions: add servobit (#2557)

Co-authored-by: Abhijith Chatra <abchatra@microsoft.com>

* bump to pxt 5.31.8, common 6.18.2

* 2.1.39

* enable github editor experiment (#2568)

* Fix missing sim function

* bump to pxt 5.31.10

* 2.1.40

* Modify snippets/examples relying of fp div (#2571)

* Extensions: add DFRobot natural science board (#2574)

* Extensions: add Kitronik clip dtector (#2576)

Co-authored-by: Abhijith Chatra <abchatra@microsoft.com>

Co-authored-by: Chase Mortensen <C_Mortensen@live.com>
Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
Co-authored-by: Mark <mark@microbit.org>
Co-authored-by: Abhijith Chatra <abchatra@microsoft.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
Co-authored-by: shakao <34112083+shakao@users.noreply.github.com>
Co-authored-by: Galen Nickel <v-gani@microsoft.com>
Co-authored-by: Danny Yates <danny@codeaholics.org>
Co-authored-by: Sam Kent <32453267+microbit-sam@users.noreply.github.com>
Co-authored-by: Michał Moskal <michal@moskal.me>
Co-authored-by: Daryl Zuniga <Daryl.Zuniga@gmail.com>
Co-authored-by: Eric Kimsey <ekimsey@users.noreply.github.com>
Co-authored-by: Richard Knoll <riknoll@users.noreply.github.com>
Co-authored-by: Peter Brodersen <peter@ter.dk>
Co-authored-by: Leo <leo881003@gmail.com>
Co-authored-by: Asher Kach <asher.kach@gmail.com>
Co-authored-by: Franklin Tse <FranklinWhale@users.noreply.github.com>
Co-authored-by: Neal McBurnett <nealmcb@gmail.com>
Co-authored-by: Kitronik Ltd  <design@kitronik.co.uk>
Co-authored-by: Helen Leigh <48659173+helenleigh@users.noreply.github.com>
Co-authored-by: Gerard Braad <me@gbraad.nl>
Co-authored-by: Nicole Parrot <cleoqc1124@gmail.com>
This commit is contained in:
Amerlander 2020-01-15 02:33:00 +01:00 committed by Peli de Halleux
parent c2314827c7
commit dd63007fe7
3 changed files with 65 additions and 70 deletions

View File

@ -50,10 +50,8 @@ This method of filling coordinate points, counting them, and using the differenc
## Monte Carlo approximation of _pi_ ## Monte Carlo approximation of _pi_
```blocks ```blocks
let pir = 0 let pi = 0
let pid = 0
let y = 0 let y = 0
let pin = 0
let x = 0 let x = 0
let r2 = 0 let r2 = 0
let r = 0 let r = 0
@ -87,10 +85,7 @@ basic.forever(() => {
// r * r * pi => inside / n ~= (r*r*pi) / (4*r*r) ~= // r * r * pi => inside / n ~= (r*r*pi) / (4*r*r) ~=
// pi / 4 pi = inside / n * 4 // pi / 4 pi = inside / n * 4
// //
pin = inside * 4 pi = (inside * 4) / n
// only integer arithmetic here...
pid = pin / n
pir = pin % n
// show results // show results
basic.showLeds(` basic.showLeds(`
# # # # # # # # # #
@ -99,6 +94,6 @@ basic.forever(() => {
. # . # . . # . # .
. # . . # . # . . #
`) `)
basic.showString(" " + pid + "." + pir) basic.showString(" " + pi)
}) })
``` ```

119
package-lock.json generated
View File

@ -61,9 +61,9 @@
} }
}, },
"@types/w3c-web-usb": { "@types/w3c-web-usb": {
"version": "1.0.3", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.3.tgz", "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.4.tgz",
"integrity": "sha512-XilIvno46lLRyOj/1G5z88M6iimYs3dr3LNdSN9UxSWifytKsBMmRtAi53X3j0ThrrqyVotqrSeaYv9a0I131w==" "integrity": "sha512-aaOB3EL5WCWBBOYX7W1MKuzspOM9ZJI9s3iziRVypr1N+QyvIgXzCM4lm1iiOQ1VFzZioUPX9bsa23myCbKK4A=="
}, },
"@types/web-bluetooth": { "@types/web-bluetooth": {
"version": "0.0.4", "version": "0.0.4",
@ -122,6 +122,17 @@
"es6-promisify": "^5.0.0" "es6-promisify": "^5.0.0"
} }
}, },
"ajv": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"alphanum-sort": { "alphanum-sort": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
@ -668,9 +679,9 @@
} }
}, },
"caniuse-db": { "caniuse-db": {
"version": "1.0.30001015", "version": "1.0.30001019",
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001015.tgz", "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001019.tgz",
"integrity": "sha512-+Fqdu7tOxSD0HDs922QPxseHlwnUzdjLC1Oq32HZ1/LWrMfYNt8JaUWnoiIAR+G4fRzM3tdgc4Lrqo5Nx76UsQ==" "integrity": "sha512-AdQItnPLQ32qEWPAfp3lGIYXxjbHOtcabhmvqEv831kc8WyYdibpdnnUu+gQXxEwDf1Job597aCbqf+EYAnuTA=="
}, },
"caseless": { "caseless": {
"version": "0.12.0", "version": "0.12.0",
@ -707,18 +718,18 @@
} }
}, },
"chokidar": { "chokidar": {
"version": "3.3.0", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",
"integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",
"requires": { "requires": {
"anymatch": "~3.1.1", "anymatch": "~3.1.1",
"braces": "~3.0.2", "braces": "~3.0.2",
"fsevents": "~2.1.1", "fsevents": "~2.1.2",
"glob-parent": "~5.1.0", "glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0", "is-binary-path": "~2.1.0",
"is-glob": "~4.0.1", "is-glob": "~4.0.1",
"normalize-path": "~3.0.0", "normalize-path": "~3.0.0",
"readdirp": "~3.2.0" "readdirp": "~3.3.0"
} }
}, },
"chownr": { "chownr": {
@ -1226,9 +1237,9 @@
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.322", "version": "1.3.328",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.328.tgz",
"integrity": "sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==" "integrity": "sha512-x4XefnFxDxFwaQ01d/pppJP9meWhOIJ/gtI6/4jqkpsadq79uL7NYSaX64naLmJqvzUBjSrO3IM2+1b/W9KdPg=="
}, },
"elliptic": { "elliptic": {
"version": "6.5.2", "version": "6.5.2",
@ -2135,11 +2146,6 @@
"useragent": "2.3.0" "useragent": "2.3.0"
}, },
"dependencies": { "dependencies": {
"mime": {
"version": "2.4.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
"integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA=="
},
"rimraf": { "rimraf": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@ -2349,6 +2355,11 @@
"brorand": "^1.0.1" "brorand": "^1.0.1"
} }
}, },
"mime": {
"version": "2.4.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
"integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA=="
},
"mime-db": { "mime-db": {
"version": "1.42.0", "version": "1.42.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz",
@ -2698,10 +2709,15 @@
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
}, },
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"picomatch": { "picomatch": {
"version": "2.1.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz",
"integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==" "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA=="
}, },
"pngjs": { "pngjs": {
"version": "3.4.0", "version": "3.4.0",
@ -3415,9 +3431,9 @@
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
}, },
"psl": { "psl": {
"version": "1.6.0", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
"integrity": "sha512-SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==" "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ=="
}, },
"public-encrypt": { "public-encrypt": {
"version": "4.0.3", "version": "4.0.3",
@ -3469,11 +3485,6 @@
"ms": "^2.1.1" "ms": "^2.1.1"
} }
}, },
"mime": {
"version": "2.4.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
"integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA=="
},
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -3498,18 +3509,18 @@
} }
}, },
"pxt-common-packages": { "pxt-common-packages": {
"version": "6.16.31", "version": "6.18.2",
"resolved": "https://registry.npmjs.org/pxt-common-packages/-/pxt-common-packages-6.16.31.tgz", "resolved": "https://registry.npmjs.org/pxt-common-packages/-/pxt-common-packages-6.18.2.tgz",
"integrity": "sha512-mBgAEyPhek0YR9brj6B4pMLXWIALsD8gLvwxu0yBgIRkVkPKwN2zz1ePO9QwIz7sGt2d4zXzibcghKdgJJywjA==", "integrity": "sha512-aB89uhSaNcT3SA42mMiCh8miNopm1zWBZTHkVcVRL7/qOiZXqkJCArpBEwiFZbnS8m+DLjUEHKF+yiF2keQppA==",
"requires": { "requires": {
"@jacdac/jacdac-ts": "^0.0.9", "@jacdac/jacdac-ts": "^0.0.9",
"pxt-core": "^5.24.8" "pxt-core": "^5.24.8"
} }
}, },
"pxt-core": { "pxt-core": {
"version": "5.30.17", "version": "5.31.8",
"resolved": "https://registry.npmjs.org/pxt-core/-/pxt-core-5.30.17.tgz", "resolved": "https://registry.npmjs.org/pxt-core/-/pxt-core-5.31.8.tgz",
"integrity": "sha512-5lZEauuMnY10N9nxYIWsFmBW9pRv+IHGOybvmpuoVi3VuCKJpP1fjlIvAAQQCmv8L+R0W2MFdFE3nBtWNdU9FA==", "integrity": "sha512-9+x7LGHER1C1X67G1F6VSSG1xpSDtuF5NoWVbel3zC7v/wzv2zHjn+CE4R2Mj4DM5fGp39vtfcTXKbPp/Kec8w==",
"requires": { "requires": {
"applicationinsights-js": "^1.0.20", "applicationinsights-js": "^1.0.20",
"bluebird": "3.5.1", "bluebird": "3.5.1",
@ -3640,9 +3651,9 @@
} }
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": { "requires": {
"core-util-is": "~1.0.0", "core-util-is": "~1.0.0",
"inherits": "~2.0.3", "inherits": "~2.0.3",
@ -3654,11 +3665,11 @@
} }
}, },
"readdirp": { "readdirp": {
"version": "3.2.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
"integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
"requires": { "requires": {
"picomatch": "^2.0.4" "picomatch": "^2.0.7"
} }
}, },
"reduce-css-calc": { "reduce-css-calc": {
@ -3713,17 +3724,6 @@
"uuid": "^3.3.2" "uuid": "^3.3.2"
}, },
"dependencies": { "dependencies": {
"ajv": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"assert-plus": { "assert-plus": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
@ -3773,11 +3773,6 @@
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
}, },
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"qs": { "qs": {
"version": "6.5.2", "version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
@ -3800,9 +3795,9 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
}, },
"resolve": { "resolve": {
"version": "1.13.1", "version": "1.14.2",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz",
"integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
"requires": { "requires": {
"path-parse": "^1.0.6" "path-parse": "^1.0.6"
} }

View File

@ -3,4 +3,9 @@ namespace pxsim.basic {
board().rgbLedState = c; board().rgbLedState = c;
runtime.queueDisplayUpdate() runtime.queueDisplayUpdate()
} }
export function turnRgbLedOff() {
board().rgbLedState = 0;
runtime.queueDisplayUpdate()
}
} }