Compare commits

...

118 Commits

Author SHA1 Message Date
ab6268ea7a 0.9.23 2017-02-27 18:46:38 -08:00
999a40bb0d Merge pull request #359 from Microsoft/colors
Fixing colors
2017-02-27 15:52:14 -08:00
0d4af4ea12 Fixing colors 2017-02-27 15:26:45 -08:00
5209222438 0.9.22 2017-02-27 11:36:24 -08:00
f21ff4ad20 Bump pxt-core to 0.11.51 2017-02-27 11:36:22 -08:00
2d5a96d215 enabling icon image 2017-02-27 11:21:21 -08:00
30fe647f51 more docs for show-arrow. correct errors 2017-02-27 10:51:52 -08:00
2361d1910a 0.9.21 2017-02-27 10:33:15 -08:00
7921caaaff Bump pxt-core to 0.11.50 2017-02-27 10:33:14 -08:00
8bf34ae19c 0.9.20 2017-02-27 10:01:06 -08:00
0dc03c81b7 Bump pxt-core to 0.11.48 2017-02-27 10:01:01 -08:00
1a398e0db9 moving icon files under sim 2017-02-27 09:59:14 -08:00
f614cb9b2b Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2017-02-27 09:41:47 -08:00
794909f09f updated translations 2017-02-27 09:41:34 -08:00
24107d1968 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2017-02-27 09:07:45 -08:00
dfca86999f add doc for showIcon 2017-02-27 09:07:36 -08:00
a487c3d3ac 0.9.19 2017-02-27 07:19:00 -08:00
e7ea0ba581 0.9.18 2017-02-26 23:02:04 -08:00
212da01f5b Bump pxt-core to 0.11.47 2017-02-26 23:02:02 -08:00
4e72713797 0.9.17 2017-02-25 06:00:16 -08:00
5d27ddb4a5 Bump pxt-core to 0.11.46 2017-02-25 06:00:14 -08:00
fea143f1d2 0.9.16 2017-02-25 05:39:32 -08:00
13677c47a9 Bump pxt-core to 0.11.45 2017-02-25 05:39:30 -08:00
ab73d77322 updated string locs (#357) 2017-02-25 05:39:08 -08:00
b8aa63411c fixing var compilation issue in docs 2017-02-25 05:38:18 -08:00
bdc5122ce4 0.9.15 2017-02-23 09:49:52 -08:00
9709d43dad Bump pxt-core to 0.11.43 2017-02-23 09:49:51 -08:00
56904acb99 Blockly integrate pxt microbit (#355)
* added new values for Integration with field_note
2017-02-23 09:44:18 -08:00
63d3909cad 0.9.14 2017-02-22 13:26:09 -08:00
23e835b108 Update core strings 2017-02-22 13:25:47 -08:00
be1ea9a742 Pin number typo (#356) 2017-02-21 17:43:13 -08:00
8d33b4ded8 0.9.13 2017-02-21 12:10:56 -08:00
c58f847b33 Bump pxt-core to 0.11.41 2017-02-21 12:10:56 -08:00
19eff8e642 0.9.12 2017-02-17 23:22:45 -08:00
d53c8e9bef Bump pxt-core to 0.11.40 2017-02-17 23:22:44 -08:00
aea8299006 February beta to release. 2017-02-17 12:23:24 -08:00
90f63c597f 0.9.11 2017-02-17 12:14:50 -08:00
c4db344a85 Bump pxt-core to 0.11.39 2017-02-17 12:14:49 -08:00
0558e8945d 0.9.10 2017-02-17 11:46:54 -08:00
e90875d57d Bump pxt-core to 0.11.38 2017-02-17 11:46:53 -08:00
f4c1a65e7e 0.9.9 2017-02-17 11:06:07 -08:00
8dc88c44f2 Bump pxt-core to 0.11.37 2017-02-17 11:06:06 -08:00
acbe9106cc Updating small organization logo 2017-02-16 20:36:20 -08:00
652b09d5c4 0.9.8 2017-02-14 16:19:51 -08:00
e35312de70 Bump pxt-core to 0.11.36 2017-02-14 16:19:49 -08:00
82764ffcc1 0.9.7 2017-02-14 15:38:24 -08:00
f1404cef61 Bump pxt-core to 0.11.35 2017-02-14 15:38:22 -08:00
566b750419 0.9.6 2017-02-14 07:44:30 -08:00
b119952e75 Bump pxt-core to 0.11.33 2017-02-14 07:44:28 -08:00
e4e6a5effd updated translations 2017-02-14 07:39:09 -08:00
ec1117842d 0.9.5 2017-02-13 15:36:12 -08:00
de4242bf71 Bump pxt-core to 0.11.32 2017-02-13 15:36:10 -08:00
59322fb06b updated strings 2017-02-11 14:05:02 -08:00
19e609c245 Delay initializing the global icons (#354)
* delay initializing the global icons, so we don't generate them for each hex file

* Moving the strings to flash
2017-02-10 16:33:52 -08:00
a5cb663316 0.9.4 2017-02-09 22:52:07 -08:00
1dd0c1793e Bump pxt-core to 0.11.28 2017-02-09 22:52:05 -08:00
a4a74bdd6b adding a few more examples 2017-02-09 17:40:21 -08:00
45c82767d0 fixed titles 2017-02-09 14:57:38 -08:00
0c77927f35 fixing example page format 2017-02-09 14:51:12 -08:00
672672e632 adding example pages 2017-02-09 14:44:56 -08:00
fe2ae855b0 0.9.3 2017-02-09 11:02:28 -08:00
6612080885 Bump pxt-core to 0.11.27 2017-02-09 11:02:26 -08:00
8641a81e05 0.9.2 2017-02-08 21:09:06 -08:00
656e183a1a Bump pxt-core to 0.11.26 2017-02-08 21:09:01 -08:00
1d56be507a 0.9.1 2017-02-08 15:43:49 -08:00
6504007a65 bumped to v0.9 2017-02-08 15:43:41 -08:00
fc0526e47c 0.8.6 2017-02-08 15:42:54 -08:00
cb47a6a291 Bump pxt-core to 0.11.25 2017-02-08 15:42:52 -08:00
6f8060a8c7 allow analog operations on digital pins (#353) 2017-02-08 15:42:39 -08:00
4a8897c0a4 0.8.5 2017-02-07 22:52:08 -08:00
839a26e5a7 Bump pxt-core to 0.11.24 2017-02-07 22:52:06 -08:00
b46802804c 0.8.4 2017-02-07 14:19:03 -08:00
34d1fac337 Bump pxt-core to 0.11.22 2017-02-07 14:19:01 -08:00
39c41f26b1 0.8.3 2017-02-07 12:58:38 -08:00
083a192a5b Bump pxt-core to 0.11.20 2017-02-07 12:58:36 -08:00
76cbad0cec 0.8.2 2017-02-06 22:30:45 -08:00
ed84d49667 Bump pxt-core to 0.11.16 2017-02-06 22:30:43 -08:00
b9d867cf4e Enabled text blocks (#352) 2017-02-06 13:36:24 -08:00
226dfa281a 0.8.1 2017-02-03 20:39:55 -08:00
cc4f6c66da Bump pxt-core to 0.11.13 2017-02-03 20:39:54 -08:00
49ecac6332 Showimage (#351)
* support for interval in showImage, showFrame

* added default arg to showFrame
2017-02-03 20:39:18 -08:00
638e1d3c53 0.7.55 2017-02-03 15:44:29 -08:00
712bc0ada4 Bump pxt-core to 0.11.12 2017-02-03 15:44:26 -08:00
8437f0cf3c enable sharing 2017-02-03 15:23:46 -08:00
9641c4b5ec fixed pin-pressed 2017-02-02 23:26:55 -08:00
e29216c709 0.7.54 2017-02-02 23:22:56 -08:00
06e255eeb9 Bump pxt-core to 0.11.11 2017-02-02 23:22:54 -08:00
91c70e9809 0.7.53 2017-02-02 23:18:38 -08:00
8014712994 Bump pxt-core to 0.11.10 2017-02-02 23:18:36 -08:00
a7d5804cea 0.7.52 2017-02-01 16:46:58 -08:00
2e5984a65b Bump pxt-core to 0.11.9 2017-02-01 16:46:48 -08:00
c13bef01a4 remove image and move enum 2017-02-01 14:08:23 -08:00
16c08e4c9b 0.7.51 2017-02-01 09:50:31 -08:00
444c37edcb Bump pxt-core to 0.11.8 2017-02-01 09:50:31 -08:00
51781be90b Merge pull request #350 from Microsoft/icons
add icons/arrows/clock
2017-02-01 09:28:09 -08:00
741eb4e4b4 fixed typo in settings 2017-02-01 07:58:20 -08:00
350f595a52 0.7.50 2017-02-01 07:57:21 -08:00
06c392f16f Bump pxt-core to 0.11.7 2017-02-01 07:57:19 -08:00
4bf659c9ac updated translations 2017-02-01 07:57:10 -08:00
db4711fd26 remove hour, add advanced section 2017-01-31 15:54:23 -08:00
8275fefd08 change name 2017-01-31 14:56:56 -08:00
8c474c899c 0.7.49 2017-01-31 08:29:58 -08:00
48bb0e238a Bump pxt-core to 0.11.6 2017-01-31 08:29:56 -08:00
1d47b4de0d Lightmonster (#346)
* fixed boardname issues

* refactored servo info

* coffee cup monster lesson skeleton

* display event source id / value in advanced section

* normalized project structure

* updated project name

* Update projects.md
2017-01-31 08:29:25 -08:00
595e4a23e6 package approval docs (#344)
* updated docs

* @jaustin comments

* Update packages.md
2017-01-31 08:28:33 -08:00
2d3ca71ffb add meta data 2017-01-30 17:05:06 -08:00
3ba9d2867b add attribution 2017-01-30 16:51:40 -08:00
ff7b229a3a add one image to make it spiffy 2017-01-30 16:42:48 -08:00
f944af8122 get rid of images 2017-01-30 15:33:33 -08:00
35225468e4 add some images 2017-01-30 15:03:50 -08:00
72d5e83e5b Exposing pin eventOn method (#349) 2017-01-30 19:19:54 +00:00
436b56a2fa 0.7.48 2017-01-29 22:25:42 -08:00
7a41730f82 Bump pxt-core to 0.11.4 2017-01-29 22:25:41 -08:00
372ddfa641 0.7.47 2017-01-28 22:46:03 -08:00
30078923a3 Bump pxt-core to 0.11.3 2017-01-28 22:46:02 -08:00
5ab9222200 0.7.46 2017-01-28 21:59:48 -08:00
8ae5a48f1e Bump pxt-core to 0.11.2 2017-01-28 21:59:48 -08:00
f9ed37d07b Using pxtsemantic optimization 2017-01-28 21:55:48 -08:00
95 changed files with 2376 additions and 351 deletions

View File

@ -1,6 +1,6 @@
// Place your settings in this file to overwrite default and user settings.
{
"file.autoSave": "afterDelay",
"files.autoSave": "afterDelay",
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/built/**": true,

43
THIRD-PARTY-NOTICES.txt Normal file
View File

@ -0,0 +1,43 @@
/*!----------------- PXT ThirdPartyNotices -------------------------------------------------------
PXT uses third party material from the projects listed below.
The original copyright notice and the license under which Microsoft
received such third party material are set forth below. Microsoft
reserves all other rights not expressly granted, whether by
implication, estoppel or otherwise.
In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:
abchatra@microsoft.com
---------------------------------------------
Third Party Code Components
---------------------------------------------
Some code derived (as noted) from
https://github.com/bbcmicrobit/micropython
The MIT License (MIT)
Copyright (c) 2013-2016 The MicroPython-on-micro:bit Developers, as listed
in the accompanying AUTHORS file
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,5 +1,5 @@
# microbit-chrome
Prototype chrome addon that exposes the micro:bit's serial output to webpages.
Prototype chrome addon that exposes the @boardname@'s serial output to webpages.
* watch the [demo video](https://vimeo.com/146207766)
# Installation

View File

@ -1,13 +1,4 @@
# Preparing the servo
### @description Connecting the servo to crocodile clips
### ~avatar avatar
Equip the microservo with crocodile clips.
### ~
## Duration: ~30 minutes
# Equipping a microservo with Crocodile clips
## Materials
* Cutting pliers or wire cutter
@ -70,7 +61,7 @@ Place the cables next to each other
It is very **important** to ensure that there is a good connection between the 2 cables.
If the connection is weak, the microservo will not receive enough current and it will not work.
If you have access to a soldering iron, we strongly recommend to solver this connection.
**If you have access to a soldering iron, we strongly recommend to solder this connection.**
### ~
@ -105,11 +96,9 @@ When attaching the crocodile clips to the pins, don't hesitate to grab the side
* Download the following code to your @boardname@
```blocks
let a = 0
basic.forever(() => {
a = input.acceleration(Dimension.X)
pins.servoWritePin(AnalogPin.P0, pins.map(
a,
input.acceleration(Dimension.X),
-512,
512,
0,
@ -121,10 +110,7 @@ basic.forever(() => {
* When powered by USB, make sure that the servo moves when you tilt the board.
* When powered by batteries **only**, make sure that the servo moves when you tilt the board.
## Troubleshooting
If your servo seems to sutter and stay stuck at a particular position, it means that it is not receiving enough power.
This is probably due to a weak connection or low battery level. Check each connection and check your batteries.
### ~button /projects/inchworm/chassis
NEXT: Chassis
### ~
This is probably due to a weak connection or low battery level. Check each connection and check your batteries.

View File

@ -6,6 +6,7 @@
* **[Getting Started](/getting-started)**
* [Projects](/projects)
* [Examples](/examples)
* [Lessons](/lessons)
### @boardname@ reference

35
docs/examples.md Normal file
View File

@ -0,0 +1,35 @@
# Examples
Here are some fun programs for your @boardname@!
## Fun stuff
```codecard
[{
"name": "Blinky",
"url":"/examples/blinky"
},
{
"name": "Name Tag",
"url":"/examples/name-tag"
},
{
"name": "Rando",
"url":"/examples/rando"
}]
```
## Sensors
```codecard
[{
"name": "Plot Acceleration",
"url":"/examples/plot-acceleration"
}, {
"name": "Plot Light Level",
"url":"/examples/plot-light-level"
}, {
"name": "Plot Analog Pin",
"url":"/examples/plot-analog-pin"
}]
```

20
docs/examples/blinky.md Normal file
View File

@ -0,0 +1,20 @@
# Blinky
```blocks
basic.forever(() => {
basic.showLeds(`
. # . # .
# # # # #
# # # # #
. # # # .
. . # . .`
);
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .`
);
})
```

View File

@ -0,0 +1,7 @@
# Name Tag
```blocks
basic.forever(() => {
basic.showString("JAMES")
})
```

View File

@ -0,0 +1,10 @@
# Plot Acceleration
```blocks
basic.forever(() => {
led.plotBarGraph(
input.acceleration(Dimension.X),
1023
)
})
```

View File

@ -0,0 +1,10 @@
# Plot Analog Pin
```blocks
basic.forever(() => {
led.plotBarGraph(
pins.analogReadPin(AnalogPin.P0),
1023
)
})
```

View File

@ -0,0 +1,10 @@
# Plot Light level
```blocks
basic.forever(() => {
led.plotBarGraph(
input.lightLevel(),
255
)
})
```

7
docs/examples/rando.md Normal file
View File

@ -0,0 +1,7 @@
# Rando
```blocks
basic.forever(() => {
led.toggle(Math.random(5), Math.random(5))
})
```

View File

@ -1,3 +1,3 @@
{
"appref": "v0.7.41"
"appref": "v0.9.11"
}

View File

@ -10,7 +10,7 @@ down to JavaScript that works across all major browsers and platforms, without h
Let's take a look at a simple class-based example:
```ts
```typescript
class Greeter {
greeting: string;
constructor(message: string) {
@ -43,7 +43,7 @@ Of course, one of the most fundamental patterns in class-based programming is be
Let's take a look at an example:
```ts-ignore
```typescript-ignore
class Animal {
name: string;
constructor(theName: string) { this.name = theName; }
@ -105,7 +105,7 @@ In TypeScript, each member is `public` by default.
You may still mark a member `public` explicitly.
We could have written the `Animal` class from the previous section in the following way:
```ts-ignore
```typescript-ignore
class Animal {
public name: string;
public constructor(theName: string) { this.name = theName; }
@ -119,7 +119,7 @@ class Animal {
When a member is marked `private`, it cannot be accessed from outside of its containing class. For example:
```ts-ignore
```typescript-ignore
class Animal {
private name: string;
constructor(theName: string) { this.name = theName; }
@ -138,7 +138,7 @@ The same applies to `protected` members.
Let's look at an example to better see how this plays out in practice:
```ts-ignore
```typescript-ignore
class Animal {
private name: string;
constructor(theName: string) { this.name = theName; }
@ -174,7 +174,7 @@ Even though `Employee` also has a `private` member called `name`, it's not the o
The `protected` modifier acts much like the `private` modifier with the exception that members
declared `protected` can also be accessed by instances of deriving classes. For example,
```ts-ignore
```typescript-ignore
class Person {
protected name: string;
constructor(name: string) { this.name = name; }
@ -204,7 +204,7 @@ we can still use it from within an instance method of `Employee` because `Employ
A constructor may also be marked `protected`.
This means that the class cannot be instantiated outside of its containing class, but can be extended. For example,
```ts-ignore
```typescript-ignore
class Person {
protected name: string;
protected constructor(theName: string) { this.name = theName; }
@ -233,7 +233,7 @@ let john = new Person("John"); // Error: The 'Person' constructor is protected
You can make properties readonly by using the `readonly` keyword.
Readonly properties must be initialized at their declaration or in the constructor.
```ts-ignore
```typescript-ignore
class Octopus {
readonly name: string;
readonly numberOfLegs: number = 8;
@ -252,7 +252,7 @@ This turns out to be a very common practice.
*Parameter properties* let you create and initialize a member in one place.
Here's a further revision of the previous `Octopus` class using a parameter property:
```ts-ignore
```typescript-ignore
class Octopus {
readonly numberOfLegs: number = 8;
constructor(readonly name: string) {

View File

@ -3,7 +3,7 @@
Functions are the fundamental building block of programs. Here is the simplest
way to make a function that adds two numbers:
```ts
```typescript
// Named function
function add(x : number, y : number) {
return x + y;
@ -19,7 +19,7 @@ For the @boardname@, you must specify a [type](/js/types) for each function para
Functions can refer to variables outside of the function body.
When they do so, they're said to `capture` these variables.
```ts
```typescript
let z = 100;
function addToZ(x: number, y: number) {
@ -33,7 +33,7 @@ basic.showNumber(addToZ(1, 2))
Let's add a return type to our add function:
```ts
```typescript
function add(x: number, y: number): number {
return x + y;
}
@ -45,7 +45,7 @@ TypeScript can figure the return type out by looking at the return statements, s
In TypeScript, the number of arguments given to a function has to match the number of parameters the function expects.
```ts-ignore
```typescript-ignore
function buildName(firstName: string, lastName: string) {
return firstName + " " + lastName;
}
@ -60,7 +60,7 @@ When they do, their value is `undefined`.
We can get this functionality in TypeScript by adding a `?` to the end of parameters we want to be optional.
For example, let's say we want the last name parameter from above to be optional:
```ts-ignore
```typescript-ignore
function buildName(firstName: string, lastName?: string) {
if (lastName)
return firstName + " " + lastName;
@ -80,7 +80,7 @@ In TypeScript, we can also set a value that a parameter will be assigned if the
These are called default-initialized parameters.
Let's take the previous example and default the last name to `"Smith"`.
```ts-ignore
```typescript-ignore
function buildName(firstName: string, lastName = "Smith") {
return firstName + " " + lastName;
}
@ -94,7 +94,7 @@ let result4 = buildName("Bob", "Adams"); // ah, just right
Default-initialized parameters that come after all required parameters are treated as optional, and just like optional parameters, can be omitted when calling their respective function.
This means optional parameters and trailing default parameters will share commonality in their types, so both
```ts
```typescript
function buildName(firstName: string, lastName?: string) {
// ...
}
@ -102,7 +102,7 @@ function buildName(firstName: string, lastName?: string) {
and
```ts
```typescript
function buildName(firstName: string, lastName = "Smith") {
// ...
}
@ -115,7 +115,7 @@ Unlike plain optional parameters, default-initialized parameters don't *need* to
If a default-initialized parameter comes before a required parameter, users need to explicitly pass `undefined` to get the default initialized value.
For example, we could write our last example with only a default initializer on `firstName`:
```ts-ignore
```typescript-ignore
function buildName(firstName = "Will", lastName: string) {
return firstName + " " + lastName;
}
@ -134,7 +134,7 @@ In JavaScript, you can work with the arguments directly using the `arguments` va
In TypeScript, you can gather these arguments together into a variable:
```ts-ignore
```typescript-ignore
function buildName(firstName: string, ...restOfName: string[]) {
return firstName + " " + restOfName.join(" ");
}
@ -148,7 +148,7 @@ The compiler will build an array of the arguments passed in with the name given
The ellipsis is also used in the type of the function with rest parameters:
```ts-ignore
```typescript-ignore
function buildName(firstName: string, ...restOfName: string[]) {
return firstName + " " + restOfName.join(" ");
}

View File

@ -7,7 +7,7 @@ numbers, strings, structures, boolean values, and the like.
The most basic datatype is the simple true/false value, which is called a `boolean` value.
```ts
```typescript
let isDone: boolean = false;
```
@ -20,7 +20,7 @@ However, for the @boardname@, `numbers` are integer values.
Integer values can be specified via decimal, hexadecimal and octal notation:
```ts
```typescript
let decimal: number = 42;
let hex: number = 0xf00d;
let binary: number = 0b1010;
@ -32,7 +32,7 @@ let octal: number = 0o744;
As in other languages, we use the type `string` to refer to textual data.
Use double quotes (`"`) or single quotes (`'`) to surround string data.
```ts
```typescript
let color: string = "blue";
color = 'red';
```
@ -40,7 +40,7 @@ color = 'red';
You can also use *template strings*, which can span multiple lines and have embedded expressions.
These strings are surrounded by the backtick/backquote (`` ` ``) character, and embedded expressions are of the form `${ expr }`.
```ts
```typescript
let fullName: string = `Bob Bobbington`;
let age: number = 37;
let sentence: string = `Hello, my name is ${ fullName }.
@ -50,7 +50,7 @@ I'll be ${ age + 1 } years old next month.`
This is equivalent to declaring `sentence` like so:
```ts
```typescript
let fullName: string = `Bob Bobbington`;
let age: number = 37;
let sentence: string = "Hello, my name is " + fullName + ".\n\n" +
@ -63,13 +63,13 @@ Arrays allow you to work with an expandable sequence of values, addressed by an
Array types can be written in one of two ways.
In the first, you use the type of the elements followed by `[]` to denote an array of that element type:
```ts
```typescript
let list: number[] = [1, 2, 3];
```
The second way uses a generic array type, `Array<elemType>`:
```ts
```typescript
let list: Array<number> = [1, 2, 3];
```
@ -83,7 +83,7 @@ For the @boardname@, all elements of an array must have the same type.
A helpful addition to the standard set of datatypes from JavaScript is the `enum`.
As in languages like C#, an enum is a way of giving more friendly names to sets of numeric values.
```ts
```typescript
enum Color {Red, Green, Blue}
let c: Color = Color.Green;
```
@ -92,14 +92,14 @@ By default, enums begin numbering their members starting at `0`.
You can change this by manually setting the value of one of its members.
For example, we can start the previous example at `1` instead of `0`:
```ts
```typescript
enum Color {Red = 1, Green, Blue}
let c: Color = Color.Green;
```
Or, even manually set all the values in the enum:
```ts
```typescript
enum Color {Red = 1, Green = 2, Blue = 4}
let c: Color = Color.Green;
```
@ -114,7 +114,7 @@ The TypeScript type `any` is not supported in the @boardname@.
`void` is the absence of having any type at all.
You may commonly see this as the return type of functions that do not return a value:
```ts
```typescript
function warnUser(): void {
basic.showString("This is my warning message");
}
@ -127,7 +127,7 @@ Declaring variables of type `void` is not useful.
In TypeScript, there are several places where type inference is used to provide type information when there is
no explicit type annotation. For example, in this code
```ts
```typescript
let x = 3;
let y = x + 3
```

View File

@ -1,8 +1,16 @@
# Variable Declarations
Declaring a variable should be done using the ``let`` keyworld:
```typescript
let a = 10;
```
## ``var`` vs ``let``
Declaring a variable in JavaScript has always traditionally been done with the `var` keyword.
```typescript
```typescript-ignore
var a = 10;
```

View File

@ -39,8 +39,8 @@ coll.push("cat")
## 4. Write the five (5) lines of code that will add the following five words to `data->coll`: puppy, clock, night, cat, cow.
```ts
let coll = (<string[]>[])
```typescript
let coll : string[] = [];
```
<br/>

View File

@ -3,27 +3,48 @@
You can publish libraries (also known as packages or extensions)
that users can then add to their scripts. These typically
provide a driver for a particular hardware device you can connect
to a microbit.
to a microbit.
### ~ hint
All packages need to be approved by the Micro:bit Foundation before being available in the web editor.
See **Approval** section below.
### ~
* [pxt-max6675](https://github.com/Microsoft/pxt-max6675) -- TypeScript
* [pxt-neopixel](https://github.com/Microsoft/pxt-neopixel) -- TypeScript + ARM Thumb assembly package
* [pxt-max6675](https://github.com/Microsoft/pxt-max6675) -- TypeScript
* [pxt-sonar](https://github.com/microsoft/pxt-sonar) -- TypeScript
* [pxt-i2c-fram](https://github.com/microsoft/pxt-i2c-fram) -- TypeScript
* [Sample C++ extension](https://github.com/Microsoft/pxt-microbit-cppsample)
* [Sample TypeScript extension](https://github.com/Microsoft/pxt-microbit/tree/master/libs/i2c-fram)
## Finding packages
From the editor, the user clicks on **More** then **Add Package** and searches for the package.
From the block editor, the user clicks on **Add Package** and searches for the package.
Otherwise, the **Add Package** is also available from the gearwheel menu.
To see the list of packages, click on **More** then **Show Files** to see the project file list.
To see the list of packages, switch to JavaScript and use the **Explorer** view to find them.
To remove a package, click on the garbage button in the file list next to the package.
To remove a package, click on the garbage button in the **Explorer** view next to the package.
## Publishing packages
## Publishing and Approving packages
Packages can be published from the pxt command line. Check out [the docs](https://www.pxt.io/packages).
Once your package is ready, follow these steps to get it approved and listed in the pxt.microbit.org web site:
1. setup a public GitHub repository with your package sources
2. ensure that the license is **Apache2** or **MIT**
3. fill ``test.ts`` with a test scenario
4. ensure that the package builds by running ``pxt`` from the package folder. [Read more...](https://www.pxt.io/packages).
5. fill up the ``README.md`` file with documentation. See [markdown docs](https://pxt.io/writing-docs) for syntax.
6. publish a release by running ``pxt bump`` from the package folder.
7. open a support ticket at https://support.microbit.org, add **package approval** in the subject line.
```
Package approval request
github repo: .....
```
## Localizing packages

View File

@ -62,17 +62,13 @@ Fun games to build with your @boardname@.
}]
```
## Science and Engineering
## Toys
```codecard
[{
"name": "Inchworm",
"url":"/projects/inchworm",
"imageUrl":"/static/mb/projects/inchworm.jpg"
}, {
"name": "Timing gates",
"url":"/projects/timing-gates",
"imageUrl":"/static/mb/projects/timing-gates.jpg"
}]
```
@ -80,6 +76,10 @@ Fun games to build with your @boardname@.
```codecard
[{
"name": "Timing gates",
"url":"/projects/timing-gates",
"imageUrl":"/static/mb/projects/timing-gates.jpg"
}, {
"name": "Compass",
"url":"/projects/compass",
"imageUrl":"/static/mb/projects/a5-compass.png"
@ -96,4 +96,4 @@ Fun games to build with your @boardname@.
### See Also
[Flashing Heart](/projects/flashing-heart), [Smiley Buttons](/projects/smiley-buttons), [Love Meter](/projects/love-meter), [Rock Paper Scissors](/projects/rock-paper-scissors), [Compass](/projects/compass), [Hack your headphones](/projects/hack-your-headphones), [Banana keyboard](/projects/banana-keyboard), [Telegraph](/projects/telegraph), [Radio](/projects/radio), [Guitar](/projects/guitar), [Wallet](/projects/wallet), [Watch](/projects/watch)
[Flashing Heart](/projects/flashing-heart), [Smiley Buttons](/projects/smiley-buttons), [Love Meter](/projects/love-meter), [Rock Paper Scissors](/projects/rock-paper-scissors), [Compass](/projects/compass), [Hack your headphones](/projects/hack-your-headphones), [Banana keyboard](/projects/banana-keyboard), [Telegraph](/projects/telegraph), [Radio](/projects/radio), [Guitar](/projects/guitar), [Wallet](/projects/wallet), [Watch](/projects/watch)

View File

@ -21,8 +21,8 @@ Build your own @boardname@ piano using bananas!
## Activities
* [Making the keyboard](/projects/banana-keyboard/make)
* [Beat box](/projects/banana-keyboard/beat-box)
* [Make](/projects/banana-keyboard/make)
* [Code](/projects/banana-keyboard/code)
### ~button /projects/banana-keyboard/make
Let's get started!

View File

@ -1,4 +1,4 @@
# banana keyboard - beat box
# Code
Have you ever tried to making beat box sounds? Let's try making a beatbox with code!

View File

@ -1,4 +1,4 @@
# banana keyboard - making
# Make
## Materials
@ -80,6 +80,6 @@ input.onPinPressed(TouchPin.P1, () => {
Tap your banana instrument to play sound against... the fruit!
### ~button /projects/banana-keyboard/beat-box
### ~button /projects/banana-keyboard/code
NEXT: beat box
### ~

View File

@ -0,0 +1,43 @@
# Coffee Cup Monster
### @description A monster made of cardboard that responds to light
### ~avatar avatar
Make a coffee cup monster that responds to light!
### ~
https://youtu.be/BiZLjugXMbM
## Duration
3 Activities, approx 30-45 min each based on familiarity with the coding concepts
## Materials
* 3 Coffee cup holders
* 2 Coffee cup strirer wood sticks
* Glue gun
* Scissors that can cut cardboard
* 1 @boardname@, battery holder and 2 AAA batteries
* 3 Crocodile clips
* 1 micro servo 9g SG90
* 1 paper clip
## Preparation
* [Equip the microservo with crocodile clips](/device/servo)
## Activities
* [Make](/projects/coffee-cup-monster/make)
* [Code](/projects/coffee-cup-monster/code)
* [Connect](/projects/coffee-cup-monster/connect)
### ~button /projects/coffee-cup-monster/make
Let's get started!
### ~

View File

@ -0,0 +1,29 @@
# Code
### @description code to make the coffee cup monster alive
### ~avatar avatar
Add code to open the mouth when light is detected.
### ~
## Duration: ~30 minutes
We are going to add code to open the mouth proportionally to the amount of light on the @boardname@.
In a loop, we will read the light and map it to an angle using the ``pins.map`` function.
```blocks
basic.forever(() => {
pins.servoWritePin(AnalogPin.P0, pins.map(
input.lightLevel(),
0,
255,
30,
150
))
})
```
### ~button /projects/coffee-cup-monster/connect
NEXT: Connect
### ~

View File

@ -0,0 +1,29 @@
# Connect
### ~avatar avatar
Remote control your monster with another @boardname@
### ~
## Duration: ~30 minutes
You will need 2 @boardname@ for this part. By using the radio, we can make the inchworm controlled by another @boardname@.
Download the code below to the @boardname@ on the inchworm and another "controller" @boardname@.
Whenere A is pressed, the monster will open and close it's mouth will move once.
```blocks
radio.onDataPacketReceived(({receivedNumber}) => {
pins.servoWritePin(AnalogPin.P0, 30)
basic.pause(500)
pins.servoWritePin(AnalogPin.P0, 150)
basic.pause(500)
})
input.onButtonPressed(Button.A, () => {
radio.sendNumber(0)
})
```
```package
radio
```

View File

@ -0,0 +1,25 @@
# Make
### @description Building the coffee cup monster
### ~avatar avatar
Turn a piece of coffee holders into a monster!
### ~
## Duration: ~60 minutes
## Materials
* 3 Coffee cup holders
* 2 Coffee cup strirer wood sticks
* Scissors
* glue gun or tape
* 1 paper clip
## Step 1: cardboard
TODO
### ~button /projects/coffee-cup-monster/code
NEXT: Code
### ~

View File

@ -21,7 +21,7 @@ Use pin press to switch guitar play on/off
## Blocks
```cards
var on = false
let on = false
on;
if (on) { } else {}
input.onPinPressed(TouchPin.P1, () => {})
@ -106,7 +106,7 @@ input.onPinPressed(TouchPin.P1, () => {
*Final code*
TODO: do we want to use `on = !on;` or be more direct in flipping the switch? `on = true; on = false;`
```blocks
var on = false
let on = false
basic.forever(() => {
if (on) {
music.setTempo(pins.map(Math.abs(input.acceleration(Dimension.Y)),

View File

@ -27,8 +27,8 @@ Build your own music player @boardname@ from headphones.
## Activities
* [Connect your headphone](/projects/hack-your-headphones/make)
* [Play sounds!]()
* [Make](/projects/hack-your-headphones/make)
* [Code](/projects/hack-your-headphones/code)
### ~button /projects/hack-your-headphones/make

View File

@ -1,4 +1,4 @@
# hack your headphones - music of light
# Code
### ~avatar avatar

View File

@ -1,4 +1,4 @@
# hack your headphones - making
# Make
### ~avatar avatar
@ -46,7 +46,7 @@ Using the 2nd crocodile clip, connect the second end of the crocodile clip onto
You hacked your headphones!
### ~button /projects/hack-your-headphones/music-of-light
### ~button /projects/hack-your-headphones/code
NEXT: music of light

View File

@ -1,7 +1,7 @@
# Inchworm
### @description A inchworm like robot built with the micro:bit
### @description A inchworm like robot built with the @boardname@
### ~avatar avatar
@ -27,13 +27,17 @@ https://youtu.be/BiZLjugXMbM
![Materials](/static/mb/projects/inchworm/materials.jpg)
## Preparation
* [Equip the microservo with crocodile clips](/device/servo)
## Activities
* [Servo](/projects/inchworm/servo)
* [Chassis](/projects/inchworm/chassis)
* [Make](/projects/inchworm/make)
* [Code](/projects/inchworm/code)
* [Connect](/projects/inchworm/connect)
### ~button /projects/inchworm/servo
### ~button /projects/inchworm/make
Let's get started!

View File

@ -30,23 +30,6 @@ so that the inchworm goes as fast as possible. Trying it on carpet also great he
### ~
## Step 2: radio controlled inchworm
You will need 2 @boardname@ for this part. By using the radio, we can make the inchworm controlled by another @boardname@.
Download the code below to the @boardname@ on the inchworm and another "controller" @boardname@. Whenere A is pressed, the inchworm will move once.
```blocks
radio.onDataPacketReceived(({receivedNumber}) => {
pins.servoWritePin(AnalogPin.P0, 0)
basic.pause(500)
pins.servoWritePin(AnalogPin.P0, 180)
basic.pause(500)
})
input.onButtonPressed(Button.A, () => {
radio.sendNumber(0)
})
```
```package
radio
```
### ~button /projects/inchworm/connect
NEXT: Connect
### ~

View File

@ -0,0 +1,28 @@
# Connect
### ~avatar avatar
Remote control your inchworm with another @boardname@
### ~
## Duration: ~30 minutes
You will need 2 @boardname@ for this part. By using the radio, we can make the inchworm controlled by another @boardname@.
Download the code below to the @boardname@ on the inchworm and another "controller" @boardname@. Whenere A is pressed, the inchworm will move once.
```blocks
radio.onDataPacketReceived(({receivedNumber}) => {
pins.servoWritePin(AnalogPin.P0, 0)
basic.pause(500)
pins.servoWritePin(AnalogPin.P0, 180)
basic.pause(500)
})
input.onButtonPressed(Button.A, () => {
radio.sendNumber(0)
})
```
```package
radio
```

View File

@ -1,4 +1,4 @@
# Chassis
# Make
### @description Building the cardboard inchworm
### ~avatar avatar

View File

@ -17,8 +17,8 @@ Build a telegraph between two @boardname@s to communicate with your friends!
## Activities
* [Making the circuit](/projects/telegraph/make)
* [Manual telegraph](/projects/telegraph/manual-telegraph)
* [Make](/projects/telegraph/make)
* [Code](/projects/telegraph/code)
### ~button /projects/telegraph/make
Let's get started!

View File

@ -1,4 +1,4 @@
# telegraph - manual telegraph
# Code
Let's build the code that will send a impulse while the user presses ``A``.

View File

@ -1,4 +1,4 @@
# telegraph - making
# Make
### ~avatar
@ -68,8 +68,8 @@ Using the 4th crocodile clip, connect the unattached end of the crocodile clip o
![](/static/mb/lessons/telegraph-0.png)
### ~button /projects/telegraph/manual-telegraph
### ~button /projects/telegraph/code
NEXT: manual telegraph
NEXT: Code
### ~

View File

@ -1,4 +1,4 @@
# Wallet - Code
# Code
## Simple animation

View File

@ -1,4 +1,4 @@
# Wallet - Make
# Make
### @description Maker Project for Wallet

View File

@ -4,6 +4,7 @@ Provides access to basic @boardname@ functionality.
```cards
basic.showNumber(0);
basic.showIcon(IconNames.Heart);
basic.showLeds(`
. . . . .
. . . . .
@ -24,6 +25,7 @@ basic.plotLeds(`
. . . . .
. . . . .
`);
basic.showArrow(ArrowNames.North);
basic.showAnimation(`
. . . . .
. . . . .
@ -35,6 +37,8 @@ basic.showAnimation(`
### See Also
[showNumber](/reference/basic/show-number), [showLeds](/reference/basic/show-leds), [showString](/reference/basic/show-string),
[showNumber](/reference/basic/show-number),
[showIcon](/reference/basic/show-icon),
[showLeds](/reference/basic/show-leds), [showString](/reference/basic/show-string),
[clearScreen](/reference/basic/clear-screen), [forever](/reference/basic/forever), [pause](/reference/basic/pause),
[showAnimation](/reference/basic/show-animation)

View File

@ -0,0 +1,23 @@
# Show Arrow
Shows the selected arrow on the LED screen
```sig
basic.showArrow(ArrowNames.North)
```
### Example
This program shows all eight arrows.
```blocks
for (let index = 0; index <= 7; index++) {
basic.showArrow(index)
basic.pause(300)
}
```
### See also
[showIcon](/reference/basic/show-icon),
[showLeds](/reference/basic/show-leds)

View File

@ -0,0 +1,21 @@
# Show Icon
Shows the selected icon on the LED screen
```sig
basic.showIcon(IconNames.Heart)
```
### Example
This program shows a happy face and then a sad face with the ``show icon`` function, with a one second pause in between.
```blocks
basic.showIcon(IconNames.Happy)
basic.pause(1000)
basic.showIcon(IconNames.Sad)
```
### See also
[showLeds](/reference/basic/show-leds)

View File

@ -25,7 +25,7 @@ bluetooth.advertiseUidBuffer(pins.createBuffer(16), 7, true);
* ``buffer`` - a 16 bytes buffer containing the namespace (first 10 bytes) and instance (last 6 bytes).
* ``power`` - a [number](/reference/types/number) representing the power level between 0 (short) and 7 (maximum range).
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the micro:bit should accept connections.
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the @boardname@ should accept connections.
## See Also

View File

@ -26,7 +26,7 @@ bluetooth.advertiseUid(42, 1, 7, true);
* ``namespace`` last 4 bytes of the namespace uid (6 to 9)
* ``instance`` last 4 bytes of the instance (2 to 5)
* ``power`` - a [number](/reference/types/number) representing the power level between 0 (short) and 7 (maximum range).
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the micro:bit should accept connections.
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the @boardname@ should accept connections.
## Encoding

View File

@ -25,7 +25,7 @@ bluetooth.advertiseUrl("https://pxt.microbit.org/", 7, true);
* ``url`` - a [string](/reference/types/string) containing the URL to broadcast, at most 17 characters long, excluding the protocol (eg: ``https://``) which gets encoded as 1 byte.
* ``power`` - a [number](/reference/types/number) representing the power level between 0 (short) and 7 (maximum range).
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the micro:bit should accept connections.
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the @boardname@ should accept connections.
### Example: Broadcast a secret code

View File

@ -0,0 +1,30 @@
# Set Events
Configure the type of events emitted by a given pin.
```sig
pins.setEvents(DigitalPin.P0, PinEventType.Edge);
```
### Parameters
* ``name``: The @boardname@ hardware pin to configure (``P0`` through ``P20``)
* ``type``: The type of events this pin should emit
### Example
The following example configures pin ``P0`` and then
subscribes to the rise and fall events.
```blocks
control.onEvent(control.eventSourceId(EventBusSource.MICROBIT_ID_IO_P0), control.eventValueId(EventBusValue.MICROBIT_PIN_EVT_RISE), () => {
basic.showString("Rise")
})
control.onEvent(control.eventSourceId(EventBusSource.MICROBIT_ID_IO_P0), control.eventValueId(EventBusValue.MICROBIT_PIN_EVT_FALL), () => {
basic.showString("Fall")
})
pins.setEvents(DigitalPin.P0, PinEventType.Edge)
```
**This is an advanced API.** For more information, see the
[@boardname@ runtime messageBus documentation](https://lancaster-university.github.io/microbit-docs/ubit/messageBus/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,4 +1,5 @@
{
"bluetooth.onBluetoothConnected|param|body": "Code, der ausgeführt wird, wenn eine Bluetooth-Verbindung aufgebaut wurde",
"bluetooth.uartWriteNumber": "Gibt einen numerischen Wert an die serielle",
"bluetooth.uartWriteValue": "Schreibt ein ``Namen: Wert`` Wertepaar auf die serielle Schnittstelle.",
"bluetooth.uartWriteValue|param|name": "Name des Wertestreams, z.B.: x",

View File

@ -0,0 +1,21 @@
{
"bluetooth.advertiseUid|block": "bluetooth kringkast UID|namespace (bytes 6-9)%ns|instance (bytes 2-6)%instance|med sendereffekt %power|kan tilkobles %connectable",
"bluetooth.advertiseUrl|block": "bluetooth kringkast url %url|med sendereffekt %power|kan tilkobles %connectable",
"bluetooth.onBluetoothConnected|block": "når bluetooth tilkobles",
"bluetooth.onBluetoothDisconnected|block": "når bluetooth frakobles",
"bluetooth.setTransmitPower|block": "bluetooth sett sendereffekt %power",
"bluetooth.startAccelerometerService|block": "bluetooth akselerometer-tjeneste",
"bluetooth.startButtonService|block": "bluetooth trykknapp-tjeneste",
"bluetooth.startIOPinService|block": "bluetooth digital tilkobling-tjeneste",
"bluetooth.startLEDService|block": "bluetooth LED-tjeneste",
"bluetooth.startMagnetometerService|block": "bluetooth magnetometer-tjeneste",
"bluetooth.startTemperatureService|block": "bluetooth temperatur-tjeneste",
"bluetooth.startUartService|block": "bluetooth serieport-tjeneste (UART)",
"bluetooth.stopAdvertising|block": "bluetooth stopp kringkasting",
"bluetooth.uartReadUntil|block": "bluetooth serieport|les frem til %del=serial_delimiter_conv",
"bluetooth.uartWriteNumber|block": "bluetooth serieport|skriv tall %value",
"bluetooth.uartWriteString|block": "bluetooth serieport|skriv tekst %data",
"bluetooth.uartWriteValue|block": "bluetooth serieport|skriv verdi %name|= %value",
"bluetooth|block": "bluetooth",
"{id:category}Bluetooth": "Bluetooth"
}

View File

@ -7,7 +7,8 @@
"shims.d.ts",
"bluetooth.ts",
"bluetooth.cpp",
"_locales/de/bluetooth-jsdoc-strings.json"
"_locales/de/bluetooth-jsdoc-strings.json",
"_locales/no/bluetooth-strings.json"
],
"public": true,
"dependencies": {

View File

@ -36,6 +36,7 @@
"basic.showAnimation": "Shows a sequence of LED screens as an animation.",
"basic.showAnimation|param|interval": "time in milliseconds between each redraw",
"basic.showAnimation|param|leds": "pattern of LEDs to turn on/off",
"basic.showIcon": "Draws the selected icon on the LED screen",
"basic.showLeds": "Draws an image on the LED screen.",
"basic.showLeds|param|interval": "time in milliseconds to pause after drawing",
"basic.showLeds|param|leds": "the pattern of LED to turn on/off",
@ -223,6 +224,9 @@
"pins.servoWritePin": "Writes a value to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous rotation servo, this will set the speed of the servo (with ``0`` being full-speed in one direction, ``180`` being full speed in the other, and a value near ``90`` being no movement).",
"pins.servoWritePin|param|name": "pin to write to, eg: AnalogPin.P0",
"pins.servoWritePin|param|value": "angle or rotation speed, eg:180,90,0",
"pins.setEvents": "Configures the events emitted by this pin. Events can be subscribed to\nusing ``control.onEvent()``.",
"pins.setEvents|param|name": "pin to set the event mode on, eg: DigitalPin.P0",
"pins.setEvents|param|type": "the type of events for this pin to emit, eg: PinEventType.Edge",
"pins.setPull": "Configures the pull of this pin.",
"pins.setPull|param|name": "pin to set the pull mode on, eg: DigitalPin.P0",
"pins.setPull|param|pull": "one of the mbed pull configurations, eg: PinPullMode.PullUp",

View File

@ -7,6 +7,19 @@
"AcceleratorRange.OneG|block": "1g",
"AcceleratorRange.TwoG": "The accelerator measures forces up to 2 gravity",
"AcceleratorRange.TwoG|block": "2g",
"AnalogPin.P11|block": "P11 (write only)",
"AnalogPin.P12|block": "P12 (write only)",
"AnalogPin.P13|block": "P13 (write only)",
"AnalogPin.P14|block": "P14 (write only)",
"AnalogPin.P15|block": "P15 (write only)",
"AnalogPin.P16|block": "P16 (write only)",
"AnalogPin.P19|block": "P19 (write only)",
"AnalogPin.P20|block": "P20 (write only)",
"AnalogPin.P5|block": "P5 (write only)",
"AnalogPin.P6|block": "P6 (write only)",
"AnalogPin.P7|block": "P7 (write only)",
"AnalogPin.P8|block": "P8 (write only)",
"AnalogPin.P9|block": "P9 (write only)",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Breve|block": "4",
@ -55,6 +68,46 @@
"Gesture.TiltLeft|block": "tilt left",
"Gesture.TiltRight": "Raised when the screen is pointing right",
"Gesture.TiltRight|block": "tilt right",
"IconNames.Angry|block": "angry",
"IconNames.Asleep|block": "asleep",
"IconNames.Butterfly|block": "butterfly",
"IconNames.Chessboard|block": "chess board",
"IconNames.Confused|block": "confused",
"IconNames.Cow|block": "cow",
"IconNames.Diamond|block": "diamond",
"IconNames.Duck|block": "duck",
"IconNames.EigthNote|block": "eigth note",
"IconNames.Fabulous|block": "fabulous",
"IconNames.Ghost|block": "ghost",
"IconNames.Giraffe|block": "giraffe",
"IconNames.Happy|block": "happy",
"IconNames.Heart|block": "heart",
"IconNames.House|block": "house",
"IconNames.LeftTriangle|block": "left triangle",
"IconNames.Meh|block": "meh",
"IconNames.No|block": "no",
"IconNames.Pacman|block": "pac man",
"IconNames.Pitchfork|block": "pitchfork",
"IconNames.QuarterNote|block": "quarter note",
"IconNames.Rabbit|block": "rabbit",
"IconNames.Rollerskate|block": "roller skate",
"IconNames.Sad|block": "sad",
"IconNames.Silly|block": "silly",
"IconNames.Skull|block": "skull",
"IconNames.SmallDiamond|block": "small diamond",
"IconNames.SmallHeart|block": "small heart",
"IconNames.SmallSquare|block": "small square",
"IconNames.Snake|block": "snake",
"IconNames.Square|block": "square",
"IconNames.StickFigure|block": "stick figure",
"IconNames.Surprised|block": "surprised",
"IconNames.Sword|block": "sword",
"IconNames.TShirt|block": "t-shirt",
"IconNames.Target|block": "target",
"IconNames.Tortoise|block": "tortoise",
"IconNames.Triangle|block": "triangle",
"IconNames.Umbrella|block": "umbrella",
"IconNames.Yes|block": "yes",
"LedSpriteProperty.Blink|block": "blink",
"LedSpriteProperty.Brightness|block": "brightness",
"LedSpriteProperty.Direction|block": "direction",
@ -74,6 +127,10 @@
"Note.GSharp4|block": "G#4",
"Note.GSharp5|block": "G#5",
"Note.GSharp|block": "G#",
"PinEventType.Edge|block": "edge",
"PinEventType.None|block": "none",
"PinEventType.Pulse|block": "pulse",
"PinEventType.Touch|block": "touch",
"PinPullMode.PullDown|block": "down",
"PinPullMode.PullNone|block": "none",
"PinPullMode.PullUp|block": "up",
@ -81,17 +138,16 @@
"PulseValue.Low|block": "low",
"Rotation.Pitch|block": "pitch",
"Rotation.Roll|block": "roll",
"String.charAt|block": "char from %this|at %pos",
"String.compare|block": "compare %this| to %that",
"String.concat|block": "join %this|%other",
"String.charAt|block": "char from %this=text|at %pos",
"String.compare|block": "compare %this=text| to %that",
"String.fromCharCode|block": "text from char code %code",
"String.isEmpty|block": "%this| is empty",
"String.length|block": "length of %VALUE",
"String.substr|block": "substring of %this|from %start|of length %length",
"String.substr|block": "substring of %this=text|from %start|of length %length",
"String|block": "String",
"basic.clearScreen|block": "clear screen",
"basic.forever|block": "forever",
"basic.pause|block": "pause (ms) %pause",
"basic.showIcon|block": "show icon %i",
"basic.showLeds|block": "show leds",
"basic.showNumber|block": "show|number %number",
"basic.showString|block": "show|string %text",
@ -167,6 +223,7 @@
"pins.pulseIn|block": "pulse in (µs)|pin %name|pulsed %value",
"pins.servoSetPulse|block": "servo set pulse|pin %value|to (µs) %micros",
"pins.servoWritePin|block": "servo write|pin %name|to %value",
"pins.setEvents|block": "set pin %pin|to emit %type|events",
"pins.setPull|block": "set pull|pin %pin|to %pull",
"pins.spiWrite|block": "spi write %value",
"pins|block": "pins",

View File

@ -47,6 +47,7 @@
"control": "Laufzeit- und Event-Dienstprogramme.",
"control.assert": "Wenn die Bedingung falsch ist, zeige eine Nachricht auf der seriellen Konsole und gebe Panic-Code 098 aus",
"control.deviceName": "Erzeugt einen Namen für das Gerät, basierend auf der Seriennummer",
"control.deviceSerialNumber": "Leite eine einzigartige, einheitliche Seriennummer dieses Gerätes aus den internen Daten ab.",
"control.eventSourceId": "Gibt den Wert einer C++-Laufzeitkonstanten aus",
"control.eventTimestamp": "Holt den Zeitstempel des letzten Events auf dem Bus",
"control.eventValue": "Holt den Wert des letzten ausgeführten Events auf dem Bus",
@ -186,7 +187,6 @@
"pins.spiWrite|param|value": "Daten, die an den SPI-Slave geschickt werden sollen",
"serial": "Lesen und Schreiben von Daten über eine serielle Verbindung.",
"serial.delimiters": "Gibt die mit dem Begrenzer korrespondierende Zeichenfolge aus.",
"serial.onLineReceived": "Registriert ein Event, das ausgeführt wird, wenn eine Zeile empfangen wurde",
"serial.readLine": "Liest eine Textzeile aus der seriellen Schnittstelle.",
"serial.readUntil": "Liest aus eine Textzeile aus dem seriellen Anschluss und gibt den Puffer aus, wenn die Begrenzung erreicht wurde.",
"serial.readUntil|param|delimiter": "Text-Begrenzung, die die Textblöcke voneinander trennt",

View File

@ -7,7 +7,7 @@
"AcceleratorRange.OneG|block": "1g",
"AcceleratorRange.TwoG": "Der Bewegungssensor misst Kräfte bis 2g",
"AcceleratorRange.TwoG|block": "2g",
"BaudRate.BaudRate115200|block": "11520",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Eighth|block": "1/8",
"BeatFraction.Half|block": "1/2",
@ -72,13 +72,8 @@
"PinPullMode.PullUp|block": "nach oben",
"Rotation.Pitch|block": "Winkel",
"Rotation.Roll|block": "rollen",
"String.charAt|block": "Zeichen an Position %pos aus|%this",
"String.compare|block": "vergleiche %this| mit %that",
"String.concat|block": "hänge %this| mit %other aneinander",
"String.fromCharCode|block": "Text aus char code %code",
"String.isEmpty|block": "%this| ist leer",
"String.length|block": "Länge von %VALUE",
"String.substr|block": "extrahiere aus %this|beginnend mit %start|%length Zeichen",
"String|block": "Zeichenfolge",
"basic.clearScreen|block": "Bildschirminhalt löschen",
"basic.forever|block": "dauerhaft",
@ -115,6 +110,7 @@
"input.magneticForce|block": "Magnetkraft (µT) |%NAME",
"input.onButtonPressed|block": "wenn Knopf|%NAME|gedrückt",
"input.onGesture|block": "wenn |%NAME",
"input.onPinPressed|block": "wenn Pin|%NAME|gedrückt",
"input.onPinReleased|block": "wenn Pin %NAME|losgelassen",
"input.pinIsPressed|block": "Pin %NAME|ist gedrückt",
"input.rotation|block": "Rotation (°)|%NAME",
@ -157,13 +153,13 @@
"pins.spiWrite|block": "schreibe %value in SPI",
"pins|block": "Pins",
"serial.delimiters|block": "%del",
"serial.readLine|block": "serial|read line",
"serial.readUntil|block": "serial|read until %delimiter=serial_delimiter_conv",
"serial.redirect|block": "serial|redirect to|TX %tx|RX %rx|at baud rate %rate",
"serial.writeLine|block": "serial|write line %text",
"serial.writeNumber|block": "serial|write number %value",
"serial.writeString|block": "serial|write string %text",
"serial.writeValue|block": "serial|write value %name|= %value",
"serial.readLine|block": "seriell|Zeile lesen",
"serial.readUntil|block": "seriell|lesen bis %delimiter=serial_delimiter_conv",
"serial.redirect|block": "seriell|umleiten auf|TX %tx|RX %rx|mit Baudrate %rate",
"serial.writeLine|block": "seriell|Zeile ausgeben %text",
"serial.writeNumber|block": "seriell|Zahl ausgeben %value",
"serial.writeString|block": "seriell|Zeichenkette ausgeben %text",
"serial.writeValue|block": "serial|Wert ausgeben %name|= %value",
"serial|block": "seriell",
"{id:category}Basic": "Grundlagen",
"{id:category}Control": "Steuerung",

View File

@ -1,4 +1,44 @@
{
"Gesture.LogoDown": "Déclenché lorsque le logo est vers le bas et lécran est vertical",
"Gesture.LogoDown|block": "logo vers le bas",
"Gesture.LogoUp|block": "logo vers le haut",
"Gesture.ScreenDown|block": "écran vers le bas",
"Gesture.ScreenUp|block": "écran vers le haut",
"Gesture.Shake|block": "secouer",
"Gesture.SixG|block": "6g",
"Gesture.TiltLeft|block": "incliner à gauche",
"Gesture.TiltRight|block": "incliner à droite",
"IconNames.Angry|block": "fâché",
"IconNames.Asleep|block": "endormi",
"IconNames.Butterfly|block": "papillon",
"IconNames.Chessboard|block": "échiquier",
"IconNames.Confused|block": "confus",
"IconNames.Cow|block": "vache",
"IconNames.Diamond|block": "diamant",
"IconNames.Duck|block": "canard",
"IconNames.Fabulous|block": "fabuleux",
"IconNames.Ghost|block": "fantôme",
"IconNames.Giraffe|block": "girafe",
"IconNames.Happy|block": "heureux",
"IconNames.Heart|block": "coeur",
"IconNames.House|block": "maison",
"IconNames.LeftTriangle|block": "triangle gauche",
"IconNames.Meh|block": "meh",
"IconNames.No|block": "non",
"IconNames.Pacman|block": "pac man",
"IconNames.Pitchfork|block": "pitchfork",
"IconNames.QuarterNote|block": "note",
"IconNames.Rabbit|block": "lapin",
"IconNames.Rollerskate|block": "patins à roulette",
"IconNames.Sad|block": "triste",
"IconNames.Silly|block": "bête",
"IconNames.Skull|block": "crâne",
"IconNames.SmallDiamond|block": "petit diamant",
"IconNames.SmallHeart|block": "petit coeur",
"IconNames.SmallSquare|block": "petit carré",
"IconNames.Snake|block": "serpent",
"IconNames.Square|block": "carré",
"LedSpriteProperty.Blink|block": "clignotement",
"LedSpriteProperty.Brightness|block": "luminosité",
"Math.randomBoolean|block": "choisir au hasard vrai ou faux",
"Math|block": "Maths",
@ -30,6 +70,7 @@
"input.magneticForce|block": "force magnétique (µT) |%NAME",
"input.onButtonPressed|block": "lorsque le button|%NAME|est pressé",
"input.onGesture|block": "lorsque|%NAME",
"input.onPinPressed|block": "lorsque le pin %NAME|est pressé",
"input.onPinReleased|block": "lorsque la broche %NAME|est lachée",
"input.pinIsPressed|block": "broche %NAME| est pressée",
"input.rotation|block": "rotation (°)|%NAME",

View File

@ -1,92 +1,40 @@
{
"Math.randomBoolean":"硬貨を弾くことのようなちょうど 'true' または 'false' の値をランダムに生成します。",
"String.fromCharCode":"指定された ASCII 文字コードから文字列を確認します。",
"basic":"基本的なマイクロ: ビット機能へのアクセスを提供します。",
"basic.clearScreen":"すべての Led をオフにします。",
"basic.forever":"永遠にバック グラウンドでコードを繰り返します。各イテレーションを実行するその他のコードを使用できます。",
"basic.pause":"ミリ秒で指定された時間一時停止します。",
"basic.plotLeds":"LED 画面にイメージを描画します。",
"basic.showAnimation":"アニメーションとして LED スクリーンのシーケンスを示しています。",
"basic.showLeds":"LED 画面にイメージを描画します。",
"basic.showNumber":"画面上の数字をスクロールします。数が画面上に収まる場合 (つまりは 1 桁)、スクロールしません。",
"basic.showString":"一度に 1 つの文字の表示のテキストを表示します。文字列が画面上に収まる場合 (すなわち、1 つの文字)、スクロールしません。",
"control":"ランタイムおよびイベント ユーティリティ。",
"control.inBackground":"スケジュールは、バック グラウンドで実行されるコードします。",
"control.reset":"BBC のマイクロ: ビットをリセットします。",
"game":"単一 LED スプライト ゲーム エンジン",
"game.addScore":"現在のスコアにポイントを追加します。",
"game.gameOver":"ゲーム アニメーションを表示します。",
"game.score":"現在のスコアを取得します。",
"game.setScore":"現在のスコアの値を設定します",
"game.startCountdown":"ゲームのカウント ダウン タイマーを開始します。",
"images":"作成、操作および LED の画像を表示します。",
"images.createBigImage":"2 フレームを持つイメージを作成します。",
"images.createImage":"LED 画面に合ったイメージを作成します。",
"input":"イベントやセンサーからのデータ",
"input.acceleration":"ミリ gravitys の加速度値を取得 (ボードを敷設するときフラット スクリーンを x = 0、y = 0、z = 1024年)",
"input.buttonIsPressed":"'、' と 'B' のボタンの状態 (押されてかどうか) を取得します。",
"input.calibrate":"時代遅れ、コンパス キャリブレーションは自動です。",
"input.compassHeading":"度で、現在のコンパス コンパス針路を取得します。",
"input.lightLevel":"'0 ' (暗い)「255」明るいから適用範囲内の LED スクリーン光レベルを読み取ります。",
"input.magneticForce":"「マイクロ ・ テスラ」(μ '' T '') の磁気力の値を取得します。シミュレータでは、この関数はサポートされていません。",
"input.onButtonPressed":"'、'、' B '(両方の' A + B ') ボタンが押されたときに何か",
"input.onGesture":"画面を向いているときに実行するコードをアタッチします。",
"input.onLogoDown":"ロゴは下方向とボードが垂直方向に実行されるコードをアタッチします。",
"input.onLogoUp":"ロゴは上方向きとボードが垂直方向に実行されるコードをアタッチします。",
"input.onPinPressed":"(「P0 '' や '' P1 '' 両方 '' P2 '') ピンが押されたときに何かを行います。",
"input.onScreenDown":"画面が直面しているときに実行するコードをアタッチします",
"input.onScreenUp":"画面を向いているときに実行するコードをアタッチします。",
"input.onShake":"デバイスを振るときに実行するコードをアタッチします。",
"input.pinIsPressed":"(押すか) ピンの状態を取得します。回路を閉じるために地面を保持する必要があります。",
"input.rotation":"度の 'x ' に沿って回転デバイスのピッチです。",
"input.runningTime":"電源から経過したミリ秒数を取得します。",
"input.setAccelerometerRange":"吊り下げた状態で加速度計のサンプル範囲を設定します。",
"input.temperature":"摂氏温度を取得度 (° C)。",
"led":"LED 画面を制御します。",
"led.brightness":"画面の明るさから得る 0 (オフ) 255 (完全明るい)。",
"led.fadeIn":"画面がフェードインします。",
"led.fadeOut":"画面の明るさをフェードアウトします。",
"led.plot":"オンに指定した LED を使用して x 座標と y 座標 (x は横方向、y は縦方向)。(0, 0) は左上。",
"led.plotAll":"すべての LED が点灯します。",
"led.plotBarGraph":"'値' と '高' の値に基づく垂直棒グラフを表示します。\n場合は '高' は 0、グラフを自動的に調整を取得します。",
"led.point":"使用して指定された LED のオン\/オフ状態を取得 x 座標と y 座標。(0, 0) は左上。",
"led.screenshot":"LED 画面のスクリーン ショットを取り、画像を返します。",
"led.setBrightness":"画面の明るさ 0 (オフ) に設定 255 (完全明るい)。",
"led.setDisplayMode":"黒と白とグレースケールの Led を表示するための表示モードを設定します。",
"led.stopAnimation":"現在のアニメーションをキャンセルし、保留中のアニメーション他をクリアします。",
"led.toggle":"特定のピクセルを切り替えます",
"led.toggleAll":"現在の LED ディスプレイを反転します",
"led.unplot":"指定した LED を使用してオフに x 座標と y 座標 (x は横方向、y は縦方向)。(0, 0) は左上。",
"music":"ピン「P0 '' を介して音楽の音の生成。",
"music.beat":"ビートのデュレーションをミリ秒単位で返します",
"music.changeTempoBy":"指定した量によってテンポを変更します。",
"music.noteFrequency":"ノートの頻度を取得します。",
"music.playTone":"指定された期間のピン 'P0' を通じて調子を果たしています。",
"music.rest":"かかっている (何も果たしている) ピン 'P0' により指定した時刻に。",
"music.ringTone":"ピン「P0 '' から音をを再生します。",
"music.setTempo":"テンポを一定に設定します",
"music.tempo":"1 分あたりのビートのテンポを返します。速度はテンポ (bpm = 1 分あたりのビート) ノートを遊んで。テンポの値が大きいほど、高速のノートが再生されます。",
"pins":"アナログ\/デジタル信号、サーボ、i2c、ピンで電流を制御します。",
"pins.analogPitch":"現在のピッチ端子にパルス幅変調 (PWM) 信号を出力します。'アナログ設定ピッチ pin' を使用して、ピッチのピンを定義します。",
"pins.analogReadPin":"つまり、0 から 1023年の間から成る値としてアナログ、としてコネクタ値を読み取る。",
"pins.analogSetPeriod":"アナログで与えられた値に出力のパルス幅変調 (PWM) を構成 * * マイクロ秒 * * または '' 1\/1000年ミリ秒。\nこのピンはアナログ出力 ('アナログ書き込みピン' を使用) として構成されていない場合、操作には影響がありません。",
"pins.analogSetPitchPin":"'ピン-> アナログ ピッチ' を使用するときに使用される pin を設定します。",
"pins.analogWritePin":"アナログ コネクタの値を設定します。値は、0 から 1023年の間で構成する必要があります。",
"pins.digitalReadPin":"0 または 1 のいずれかとして指定した pin またはコネクタを読む",
"pins.digitalWritePin":"0 または 1 のいずれかにピンまたはコネクタの値を設定します。",
"pins.i2cReadNumber":"7 ビット I2C アドレスから 1 つの番号を読み取る。",
"pins.i2cWriteNumber":"7 ビット I2C アドレスに 1 つの番号を書きます。",
"pins.map":"1 つの範囲から別の数字を再マップします。つまり、'から低 'の値 'に高'、値、中間などに中間値方' に ''から高' の値マッピングでしょう。",
"pins.onPulsed":"デジタル入力にこの pin を構成し、タイムスタンプがこのピンは '高' または '低' 期間のイベントを生成します。",
"pins.pulseDuration":"マイクロ秒で最後のパルスの期間を取得します。この関数は、' onPulsed ' ハンドラーから呼び出す必要があります。",
"pins.servoSetPulse":"アナログ\/pwm 出力としてこの IO ピンを構成します、20 ms にする期間を構成し、それは与えられる値に基づいて、パルス幅を設定します * * マイクロ秒 * * または '' 1\/1000年ミリ秒です。",
"pins.servoWritePin":"それに応じてシャフトを制御するサーボに値を書き込みます。標準サーボの軸をその方向に移動 (単位は度)、シャフトの角度に設定されます。連続回転サーボに、これは (' 0 ' 1 つの方向、「180」に満ちているフルスピード速度の他、と '' 90」の動きではないことに近い値であること) とサーボ スピードを設定します。",
"pins.setPull":"このピンのプルを構成します。",
"serial":"シリアル接続を介してデータを読み書きします。",
"serial.readLine":"シリアル ポートからテキスト行を読み取ります。",
"serial.redirect":"USBTX と USBRX 以外のピンを使用するシリアルのインスタンスの動的な設定。",
"serial.writeLine":"連続するテキストの行を印刷します。",
"serial.writeNumber":"連続する数値値を出力します。",
"serial.writeString":"シリアル接続を使用してテキストの一部を送信します。",
"serial.writeValue":"書き込み、「名前: 値」ペアのシリアル ライン。"
"Math.randomBoolean": "「真」か「偽」をランダムに生成します。",
"basic.clearScreen": "すべてのLEDをオフにします。",
"basic.forever": "ずっとコードをバックグラウンドで繰り返し実行します。",
"basic.pause": "ミリ秒で指定された時間、一時停止します。",
"basic.plotLeds": "LED 画面にイメージを描画します。",
"basic.showIcon": "選択されたアイコンを、LED画面に表示します。",
"basic.showLeds": "LED 画面にイメージを描画します。",
"basic.showNumber": "画面上のに数字をスクロールさせます。数が1桁で、画面上に収まる場合、スクロールしません。",
"basic.showString": "一度に1文字ずつ、テキストを画面に表示します。1文字だけの場合は、スクロールしません。",
"input.acceleration": "加速度値を取得します。スクリーンを上に向けて置いたとき、xは0、yも0、zは-1024です",
"input.buttonIsPressed": "``A`` か ``B`` のボタンが押されているかを取得します。",
"input.compassHeading": "現在の、コンパスの値を取得します。",
"input.lightLevel": "LEDスクリーンに当たる光の明るさを 0 (暗い) から 255 (明るい)の範囲で取得します。",
"input.onButtonPressed": "ボタン (``A``, ``B`` or both ``A+B``) が押されたときに実行されます。",
"input.onGesture": "ジェスチャ(例えば、ゆさぶる)が行われたときに実行します。",
"input.onPinPressed": "ピンが押されたときに実行されます。",
"input.onPinReleased": "ピンがタッチされなくなったときに実行されます。",
"input.pinIsPressed": "ピンがタッチされているかの状態を取得します。状態を取得するためには、グラウンドにつながっている必要があります。",
"input.rotation": "デバイスの、ピッチかロールを度数で取得します",
"input.runningTime": "電源が入ってから経過したミリ秒数を取得します。",
"input.temperature": "摂氏で、温度を取得します。",
"led.brightness": "画面の明るさを 0 (オフ) 255 (フルに明るい)の範囲で取得します。",
"led.enable": "画面を表示、または非表示にします。",
"led.plot": "X、Y座標で指定したLEDを点灯します。(0, 0)が左上です。",
"led.point": "X、Y座標で指定されたLEDの、ON/OFFの状態を取得します。(0,0)が左上です。",
"led.setBrightness": "画面の明るさを 0 (オフ) 255 (フルに明るい)の範囲で設定します。",
"led.stopAnimation": "現在のアニメーションをキャンセルし、保留中のアニメーションもクリアします。",
"led.toggle": "指定された場所のLEDの点滅を切り替えます。",
"led.unplot": "X、Y座標で指定された場所のLEDを消灯します。(0, 0) は左上です。",
"music.beat": "拍の長さをミリ秒で返します",
"music.changeTempoBy": "テンポを指定した数だけ増減します。",
"music.playTone": "指定された長さの間、``P0``から音を鳴らします。",
"music.rest": "``P0`` から、指定された時間だけ音を鳴らさない様にします。",
"music.rest|param|ms": "残り時間(ミリ秒)",
"music.ringTone": "ピン``P0`` から音をを再生します。",
"music.setTempo": "テンポを設定します",
"music.tempo": "現在のテンポを、bpm (1分間あたりの拍の数)で返します。テンポの値が大きくなると、より早く音楽が再生されます。",
"serial.readLine": "シリアルポートからテキストを読み取ります。"
}

View File

@ -20,6 +20,13 @@
"Delimiters.Dollar|block": "$",
"Delimiters.Hash|block": "#",
"Delimiters.NewLine|block": "改行",
"Dimension.X|block": "X",
"Dimension.Y|block": "Y",
"Dimension.Z|block": "Z",
"Direction.Left|block": "左",
"Direction.Right|block": "右",
"DisplayMode.BackAndWhite|block": "白黒",
"DisplayMode.Greyscale|block": "グレースケール",
"Gesture.EightG": "8Gの衝撃があったときに発生します。",
"Gesture.EightG|block": "8G",
"Gesture.FreeFall": "ボードを落としたときに発生します。",
@ -42,19 +49,72 @@
"Gesture.TiltLeft|block": "左に傾けた",
"Gesture.TiltRight": "画面を右に傾けたときに発生します。",
"Gesture.TiltRight|block": "右に傾けた",
"IconNames.Angry|block": "おこり顔",
"IconNames.Asleep|block": "ねてる顔",
"IconNames.Butterfly|block": "ちょうちょ",
"IconNames.Chessboard|block": "チェス盤",
"IconNames.Confused|block": "こまり顔",
"IconNames.Cow|block": "うし",
"IconNames.Diamond|block": "ダイアモンド",
"IconNames.Duck|block": "あひる",
"IconNames.EigthNote|block": "8分音符",
"IconNames.Ghost|block": "おばけ",
"IconNames.Giraffe|block": "きりん",
"IconNames.Happy|block": "うれしい顔",
"IconNames.Heart|block": "ハート",
"IconNames.House|block": "家",
"IconNames.Pacman|block": "パックマン",
"IconNames.Pitchfork|block": "くまで",
"IconNames.QuarterNote|block": "4分音符",
"IconNames.Rabbit|block": "うさぎ",
"IconNames.Rollerskate|block": "ローラースケート",
"IconNames.Sad|block": "かなしい顔",
"IconNames.Silly|block": "へん顔",
"IconNames.Skull|block": "がいこつ",
"IconNames.SmallDiamond|block": "小さいダイアモンド",
"IconNames.SmallHeart|block": "小さいハート",
"IconNames.SmallSquare|block": "小さいしかく",
"IconNames.Snake|block": "へび",
"IconNames.Square|block": "しかく",
"IconNames.Surprised|block": "びっくり顔",
"IconNames.TShirt|block": "Tシャツ",
"IconNames.Target|block": "まと",
"IconNames.Tortoise|block": "かめ",
"IconNames.Triangle|block": "さんかく",
"IconNames.Umbrella|block": "かさ",
"LedSpriteProperty.Blink|block": "点滅",
"LedSpriteProperty.Brightness|block": "明るさ",
"LedSpriteProperty.Direction|block": "方向",
"LedSpriteProperty.X|block": "X",
"LedSpriteProperty.Y|block": "Y",
"Math.randomBoolean|block": "真または偽をランダムに選ぶ",
"Math|block": "計算",
"Note.CSharp3|block": "C#3",
"Note.CSharp4|block": "C#4",
"Note.CSharp5|block": "C#5",
"Note.CSharp|block": "C#",
"Note.FSharp3|block": "F#3",
"Note.FSharp4|block": "F#4",
"Note.FSharp5|block": "F#5",
"Note.FSharp|block": "F#",
"Note.GSharp3|block": "G#3",
"Note.GSharp4|block": "G#4",
"Note.GSharp5|block": "G#5",
"Note.GSharp|block": "G#",
"PinPullMode.PullDown|block": "プルダウン",
"PinPullMode.PullUp|block": "プルアップ",
"String.fromCharCode|block": "文字コード %code|の文字",
"basic.clearScreen|block": "表示を消す",
"basic.forever|block": "ずっと",
"basic.pause|block": "ひと休み(ミリ秒) %pause",
"basic.pause|block": "一時停止(ミリ秒) %pause",
"basic.showIcon|block": "アイコン %i を表示",
"basic.showLeds|block": "LEDに表示",
"basic.showNumber|block": "数を表示|%number",
"basic.showString|block": "文字列を表示|%text",
"basic|block": "基本",
"control.inBackground|block": "バックグラウンドで実行する",
"control.reset|block": "リセット",
"control.waitMicros|block": "ひと休み(マイクロ秒) %micros",
"control|block": "制御",
"game.gameOver|block": "ゲームオーバー",
"game|block": "ゲーム",
@ -62,6 +122,12 @@
"images.createImage|block": "画像を作成",
"images|block": "画像",
"input.acceleration|block": "加速度ミリG|%NAME",
"input.buttonIsPressed|block": "ボタン|%NAME|が押されている",
"input.compassHeading|block": "方角(°)",
"input.lightLevel|block": "明るさ",
"input.magneticForce|block": "磁力µT|%NAME",
"input.onButtonPressed|block": "ボタン|%NAME|が押されたとき",
"input.onGesture|block": "%NAME|とき",
"input.onPinPressed|block": "端子 %name|がタッチされたとき",
"input.onPinReleased|block": "端子 %NAME|がタッチされなくなったとき",
"input.pinIsPressed|block": "端子 %NAME|がタッチされている",
@ -72,11 +138,28 @@
"led.brightness|block": "明るさ",
"led.enable|block": "表示をオンまたはオフにする %on",
"led.plot|block": "点灯|x %x|y %y",
"led.point|block": "点灯しているか|x %x|y %y",
"led.setBrightness|block": "明るさを設定する %value",
"led.stopAnimation|block": "アニメーションを停止",
"led.toggle|block": "反転|x %x|y %y",
"led.unplot|block": "消灯|x %x|y %y",
"led|block": "LED",
"music.beat|block": "%fraction|拍",
"music.changeTempoBy|block": "テンポを増減するbpm|%value",
"music.playTone|block": "音 %note=device_note|を %duration=device_beat|拍の間鳴らす",
"music.rest|block": "休符(ミリ秒)|%duration=device_beat",
"music.ringTone|block": "音を鳴らすHz|%note=device_note",
"music.setTempo|block": "テンポを設定するbpm|%value",
"music.tempo|block": "テンポbpm",
"music|block": "音楽",
"{id:category}Basic": "基本",
"{id:category}Control": "制御",
"{id:category}Game": "ゲーム",
"{id:category}Images": "画像",
"{id:category}Input": "入力",
"{id:category}Led": "LED",
"{id:category}Math": "計算"
"{id:category}Math": "計算",
"{id:category}Music": "音楽",
"{id:category}Pins": "入出力端子",
"{id:category}Serial": "シリアル通信"
}

View File

@ -5,5 +5,45 @@
"Math.randomBoolean": "Gir en tilfeldig logisk verdi, \"sann\" eller \"usann\".",
"String.fromCharCode": "Lag en tekst som består av tegnet med den angitte ASCII-koden.",
"basic": "Blokker for grunnleggende mikro:bit-funksjonalitet.",
"basic.clearScreen": "Slå av alle lysene på skjermen"
"basic.clearScreen": "Slå av alle lysene på skjermen",
"basic.forever": "Gjentar denne koden hele tiden, i bakgrunnen. Lar annen kode kjøre etter hver gjentakelse.",
"basic.pause": "Gjør at programmet venter en angitt tid, i millisekunder",
"basic.pause|param|ms": "hvor lenge pausen skal vare, f.eks: 100, 200, 500, 1000, 2000",
"basic.plotLeds": "Tegner et bilde på skjermen.",
"basic.plotLeds|param|leds": "mønster av lysdioder som er på",
"basic.showAnimation": "Viser en sekvens av bilder som en animasjon.",
"basic.showAnimation|param|interval": "tid i millisekunder mellom hver gang skjermbildet tegnes",
"basic.showAnimation|param|leds": "mønster av lysdioder som er på",
"basic.showLeds": "Tegner et bilde på skjermen.",
"basic.showLeds|param|interval": "pause i millisekunder etter visning",
"basic.showLeds|param|leds": "mønsteret som skal vises med lysdiodene",
"basic.showNumber": "Vis et tall, rullende over skjermen. Hvis tallet får plass på skjermen (dvs. er ett enkelt siffer), ruller det ikke.",
"basic.showNumber|param|interval": "farten til det som ruller over skjermen; f.eks: 150, 100, 200, -100",
"basic.showString": "Vis en tekst rullende over skjermen. Hvis strengen har bare ett tegn ruller den ikke.",
"basic.showString|param|interval": "hvor fort teksten skal rulle, f.eks: 150, 100, 200, -100",
"basic.showString|param|text": "teksten som ruller over skjermen, f.eks: \"Hallo!\"",
"control": "Styrer programkjøring og hendelser.",
"control.inBackground": "Setter opp kode som skal kjøre i bakgrunnen.",
"control.reset": "Tilbakestiller micro:bit.",
"game": "En spillmotor for brikker (bevegelige lyspunkter)",
"game.addScore": "Øker poengsum med et antall poeng",
"game.addScore|param|points": "endring i antall poeng, f.eks. 1",
"game.gameOver": "Animasjon som viser at spillet er slutt.",
"game.score": "Gir nåværende poengsum",
"game.setScore": "Setter poengsum til en verdi, f.eks. 0",
"game.startCountdown": "Starter en nedtellingsklokke",
"game.startCountdown|param|ms": "nedtellingens varighet i millisekunder, f.eks. 10000",
"images": "Oppretting, behandling og visning av bilder på skjermen.",
"images.createBigImage": "Lager et bredt bilde som kan rulles over skjermen.",
"images.createImage": "Lager et bilde.",
"input": "Hendelser og data fra sensorer",
"input.rotation": "Helningsvinkel til micro:bit: Rotasjon om x-aksen (høyre/venstre) og y-aksen (forover/bakover), i grader.",
"input.runningTime": "Gir antall millisekunder siden strømmen ble slått på.",
"input.setAccelerometerRange": "Angir måleområde og følsomhet for akselerometeret.",
"input.setAccelerometerRange|param|range": "tallet angir den største akselerasjonen som måles",
"input.temperature": "Gir temperaturen i grader celsius.",
"led": "Styring av skjermen.",
"led.brightness": "Gir skjermens lysstyrke fra 0 (av) til 255 (full styrke).",
"led.fadeIn": "Tenner skjermen gradvis.",
"led.fadeOut": "Slukker skjermen gradvis."
}

View File

@ -1,3 +1,240 @@
{
"serial|block": "føljetong"
"AcceleratorRange.EightG": "Akselerometerets måleområde er opp til 8 ganger tyngekraften",
"AcceleratorRange.EightG|block": "8 G",
"AcceleratorRange.FourG": "Akselerometerets måleområde er opp til 4 ganger tyngekraften",
"AcceleratorRange.FourG|block": "4 g",
"AcceleratorRange.OneG": "Akselerometerets måleområde er opp til 1 ganger tyngekraften",
"AcceleratorRange.OneG|block": "1 g",
"AcceleratorRange.TwoG": "Akselerometerets måleområde er opp til 2 ganger tyngekraften",
"AcceleratorRange.TwoG|block": "2 g",
"AnalogPin.P11|block": "P11 (bare utgang)",
"AnalogPin.P12|block": "P12 (bare utgang)",
"AnalogPin.P13|block": "P13 (bare utgang)",
"AnalogPin.P14|block": "P14 (bare utgang)",
"AnalogPin.P15|block": "P15 (bare utgang)",
"AnalogPin.P16|block": "P16 (bare utgang)",
"AnalogPin.P19|block": "P19 (bare utgang)",
"AnalogPin.P20|block": "P20 (bare utgang)",
"AnalogPin.P5|block": "P5 (bare utgang)",
"AnalogPin.P6|block": "P6 (bare utgang)",
"AnalogPin.P7|block": "P7 (bare utgang)",
"AnalogPin.P8|block": "P8 (bare utgang)",
"AnalogPin.P9|block": "P9 (bare utgang)",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Breve|block": "4",
"BeatFraction.Double|block": "2",
"BeatFraction.Eighth|block": "1/8",
"BeatFraction.Half|block": "1/2",
"BeatFraction.Quarter|block": "1/4",
"BeatFraction.Sixteenth|block": "1/16",
"BeatFraction.Whole|block": "1",
"Button.AB|block": "A+B",
"Delimiters.Colon|block": ":",
"Delimiters.Comma|block": ",",
"Delimiters.Dollar|block": "$",
"Delimiters.Fullstop|block": ".",
"Delimiters.Hash|block": "#",
"Delimiters.NewLine|block": "linjeskift",
"Dimension.Strength|block": "styrke",
"Dimension.X|block": "x",
"Dimension.Y|block": "y",
"Dimension.Z|block": "z",
"Direction.Left|block": "venstre",
"Direction.Right|block": "høyre",
"DisplayMode.BackAndWhite|block": "svart og hvitt",
"DisplayMode.Greyscale|block": "gråtone",
"EventCreationMode.CreateAndFire": "En hendelse opprettes og den tilhørende hendelsesbehandleren startes. (Må ikke brukes inne i et interrupt.)",
"EventCreationMode.CreateOnly": "En hendelse opprettes, men behandling av hendelsen startes ikke.",
"Gesture.EightG": "Hendelse når et støt på over 8G detekteres",
"Gesture.EightG|block": "8 G",
"Gesture.FreeFall": "Hendelse når micro:bit faller!",
"Gesture.FreeFall|block": "fritt fall",
"Gesture.LogoDown": "Hendelse når logoen er ned og skjermen er vertikal",
"Gesture.LogoDown|block": "logo ned",
"Gesture.LogoUp": "Hendelse når logoen er opp og skjermen er vertikal",
"Gesture.LogoUp|block": "logo opp",
"Gesture.ScreenDown": "Hendelse når micro:bit ligger flatt med skjermen opp",
"Gesture.ScreenDown|block": "skjerm ned",
"Gesture.ScreenUp": "Hendelse når micro:bit ligger flatt med skjermen ned",
"Gesture.ScreenUp|block": "skjerm opp",
"Gesture.Shake": "Hendelse når micro:bit ristes",
"Gesture.Shake|block": "ristes",
"Gesture.SixG": "Hendelse når et støt sterkere enn 6G detekteres",
"Gesture.SixG|block": "6G",
"Gesture.ThreeG": "Hendelse når et støt sterkere enn 3G detekteres",
"Gesture.ThreeG|block": "3G",
"Gesture.TiltLeft": "Hendelse når skjermen vender mot venstre",
"Gesture.TiltLeft|block": "helning venstre",
"Gesture.TiltRight": "Hendelse når skjermen vender mot høyre",
"Gesture.TiltRight|block": "helning høyre",
"IconNames.Angry|block": "sint",
"IconNames.Asleep|block": "sover",
"IconNames.Butterfly|block": "sommerfugl",
"IconNames.Chessboard|block": "sjakkbrett",
"IconNames.Confused|block": "forvirret",
"IconNames.Cow|block": "ku",
"IconNames.Diamond|block": "diamant",
"IconNames.Duck|block": "and",
"IconNames.EigthNote|block": "8-dels note",
"IconNames.Fabulous|block": "fantastisk",
"IconNames.Ghost|block": "spøkelse",
"IconNames.Giraffe|block": "giraff",
"IconNames.Happy|block": "glad",
"IconNames.Heart|block": "hjerte",
"IconNames.House|block": "hus",
"IconNames.LeftTriangle|block": "triangel venstre",
"IconNames.Meh|block": "meh",
"IconNames.No|block": "nei",
"IconNames.Pacman|block": "pac man",
"IconNames.Pitchfork|block": "gaffel",
"IconNames.QuarterNote|block": "4-dels note",
"IconNames.Rabbit|block": "kanin",
"IconNames.Rollerskate|block": "rulleskøyte",
"IconNames.Sad|block": "trist",
"IconNames.Silly|block": "tull",
"IconNames.Skull|block": "skalle",
"IconNames.SmallDiamond|block": "liten diamant",
"IconNames.SmallHeart|block": "lite hjerte",
"IconNames.SmallSquare|block": "liten firkant",
"IconNames.Snake|block": "slange",
"IconNames.Square|block": "firkant",
"IconNames.StickFigure|block": "strekmann",
"IconNames.Surprised|block": "overrasket",
"IconNames.Sword|block": "sverd",
"IconNames.TShirt|block": "t-skjorte",
"IconNames.Target|block": "blink",
"IconNames.Tortoise|block": "skilpadde",
"IconNames.Triangle|block": "trekant",
"IconNames.Umbrella|block": "paraply",
"IconNames.Yes|block": "ja",
"LedSpriteProperty.Blink|block": "blinke",
"LedSpriteProperty.Brightness|block": "lysstyrke",
"LedSpriteProperty.Direction|block": "retning",
"LedSpriteProperty.X|block": "x",
"LedSpriteProperty.Y|block": "y",
"Math.randomBoolean|block": "velg tilfeldig sann eller usann",
"Math|block": "Matematikk",
"Note.CSharp3|block": "C#3",
"Note.CSharp4|block": "C#4",
"Note.CSharp5|block": "C#5",
"Note.CSharp|block": "C#",
"Note.FSharp3|block": "F#3",
"Note.FSharp4|block": "F#4",
"Note.FSharp5|block": "F#5",
"Note.FSharp|block": "F#",
"Note.GSharp3|block": "G#3",
"Note.GSharp4|block": "G#4",
"Note.GSharp5|block": "G#5",
"Note.GSharp|block": "G#",
"PinEventType.Edge|block": "kant",
"PinEventType.None|block": "ingen",
"PinEventType.Pulse|block": "puls",
"PinEventType.Touch|block": "berøring",
"PinPullMode.PullDown|block": "lav",
"PinPullMode.PullNone|block": "ingen",
"PinPullMode.PullUp|block": "høy",
"PulseValue.High|block": "høy",
"PulseValue.Low|block": "lav",
"Rotation.Pitch|block": "vinkel forover-bakover",
"Rotation.Roll|block": "vinkel høyre-venstre",
"String.charAt|block": "tegn fra %this=text|posisjon %pos",
"String.compare|block": "sammenlign %this=text| med %that",
"String.fromCharCode|block": "tekst fra tegnverdi %code",
"String.substr|block": "del av %this=text|fra posisjon %start|med lengde %length",
"String|block": "Tekst",
"basic.clearScreen|block": "tøm skjermen",
"basic.forever|block": "gjenta for alltid",
"basic.pause|block": "pause (ms) %pause",
"basic.showIcon|block": "vis ikon %i",
"basic.showLeds|block": "vis bilde",
"basic.showNumber|block": "vis|tall %number",
"basic.showString|block": "vis|tekst %text",
"basic|block": "grunnleggende",
"control.inBackground|block": "kjør i bakgrunnen",
"control.reset|block": "tilbakestill",
"control.waitMicros|block": "vent (µs) %micros",
"control|block": "kontroll",
"game.addScore|block": "endre poengsum med|%points",
"game.gameOver|block": "game over",
"game.score|block": "poengsum",
"game.setScore|block": "sett poengsum til %points",
"game.startCountdown|block": "start nedtelling|(ms) %duration",
"game|block": "spill",
"images.createBigImage|block": "lag stort bilde",
"images.createImage|block": "lag bilde",
"images|block": "bilder",
"input.acceleration|block": "akselerasjon (mG) |%NAME",
"input.buttonIsPressed|block": "knapp|%NAME|trykkes",
"input.compassHeading|block": "kompassretning (°)",
"input.lightLevel|block": "lysnivå",
"input.magneticForce|block": "magnetfelt (µT)|%NAME",
"input.onButtonPressed|block": "når knapp|%NAME|trykkes",
"input.onGesture|block": "når |%NAME",
"input.onPinPressed|block": "når kontakt %name|trykkes",
"input.onPinReleased|block": "når kontakt %NAME|slippes",
"input.pinIsPressed|block": "kontakt %NAME|trykkes",
"input.rotation|block": "helningsvinkel (°)|%NAME",
"input.runningTime|block": "kjøretid (ms)",
"input.setAccelerometerRange|block": "sett akselerometer|maks. %range",
"input.temperature|block": "temperatur (°C)",
"input|block": "inngang",
"led.brightness|block": "lysstyrke",
"led.enable|block": "skjerm på %on",
"led.plotBarGraph|block": "søylediagram av %value |opp til %high",
"led.plot|block": "tenn|x %x|y %y",
"led.point|block": "lyser i|x %x|y %y",
"led.setBrightness|block": "sett lysstyrke %value",
"led.stopAnimation|block": "stopp animasjon",
"led.toggle|block": "bytt|x %x|y %y",
"led.unplot|block": "slukk|x %x|y %y",
"led|block": "LED",
"music.beat|block": "%fraction|takt",
"music.changeTempoBy|block": "endre tempo med (bpm)|%value",
"music.noteFrequency|block": "%note",
"music.playTone|block": "spill|tone %note=device_note|i %duration=device_beat",
"music.rest|block": "pause (ms) |%duration = device_beat",
"music.ringTone|block": "ring tone (Hz)|%note=device_note",
"music.setTempo|block": "sett tempo til (bpm)|%value",
"music.tempo|block": "tempo (bpm)",
"music|block": "musikk",
"pins.analogPitch|block": "analog tone %frequency|i (ms) %ms",
"pins.analogReadPin|block": "les analogverdi|fra %name",
"pins.analogSetPeriod|block": "analog sett periodetid|på %pin|til (µs) %micros",
"pins.analogSetPitchPin|block": "analog tone kontakt %name",
"pins.analogWritePin|block": "skriv analog|til %name|verdi %value",
"pins.digitalReadPin|block": "les digitalverdi|fra %name",
"pins.digitalWritePin|block": "skriv digital|til %name|verdi %value",
"pins.i2cReadNumber|block": "I2C les tall|fra adresse %address|med format %format = i2c_sizeof",
"pins.i2cWriteNumber|block": "I2C skriv tall|til adresse %address|verdi % value|med format %format = i2c_sizeof",
"pins.map|block": "regn om %value|fra lav %fromLow|fra høy %fromHigh|til lav %toLow|til høy %toHigh",
"pins.onPulsed|block": "når|%pin|mottar puls %pulse",
"pins.pulseDuration|block": "pulslengde (µs)",
"pins.servoSetPulse|block": "servo skriv pulslengde|på %value|til (µs) %micros",
"pins.servoWritePin|block": "servo skriv|til %name|verdi %value",
"pins.setEvents|block": "la kontakt %pin|lage %type|-hendelser",
"pins.setPull|block": "sett utilkoblet verdi|for %pin|til %pull",
"pins.spiWrite|block": "SPI skriv %value",
"pins|block": "tilkoblinger",
"serial.onDataReceived|block": "når serieport|mottar %delimiters=serial_delimiter_conv",
"serial.readLine|block": "serieport|les linje",
"serial.readString|block": "serieport|les tekst",
"serial.readUntil|block": "serieport|les fram til %delimiter=serial_delimiter_conv",
"serial.redirect|block": "sett serieport|tilkobling|send %tx| motta %rx|med hastighet %rate",
"serial.writeLine|block": "serieport|skriv linje %text",
"serial.writeNumber|block": "serieport|skriv tall %value",
"serial.writeString|block": "serieport|skriv tekst %text",
"serial.writeValue|block": "serieport|skriv verdi %name|= %value",
"serial|block": "føljetong",
"{id:category}Basic": "Basis",
"{id:category}Control": "Styring",
"{id:category}Game": "Spill",
"{id:category}Images": "Bilder",
"{id:category}Input": "Inndata",
"{id:category}Led": "Skjerm",
"{id:category}Math": "Matematikk",
"{id:category}Music": "Musikk",
"{id:category}Pins": "Tilkobling",
"{id:category}Serial": "Serieport",
"{id:category}String": "Tekst"
}

View File

@ -0,0 +1,6 @@
{
"Math.randomBoolean": "සත්‍යය හෝ අසත්‍යය අගයන් අහඹු ලෙස ලැබෙනවා. කාසියක් උඩ දාපුවම ලැබෙන අගයන් දෙක වගේ.",
"String.fromCharCode": "දෙන ලද ASCII අක්ෂර කේතයෙන් වචනයක් සකසන්න.",
"basic": "මුලික micro:bit අංග වලට ප්‍රවේශ වීමට ඉඩ කඩ ලබා දෙයි.",
"basic.clearScreen": "සියලුම LEDs නිවා දමන්න"
}

View File

@ -0,0 +1,177 @@
{
"AcceleratorRange.EightG": "ත්වරකය ගුරුත්වය 8ක් වන තෙක් මිනුම් ලබා ගනියි",
"AcceleratorRange.EightG|block": "8g",
"AcceleratorRange.FourG": "ත්වරකය ගුරුත්වය 4ක් වන තෙක් මිනුම් ලබා ගනියි",
"AcceleratorRange.FourG|block": "4g",
"AcceleratorRange.OneG": "ත්වරකය ගුරුත්වය 1ක් වන තෙක් මිනුම් ලබා ගනියි",
"AcceleratorRange.OneG|block": "1g",
"AcceleratorRange.TwoG": "ත්වරකය ගුරුත්වය 2ක් වන තෙක් මිනුම් ලබා ගනියි",
"AcceleratorRange.TwoG|block": "2g",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Breve|block": "4",
"BeatFraction.Double|block": "2",
"BeatFraction.Eighth|block": "1/8",
"BeatFraction.Half|block": "1/2",
"BeatFraction.Quarter|block": "1/4",
"BeatFraction.Sixteenth|block": "1/16",
"BeatFraction.Whole|block": "1",
"Button.AB|block": "A+B",
"Delimiters.Dollar|block": "$",
"Delimiters.Hash|block": "#",
"Delimiters.NewLine|block": "නව පෙළ",
"Dimension.Strength|block": "ප්‍රබලතාව",
"Dimension.X|block": "x",
"Dimension.Y|block": "y",
"Dimension.Z|block": "z",
"Direction.Left|block": "වම",
"Direction.Right|block": "දකුණ",
"DisplayMode.BackAndWhite|block": "කළු සහ සුදු",
"DisplayMode.Greyscale|block": "greyscale",
"EventCreationMode.CreateAndFire": "MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).",
"EventCreationMode.CreateOnly": "MicroBitEvent is initialised, and no further processing takes place.",
"Gesture.EightG": "Raised when a 8G shock is detected",
"Gesture.EightG|block": "8g",
"Gesture.FreeFall": "පුවරුව වැටෙන විට ඇති කරන්න!",
"Gesture.FreeFall|block": "නිදහස් වැටීම",
"Gesture.LogoDown": "සංකේතය යටි අතට ඇති විට සහ තිරය සිරස්ව පිහිටි විට ඇති කරන්න",
"Gesture.LogoDown|block": "ලාංඡනය පහළට",
"Gesture.LogoUp": "සංකේතය උඩු අතට ඇති විට සහ තිරය සිරස්ව පිහිටි විට ඇති කරන්න",
"Gesture.LogoUp|block": "ලාංඡනය ඉහලට",
"Gesture.ScreenDown": "තිරය ඉහලට යොමු වී ඇති විට සහ පුවරුව තිරස්ව ඇති විට ඇති කරන්න",
"Gesture.ScreenDown|block": "තිරය පහලට",
"Gesture.ScreenUp": "තිරය පහලට යොමු වී ඇති විට සහ පුවරුව තිරස්ව ඇති විට ඇති කරන්න",
"Gesture.ScreenUp|block": "තිරය ඉහලට",
"Gesture.Shake": "සෙලවුන විට ඇති කරන්න",
"Gesture.Shake|block": "සොලවන්න",
"Gesture.SixG": "6G කම්පනයක් අනාවරණය වූ විට ඇති කරන්න",
"Gesture.SixG|block": "6g",
"Gesture.ThreeG": "3G කම්පනයක් අනාවරණය වූ විට ඇති කරන්න",
"Gesture.ThreeG|block": "3g",
"Gesture.TiltLeft": "තිරය වමට යොමු වී ඇති විට ඇති කරන්න",
"Gesture.TiltLeft|block": "වමට ඇල කරන්න",
"Gesture.TiltRight": "තිරය දකුණට යොමු වී ඇති විට ඇති කරන්න",
"Gesture.TiltRight|block": "දකුණට ඇල කරන්න",
"LedSpriteProperty.Blink|block": "බබලනවා",
"LedSpriteProperty.Brightness|block": "දීප්තිමත් බව",
"LedSpriteProperty.Direction|block": "දිශාව",
"LedSpriteProperty.X|block": "x",
"LedSpriteProperty.Y|block": "y",
"Math.randomBoolean|block": "අහඹු ලෙස සත්‍යය හෝ අසත්‍යය තෝරන්න",
"Math|block": "ගණිත",
"Note.CSharp3|block": "C#3",
"Note.CSharp4|block": "C#4",
"Note.CSharp5|block": "C#5",
"Note.CSharp|block": "C#",
"Note.FSharp3|block": "F#3",
"Note.FSharp4|block": "F#4",
"Note.FSharp5|block": "F#5",
"Note.FSharp|block": "F#",
"Note.GSharp3|block": "G#3",
"Note.GSharp4|block": "G#4",
"Note.GSharp5|block": "G#5",
"Note.GSharp|block": "G#",
"PinEventType.Edge|block": "අයින",
"PinEventType.Pulse|block": "ස්පන්දන",
"PinEventType.Touch|block": "ස්පර්ශ",
"PinPullMode.PullDown|block": "පහළ",
"PinPullMode.PullUp|block": "ඉහල",
"PulseValue.High|block": "උසස්",
"PulseValue.Low|block": "අඩු",
"Rotation.Pitch|block": "pitch",
"Rotation.Roll|block": "roll",
"String.fromCharCode|block": "text from char code %code",
"String|block": "String",
"basic.clearScreen|block": "තිරය පැහැදිලි කරන්න",
"basic.forever|block": "සදහටම",
"basic.pause|block": "pause (ms) %pause",
"basic.showLeds|block": "led පෙන්වන්න",
"basic.showNumber|block": "පෙන්වන්න|අංකය %number",
"basic.showString|block": "show|string %text",
"basic|block": "මූලික",
"control.inBackground|block": "පසුබිම තුල ධාවනය කරන්න",
"control.reset|block": "යලි පිහිටුවන්න",
"control.waitMicros|block": "wait (µs)%micros",
"control|block": "පාලනය",
"game.addScore|block": "change score by|%points",
"game.gameOver|block": "ක්‍රීඩාව අවසන්",
"game.score|block": "ලකුණු",
"game.setScore|block": "ලකුණු %points සකසන්න",
"game.startCountdown|block": "ගණනය ආරම්භ කරන්න |(ms) %duration",
"game|block": "ක්‍රීඩාව",
"images.createBigImage|block": "පින්තූර සකසන්න",
"images.createImage|block": "පින්තූර සකසන්න",
"images|block": "පින්තූර",
"input.acceleration|block": "ත්වරණය (mg)|%NAME",
"input.buttonIsPressed|block": "බොත්තම |%NAME| එබිලද",
"input.compassHeading|block": "මාලිමා ශීර්ෂය (°)",
"input.lightLevel|block": "ආලෝක තත්වය",
"input.magneticForce|block": "චුම්බක බලය (µT)|%NAME",
"input.onButtonPressed|block": "on button|%NAME|pressed",
"input.onGesture|block": "on |%NAME",
"input.onPinPressed|block": "on pin %name|pressed",
"input.onPinReleased|block": "on pin %NAME|released",
"input.pinIsPressed|block": "pin %NAME|is pressed",
"input.rotation|block": "භ්‍රමනය (°)|%NAME",
"input.runningTime|block": "දුවන කාලය (ms)",
"input.setAccelerometerRange|block": "ත්වරණමානය සකසන්න |range %range",
"input.temperature|block": "උෂ්ණත්වය (°C)",
"input|block": "ආදානය",
"led.brightness|block": "දීප්තිමත් බව",
"led.enable|block": "led enable %on",
"led.plotBarGraph|block": "plot bar graph of %value |up to %high",
"led.plot|block": "plot|x %x|y %y",
"led.point|block": "point|x %x|y %y",
"led.setBrightness|block": "බැබලීම සකසන්න %value",
"led.stopAnimation|block": "සජීවීකරණ නතර කරන්න",
"led.toggle|block": "toggle|x %x|y %y",
"led.unplot|block": "unplot|x %x|y %y",
"led|block": "led",
"music.beat|block": "%fraction|beat",
"music.changeTempoBy|block": "තාල වේගය (bpm)|%value කින් වෙනස් කරන්න",
"music.noteFrequency|block": "%note",
"music.playTone|block": "play|tone %note=device_note|for %duration=device_beat",
"music.rest|block": "rest(ms)|%duration=device_beat",
"music.ringTone|block": "ring tone (Hz)|%note=device_note",
"music.setTempo|block": "set tempo to (bpm)|%value",
"music.tempo|block": "තාල වේගය (bpm)",
"music|block": "සංගීතය",
"pins.analogPitch|block": "analog pitch %frequency|for (ms) %ms",
"pins.analogReadPin|block": "analog read|pin %name",
"pins.analogSetPeriod|block": "analog set period|pin %pin|to (µs)%micros",
"pins.analogSetPitchPin|block": "analog set pitch pin %name",
"pins.analogWritePin|block": "analog write|pin %name|to %value",
"pins.digitalReadPin|block": "digital read|pin %name",
"pins.digitalWritePin|block": "digital write|pin %name|to %value",
"pins.i2cReadNumber|block": "i2c read number|at address %address|of format %format=i2c_sizeof",
"pins.i2cWriteNumber|block": "i2c write number|at address %address|with value %value|of format %format=i2c_sizeof",
"pins.map|block": "map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh",
"pins.onPulsed|block": "on|pin %pin|pulsed %pulse",
"pins.pulseDuration|block": "ස්පන්දන පැවතුම් කාලය (µs)",
"pins.servoSetPulse|block": "servo set pulse|pin %value|to (µs) %micros",
"pins.servoWritePin|block": "servo write|pin %name|to %value",
"pins.setPull|block": "set pull|pin %pin|to %pull",
"pins.spiWrite|block": "spi write %value",
"pins|block": "කූරු",
"serial.onDataReceived|block": "serial|on data received %delimiters=serial_delimiter_conv",
"serial.readLine|block": "serial|read line",
"serial.readString|block": "serial|read string",
"serial.readUntil|block": "serial|read until %delimiter=serial_delimiter_conv",
"serial.redirect|block": "serial|redirect to|TX %tx|RX %rx|at baud rate %rate",
"serial.writeLine|block": "serial|write line %text",
"serial.writeNumber|block": "serial|write number %value",
"serial.writeString|block": "serial|write string %text",
"serial.writeValue|block": "serial|write value %name|= %value",
"serial|block": "අනුක්‍රමික",
"{id:category}Basic": "මූලික",
"{id:category}Control": "පාලනය",
"{id:category}Game": "ක්‍රීඩාව",
"{id:category}Images": "පින්තූර",
"{id:category}Input": "ආදානය",
"{id:category}Led": "Led",
"{id:category}Math": "ගණිත",
"{id:category}Music": "සංගීතය",
"{id:category}Pins": "කූරු",
"{id:category}Serial": "අනුක්‍රමික",
"{id:category}String": "String"
}

View File

@ -1,5 +1,65 @@
{
"Math.abs": "Returnerar absolutbeloppet av ett tal (värdet utan hänsyn till huruvida det är positivt eller negativt). \nTill exempel är absolutbeloppet av -5 detsamma som absolutbeloppet av 5.",
"Math.max": "Returnerar det större av två givna numeriska uttryck.",
"Math.min": "Returnerar det mindre av två givna numeriska uttryck."
"Math.min": "Returnerar det mindre av två givna numeriska uttryck.",
"Math.randomBoolean": "Genererar ett värde \"sant\" eller \"falskt\" slumpmässigt, precis som när man singlar slant.",
"String.fromCharCode": "Gör en sträng från den givna ASCII-teckenkoden.",
"basic": "Ger tillgång till grundläggande micro:bit funktionalitet.",
"basic.clearScreen": "Stäng av alla lysdioder",
"basic.forever": "Repetera koden för alltid i bakgrunden. För varje iteration, kan annan kod köra.",
"basic.pause": "Pausa under angiven tid i millisekunder",
"basic.pause|param|ms": "hur lång pausen är, t. ex.: 100, 200, 500, 1000, 2000",
"basic.plotLeds": "Ritar en bild på LED-skärmen.",
"basic.plotLeds|param|leds": "mönster av lysdioder att slå på/av",
"basic.showAnimation": "Visar en sekvens av LED-skärmar som en animering.",
"basic.showAnimation|param|interval": "tid i millisekunder mellan varje omritning",
"basic.showAnimation|param|leds": "mönster av lysdioder att slå på/av",
"basic.showLeds": "Ritar en bild på LED-skärmen.",
"basic.showLeds|param|interval": "tid i millisekunder för att pausa efter ritning",
"basic.showLeds|param|leds": "mönstret av lysdioder att slå på/av",
"basic.showNumber": "Skrollar ett nummer på skärmen. Om numret passar på skärmen (dvs. är en enda siffra), skrolla inte.",
"basic.showNumber|param|interval": "hastigheten på rullningen; t. ex.: 150, 100, 200, -100",
"basic.showString": "Visa text på displayen, ett tecken i taget. Om strängen får plats på skärmen (dvs. är en enda bokstav), skrolla inte.",
"basic.showString|param|interval": "hastighet på teckenbyte; t. ex.: 150, 100, 200, -100",
"basic.showString|param|text": "texten att rullas på skärmen, t. ex.: \"Hej!\"",
"control": "Verktyg för runtime och händelser.",
"control.inBackground": "Schemalägger kod som körs i bakgrunden.",
"control.reset": "Återställer BBC micro:bit.",
"control.waitMicros": "Blockerar den aktuella fibern i antal angivna mikrosekunder",
"control.waitMicros|param|micros": "antal mikro-sekunder att vänta. t.ex.: 4",
"game": "En enstaka LED sprite spelmotor",
"game.startCountdown": "Startar en spel timer",
"game.startCountdown|param|ms": "nedräkningstid i millisekunder, t.ex.: 10000",
"images": "Skapandet, manipulation och visning av LED bilder.",
"images.createBigImage": "Skapar en bild med 2 ramar.",
"images.createImage": "Skapar en bild som passar på LED-skärmen.",
"input": "Händelser och data från sensorer",
"input.acceleration": "Få acceleration värdet i milli-gravitys (när brädet ligger platt med skärmen upp, x=0, y=0 och z=-1024)",
"input.buttonIsPressed": "Få knapp tillståndet (tryckt eller inte) för ``A`` och ``B``.",
"input.buttonIsPressed|param|button": "knappen att skicka begäran om, t.ex.: Button.A",
"input.compassHeading": "Få aktuell kompass riktning i grader.",
"input.lightLevel": "Läser in ljusnivån som träffar LED-skärmen i ett intervall från '' 0'' (mörkt) till '' 255'' ljust.",
"input.magneticForce": "Få magnetisk kraft värdet i ``mikro-Teslas`` (``µT``). Denna funktion stöds inte i simulatorn.",
"input.onButtonPressed": "Göra något när du trycker på en knapp (``A``, ``B`` eller båda ``A+B``)",
"input.onButtonPressed|param|body": "kod att köra när knappen trycks",
"input.onPinPressed": "Gör något när du trycker på en pin.",
"input.onPinPressed|param|body": "koden som körs när en pin är tryckt",
"input.onPinPressed|param|name": "den pin som måste tryckas, t.ex.: TouchPin.P0",
"input.onPinReleased": "Gör något när en pin är släppt.",
"input.onPinReleased|param|body": "koden som körs när en pin är släppt",
"input.onPinReleased|param|name": "den pin som behöver släppas, t.ex.: TouchPin.P0",
"input.onScreenDown": "Fäster kod att köras när skärmen är vänd nedåt.",
"input.onScreenUp": "Fäster kod att köras när skärmen är vänd uppåt.",
"input.onShake": "Fäster kod att köras när enheten skakas.",
"input.pinIsPressed": "Hämtar en pins tillstånd (tryckt eller inte). Krävs att man även håller på jord (\"GND\") för att sluta kretsen.",
"input.pinIsPressed|param|name": "den pin som används för att upptäcka vidrörning, t.ex: TouchPin.P0",
"led": "Kontroll av LED-skärmen.",
"led.enable": "Slår på eller av skärmen",
"led.plotAll": "Tänder alla lysdioder",
"led.plotBarGraph|param|value": "aktuella värdet att rita",
"led.screenshot": "Tar en skärmdump av LED-skärmen och returnerar en bild.",
"led.stopAnimation": "Avbryter den aktuella animationen och rensar andra väntande animationer.",
"led.toggleAll": "Inverterar den nuvarande LED-displayen",
"music.ringTone": "Spelar upp en ton genom pin ``P0``.",
"music.setTempo|param|bpm": "Det nya tempot i beats per minut, t.ex.: 120"
}

View File

@ -0,0 +1,174 @@
{
"AcceleratorRange.EightG": "Accelerometern mäter krafter upp till 8 g",
"AcceleratorRange.EightG|block": "8g",
"AcceleratorRange.FourG": "Accelerometern mäter krafter upp till 4 g",
"AcceleratorRange.FourG|block": "4g",
"AcceleratorRange.OneG": "Accelerometern mäter krafter upp till 1 g",
"AcceleratorRange.OneG|block": "1g",
"AcceleratorRange.TwoG": "Accelerometern mäter krafter upp till 2 g",
"AcceleratorRange.TwoG|block": "2g",
"BaudRate.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Breve|block": "4",
"BeatFraction.Double|block": "2",
"BeatFraction.Eighth|block": "1/8",
"BeatFraction.Half|block": "1/2",
"BeatFraction.Quarter|block": "1/4",
"BeatFraction.Sixteenth|block": "1/16",
"BeatFraction.Whole|block": "1",
"Button.AB|block": "A+B",
"Delimiters.Dollar|block": "$",
"Delimiters.Hash|block": "#",
"Delimiters.NewLine|block": "ny rad",
"Dimension.Strength|block": "styrka",
"Dimension.X|block": "x",
"Dimension.Y|block": "y",
"Dimension.Z|block": "z",
"Direction.Left|block": "vänster",
"Direction.Right|block": "höger",
"DisplayMode.BackAndWhite|block": "svartvitt",
"DisplayMode.Greyscale|block": "gråskala",
"EventCreationMode.CreateAndFire": "MicroBitEvent har initierats, och dess händelsehanterare exekveras omedelbart (ej lämpligt för användning inom avbrott!).",
"EventCreationMode.CreateOnly": "MicroBitEvent initierats, och ingen ytterligare bearbetning sker.",
"Gesture.EightG": "Aktiveras när en 8g stöt upptäcks",
"Gesture.EightG|block": "8g",
"Gesture.FreeFall": "Aktiveras när kortet faller!",
"Gesture.FreeFall|block": "fritt fall",
"Gesture.LogoDown": "Aktiveras när logotypen är nedåtvänd och skärmen är vertikal",
"Gesture.LogoDown|block": "logotyp ner",
"Gesture.LogoUp": "Aktiveras när logotypen är uppåtvänd och skärmen är vertikal",
"Gesture.LogoUp|block": "logotyp upp",
"Gesture.ScreenDown": "Aktiveras när skärmen pekar uppåt och kortet är horisontellt",
"Gesture.ScreenDown|block": "skärm ner",
"Gesture.ScreenUp": "Aktiveras när skärmen pekar nedåt och kortet är horisontellt",
"Gesture.ScreenUp|block": "skärm upp",
"Gesture.Shake": "Aktiveras när kortet skakas",
"Gesture.Shake|block": "skaka",
"Gesture.SixG": "Aktiveras när en 6g stöt upptäcks",
"Gesture.SixG|block": "6g",
"Gesture.ThreeG": "Aktiveras när en 3g stöt upptäcks",
"Gesture.ThreeG|block": "3g",
"Gesture.TiltLeft": "Aktiveras när skärmen pekar åt vänster",
"Gesture.TiltLeft|block": "luta vänster",
"Gesture.TiltRight": "Aktiveras när skärmen pekar åt höger",
"Gesture.TiltRight|block": "luta höger",
"LedSpriteProperty.Blink|block": "blinka",
"LedSpriteProperty.Brightness|block": "ljusstyrka",
"LedSpriteProperty.Direction|block": "riktning",
"LedSpriteProperty.X|block": "x",
"LedSpriteProperty.Y|block": "y",
"Math.randomBoolean|block": "välj slumpmässigt sant eller falskt",
"Math|block": "Matematik",
"Note.CSharp3|block": "C#3",
"Note.CSharp4|block": "C#4",
"Note.CSharp5|block": "C#5",
"Note.CSharp|block": "C#",
"Note.FSharp3|block": "F#3",
"Note.FSharp4|block": "F#4",
"Note.FSharp5|block": "F#5",
"Note.FSharp|block": "F#",
"Note.GSharp3|block": "G#3",
"Note.GSharp4|block": "G#4",
"Note.GSharp5|block": "G#5",
"Note.GSharp|block": "G#",
"PinPullMode.PullDown|block": "ner",
"PinPullMode.PullUp|block": "upp",
"PulseValue.High|block": "hög",
"PulseValue.Low|block": "låg",
"Rotation.Pitch|block": "lutningsgrad",
"Rotation.Roll|block": "roll",
"String.fromCharCode|block": "text från teckenkod %code",
"String|block": "Sträng",
"basic.clearScreen|block": "Rensa skärmen",
"basic.forever|block": "för alltid",
"basic.pause|block": "pausa (ms) %pause",
"basic.showLeds|block": "visa lysdioder",
"basic.showNumber|block": "visa|nummer %number",
"basic.showString|block": "visa|sträng %text",
"basic|block": "grundläggande",
"control.inBackground|block": "kör i bakgrunden",
"control.reset|block": "återställ",
"control.waitMicros|block": "vänta (µs)%micros",
"control|block": "kontroll",
"game.addScore|block": "ändra poäng med|%points",
"game.gameOver|block": "spelet är slut",
"game.score|block": "poäng",
"game.setScore|block": "ställa in poäng %points",
"game.startCountdown|block": "börja nedräkning|(ms) %duration",
"game|block": "spel",
"images.createBigImage|block": "skapa stor bild",
"images.createImage|block": "skapa bild",
"images|block": "bilder",
"input.acceleration|block": "acceleration (mg) |%NAME",
"input.buttonIsPressed|block": "knapp|%NAME|trycks",
"input.compassHeading|block": "kompassriktning (°)",
"input.lightLevel|block": "ljusnivå",
"input.magneticForce|block": "magnetisk kraft (µT) |%NAME",
"input.onButtonPressed|block": "när knapp|%NAME|trycks",
"input.onGesture|block": "när |%NAME",
"input.onPinPressed|block": "när pin %name|trycks",
"input.onPinReleased|block": "när pin %NAME|släpps",
"input.pinIsPressed|block": "pin %NAME|är tryckt",
"input.rotation|block": "rotation (°)|%NAME",
"input.runningTime|block": "körtid (ms)",
"input.setAccelerometerRange|block": "ange accelerometer|räckvidd %range",
"input.temperature|block": "temperatur (° C)",
"input|block": "input",
"led.brightness|block": "ljusstyrka",
"led.enable|block": "led aktivera %on",
"led.plotBarGraph|block": "rita diagram av %value|upp till %high",
"led.plot|block": "tänd|x %x|y %y",
"led.point|block": "punkt|x %x|y %y",
"led.setBrightness|block": "ställa in ljusstyrka %value",
"led.stopAnimation|block": "avbryt animering",
"led.toggle|block": "växla|x %x|y %y",
"led.unplot|block": "släck|x %x|y %y",
"led|block": "led",
"music.beat|block": "%fraction|taktslag",
"music.changeTempoBy|block": "ändra tempo med (bpm)|%value",
"music.noteFrequency|block": "%note",
"music.playTone|block": "spela|ton %note=device_note|i %duration=device_beat",
"music.rest|block": "vila(ms)|%duration=device_beat",
"music.ringTone|block": "spela ton (Hz)|%note=device_note",
"music.setTempo|block": "ställ in tempo till (bpm)|%value",
"music.tempo|block": "tempo (bpm)",
"music|block": "musik",
"pins.analogPitch|block": "analog tonhöjd %frequency|för (ms) %ms",
"pins.analogReadPin|block": "analog läsa in|pin %name",
"pins.analogSetPeriod|block": "analog ställ in perioden|pin %pin|till (µs)%micros",
"pins.analogSetPitchPin|block": "analog ställ in tonhöjd pin %name",
"pins.analogWritePin|block": "analog skriv|pin %name|till %value",
"pins.digitalReadPin|block": "digital läsa in|pin %name",
"pins.digitalWritePin|block": "digital skriv|pin %name|till %value",
"pins.i2cReadNumber|block": "i2c läsa in nummer|på adress %address|i format %format=i2c_sizeof",
"pins.i2cWriteNumber|block": "i2c skriva nummer|till adress %address|med värde %value|i format %format=i2c_sizeof",
"pins.map|block": "mappa %value|från låg %fromLow|från hög %fromHigh|till låg %toLow|till hög %toHigh",
"pins.onPulsed|block": "när|pin %pin|pulserade %pulse",
"pins.pulseDuration|block": "pulslängd (µs)",
"pins.servoSetPulse|block": "servo ställa in puls|pin %value|till (µs) %micros",
"pins.servoWritePin|block": "servo skriv|pin %name|till %value",
"pins.setPull|block": "ställ in dra upp|pin %pin|till %pull",
"pins.spiWrite|block": "spi skriv %value",
"pins|block": "pins",
"serial.onDataReceived|block": "seriell|när data tas emot %delimiters=serial_delimiter_conv",
"serial.readLine|block": "seriell|läsa rad",
"serial.readString|block": "seriell|läsa sträng",
"serial.readUntil|block": "seriell|läsa tills %delimiter=serial_delimiter_conv",
"serial.redirect|block": "seriella omdirigera till|TX %tx|RX %rx|med baud rate %rate",
"serial.writeLine|block": "seriell|skriv rad %text",
"serial.writeNumber|block": "seriell|skriv nummer %value",
"serial.writeString|block": "seriell|skriv sträng %text",
"serial.writeValue|block": "seriell|skriv värdet %name|= %värde",
"serial|block": "seriell",
"{id:category}Basic": "Grundläggande",
"{id:category}Control": "Kontroll",
"{id:category}Game": "Spel",
"{id:category}Images": "Bilder",
"{id:category}Input": "Input",
"{id:category}Led": "Led",
"{id:category}Math": "Matematik",
"{id:category}Music": "Musik",
"{id:category}Pins": "Pins",
"{id:category}Serial": "Seriell",
"{id:category}String": "Sträng"
}

View File

@ -75,6 +75,7 @@ namespace basic {
//% help=basic/clear-screen weight=79
//% blockId=device_clear_display block="clear screen"
//% parts="ledmatrix"
//% advanced=true
void clearScreen() {
uBit.display.image.clear();
}

View File

@ -56,6 +56,10 @@ enum EventBusValue {
MICROBIT_BUTTON_EVT_CLICK_ = MICROBIT_BUTTON_EVT_CLICK,
MICROBIT_RADIO_EVT_DATAGRAM_ = MICROBIT_RADIO_EVT_DATAGRAM,
MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE_ = MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE,
MICROBIT_PIN_EVT_RISE_ = MICROBIT_PIN_EVT_RISE,
MICROBIT_PIN_EVT_FALL_ = MICROBIT_PIN_EVT_FALL,
MICROBIT_PIN_EVT_PULSE_HI_ = MICROBIT_PIN_EVT_PULSE_HI,
MICROBIT_PIN_EVT_PULSE_LO_ = MICROBIT_PIN_EVT_PULSE_LO,
MES_ALERT_EVT_ALARM1_ = MES_ALERT_EVT_ALARM1,
MES_ALERT_EVT_ALARM2_ = MES_ALERT_EVT_ALARM2,
MES_ALERT_EVT_ALARM3_ = MES_ALERT_EVT_ALARM3,
@ -189,6 +193,7 @@ namespace control {
* Gets a friendly name for the device derived from the its serial number
*/
//% blockId="control_device_name" block="device name" weight=10 blockGap=8
//% advanced=true
StringData* deviceName() {
return ManagedString(microbit_friendly_name()).leakData();
}
@ -197,6 +202,7 @@ namespace control {
* Derive a unique, consistent serial number of this device from internal data.
*/
//% blockId="control_device_serial_number" block="device serial number" weight=9
//% advanced=true
int deviceSerialNumber() {
return microbit_serial_number();
}

View File

@ -9,7 +9,7 @@ namespace control {
* Returns the value of a C++ runtime constant
*/
//% weight=2 weight=19 blockId="control_event_source_id" block="%id" blockGap=8
//% shim=TD_ID
//% shim=TD_ID advanced=true
export function eventSourceId(id: EventBusSource): number {
return id;
}
@ -17,7 +17,7 @@ namespace control {
* Returns the value of a C++ runtime constant
*/
//% weight=1 weight=19 blockId="control_event_value_id" block="%id"
//% shim=TD_ID
//% shim=TD_ID advanced=true
export function eventValueId(id: EventBusValue): number {
return id;
}

42
libs/core/enums.d.ts vendored
View File

@ -179,6 +179,10 @@ declare namespace input {
MICROBIT_BUTTON_EVT_CLICK = 3, // MICROBIT_BUTTON_EVT_CLICK
MICROBIT_RADIO_EVT_DATAGRAM = 1, // MICROBIT_RADIO_EVT_DATAGRAM
MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE = 1, // MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE
MICROBIT_PIN_EVT_RISE = 2, // MICROBIT_PIN_EVT_RISE
MICROBIT_PIN_EVT_FALL = 3, // MICROBIT_PIN_EVT_FALL
MICROBIT_PIN_EVT_PULSE_HI = 4, // MICROBIT_PIN_EVT_PULSE_HI
MICROBIT_PIN_EVT_PULSE_LO = 5, // MICROBIT_PIN_EVT_PULSE_LO
MES_ALERT_EVT_ALARM1 = 6, // MES_ALERT_EVT_ALARM1
MES_ALERT_EVT_ALARM2 = 7, // MES_ALERT_EVT_ALARM2
MES_ALERT_EVT_ALARM3 = 8, // MES_ALERT_EVT_ALARM3
@ -276,6 +280,32 @@ declare namespace led {
P3 = 10, // MICROBIT_ID_IO_P3
P4 = 11, // MICROBIT_ID_IO_P4
P10 = 17, // MICROBIT_ID_IO_P10
//% block="P5 (write only)"
P5 = 12, // MICROBIT_ID_IO_P5
//% block="P6 (write only)"
P6 = 13, // MICROBIT_ID_IO_P6
//% block="P7 (write only)"
P7 = 14, // MICROBIT_ID_IO_P7
//% block="P8 (write only)"
P8 = 15, // MICROBIT_ID_IO_P8
//% block="P9 (write only)"
P9 = 16, // MICROBIT_ID_IO_P9
//% block="P11 (write only)"
P11 = 18, // MICROBIT_ID_IO_P11
//% block="P12 (write only)"
P12 = 19, // MICROBIT_ID_IO_P12
//% block="P13 (write only)"
P13 = 20, // MICROBIT_ID_IO_P13
//% block="P14 (write only)"
P14 = 21, // MICROBIT_ID_IO_P14
//% block="P15 (write only)"
P15 = 22, // MICROBIT_ID_IO_P15
//% block="P16 (write only)"
P16 = 23, // MICROBIT_ID_IO_P16
//% block="P19 (write only)"
P19 = 24, // MICROBIT_ID_IO_P19
//% block="P20 (write only)"
P20 = 25, // MICROBIT_ID_IO_P20
}
@ -297,6 +327,18 @@ declare namespace led {
}
declare enum PinEventType {
//% block="edge"
Edge = 1, // MICROBIT_PIN_EVENT_ON_EDGE
//% block="pulse"
Pulse = 2, // MICROBIT_PIN_EVENT_ON_PULSE
//% block="touch"
Touch = 3, // MICROBIT_PIN_EVENT_ON_TOUCH
//% block="none"
None = 0, // MICROBIT_PIN_EVENT_NONE
}
declare enum SerialPin {
P0 = 7, // MICROBIT_ID_IO_P0
P1 = 8, // MICROBIT_ID_IO_P1

524
libs/core/icons.ts Normal file
View File

@ -0,0 +1,524 @@
/*
The MIT License (MIT)
Copyright (c) 2013-2016 The MicroPython-on-micro:bit Developers, as listed
in the accompanying AUTHORS file
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
// Images from file microbitconstimage.cpp https://github.com/bbcmicrobit/micropython
enum IconNames {
//% block="heart"
//% blockImage=1
Heart = 0,
//% block="small heart"
SmallHeart,
//% block="yes"
Yes,
//% block="no"
No,
//% block="happy"
Happy,
//% block="sad"
Sad,
//% block="confused"
Confused,
//% block="angry"
Angry,
//% block="asleep"
Asleep,
//% block="surprised"
Surprised,
//% block="silly"
Silly,
//% block="fabulous"
Fabulous,
//% block="meh"
Meh,
//% block="t-shirt"
TShirt,
//% block="roller skate"
Rollerskate,
//% block="duck"
Duck,
//% block="house"
House,
//% block="tortoise"
Tortoise,
//% block="butterfly"
Butterfly,
//% block="stick figure"
StickFigure,
//% block="ghost"
Ghost,
//% block="sword"
Sword,
//% block="giraffe"
Giraffe,
//% block="skull"
Skull,
//% block="umbrella"
Umbrella,
//% block="snake"
Snake,
//% block="rabbit"
Rabbit,
//% block="cow"
Cow,
//% block="quarter note"
QuarterNote,
//% block="eigth note"
EigthNote,
//% block="pitchfork"
Pitchfork,
//% block="pac man"
Pacman,
//% block="target"
Target,
//% block="triangle"
Triangle,
//% block="left triangle"
LeftTriangle,
//% block="chess board"
Chessboard,
//% block="diamond"
Diamond,
//% block="small diamond"
SmallDiamond,
//% block="square"
Square,
//% block="small square"
SmallSquare,
}
enum ArrowNames {
//% blockIdentity=images.arrowNumber
North = 0,
//% blockIdentity=images.arrowNumber
NorthEast,
//% blockIdentity=images.arrowNumber
East,
//% blockIdentity=images.arrowNumber
SouthEast,
//% blockIdentity=images.arrowNumber
South,
//% blockIdentity=images.arrowNumber
SouthWest,
//% blockIdentity=images.arrowNumber
West,
//% blockIdentity=images.arrowNumber
NorthWest,
}
namespace basic {
/**
* Draws the selected icon on the LED screen
*/
//% weight=90 blockGap=8
//% blockId=basic_show_icon
//% block="show icon %i" icon="\uf00a"
//% parts="ledmatrix"
//% help=basic/show-icon
export function showIcon(icon: IconNames) {
let res = images.iconImage(icon)
res.showImage(0)
}
//% weight=50 blockGap=8
//% blockId=basic_show_arrow
//% block="show arrow %i=device_arrow"
//% parts="ledmatrix"
//% advanced=true
//% help=basic/show-arrow
export function showArrow(i: number) {
let res = images.arrowImage(i)
res.showImage(0)
}
}
namespace images {
function getArrow(i : ArrowNames): string {
switch(i) {
// compass directions
case ArrowNames.North: return `
. . # . .
. # # # .
# . # . #
. . # . .
. . # . .`;
case ArrowNames.NorthEast: return `
. . # # #
. . . # #
. . # . #
. # . . .
# . . . .`;
case ArrowNames.East: return `
. . # . .
. . . # .
# # # # #
. . . # .
. . # . .`;
case ArrowNames.SouthEast: return `
# . . . .
. # . . .
. . # . #
. . . # #
. . # # #`;
case ArrowNames.South: return `
. . # . .
. . # . .
# . # . #
. # # # .
. . # . .`;
case ArrowNames.SouthWest: return `
. . . . #
. . . # .
# . # . .
# # . . .
# # # . .`;
case ArrowNames.West: return `
. . # . .
. # . . .
# # # # #
. # . . .
. . # . .`;
case ArrowNames.NorthWest: return `
# # # . .
# # . . .
# . # . .
. . . # .
. . . . #`;
default: return `
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`;
}
}
function getIcon(i: IconNames): string {
switch (i) {
case IconNames.Heart : return `
. # . # .
# # # # #
# # # # #
. # # # .
. . # . .`;
case IconNames.SmallHeart : return `
. . . . .
. # . # .
. # # # .
. . # . .
. . . . .`;
//faces
case IconNames.Happy: return `
. . . . .
. # . # .
. . . . .
# . . . #
. # # # .`;
case IconNames.Sad: return `
. . . . .
. # . # .
. . . . .
. # # # .
# . . . #`;
case IconNames.Confused: return `
. . . . .
. # . # .
. . . . .
. # . # .
# . # . #`;
case IconNames.Angry: return `
# . . . #
. # . # .
. . . . .
# # # # #
# . # . #`;
case IconNames.Asleep: return `
. . . . .
# # . # #
. . . . .
. # # # .
. . . . .`;
case IconNames.Surprised: return `
. # . # .
. . . . .
. . # . .
. # . # .
. . # . .`;
case IconNames.Silly: return `
# . . . #
. . . . .
# # # # #
. . . # #
. . . # #`;
case IconNames.Fabulous: return `
# # # # #
# # . # #
. . . . .
. # . # .
. # # # .`;
case IconNames.Meh: return `
# # . # #
. . . . .
. . . # .
. . # . .
. # . . .`;
case IconNames.Yes: return `
. . . . .
. . . . #
. . . # .
# . # . .
. # . . .`;
case IconNames.No: return `
# . . . #
. # . # .
. . # . .
. # . # .
# . . . #`;
case IconNames.Triangle: return `
. . . . .
. . # . .
. # . # .
# # # # #
. . . . .`;
case IconNames.LeftTriangle: return `
# . . . .
# # . . .
# . # . .
# . . # .
# # # # #`;
case IconNames.Chessboard: return `
. # . # .
# . # . #
. # . # .
# . # . #
. # . # .`;
case IconNames.Diamond: return `
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .`;
case IconNames.SmallDiamond: return `
. . . . .
. . # . .
. # . # .
. . # . .
. . . . .`;
case IconNames.Square: return `
# # # # #
# . . . #
# . . . #
# . . . #
# # # # #`;
case IconNames.SmallSquare: return `
. . . . .
. # # # .
. # . # .
. # # # .
. . . . .`;
// The following images were designed by Abbie Brooks.
case IconNames.TShirt: return `
# # . # #
# # # # #
. # # # .
. # # # .
. # # # .`;
case IconNames.Rollerskate: return `
. . . # #
. . . # #
# # # # #
# # # # #
. # . # .`;
case IconNames.Duck: return `
. # # . .
# # # . .
. # # # #
. # # # .
. .. . .`;
case IconNames.House: return `
. . # . .
. # # # .
# # # # #
. # # # .
. # . # .`;
case IconNames.Tortoise: return `
. . . . .
. # # # .
# # # # #
. # . # .
. . . . .`;
case IconNames.Butterfly: return `
# # . # #
# # # # #
. . # . .
# # # # #
# # . # #`;
case IconNames.StickFigure: return `
. . # . .
# # # # #
. . # . .
. # . # .
# . . . #`;
case IconNames.Ghost: return `
. # # # .
# . # . #
# # # # #
# # # # #
# . # . #`;
case IconNames.Sword: return `
. . # . .
. . # . .
. . # . .
. # # # .
. . # . .`;
case IconNames.Giraffe: return `
# # . . .
. # . . .
. # . . .
. # # # .
. # . # .`;
case IconNames.Skull: return `
. # # # .
# . # . #
# # # # #
. # # # .
. # # # .`;
case IconNames.Umbrella: return `
. # # # .
# # # # #
. . # . .
# . # . .
# # # . .`;
case IconNames.Snake: return `
# # . . .
# # . # #
. # . # .
. # # # .
. . . . .`;
// animals
case IconNames.Rabbit: return `
# . # . .
# . # . .
# # # # .
# # . # .
# # # # .`;
case IconNames.Cow: return `
# . . . #
# . . . #
# # # # #
. # # # .
. . # . .`;
// musical notes
case IconNames.QuarterNote: return `
. . # . .
. . # . .
. . # . .
# # # . .
# # # . .`;
case IconNames.EigthNote: return `
. . # . .
. . # # .
. . # . #
# # # . .
# # # . .`;
// other icons
case IconNames.Pitchfork: return `
# . # . #
# . # . #
# # # # #
. . # . .
. . # . .`;
case IconNames.Pacman: return `
. # # # #
# # # # .
# # # . .
# # # # .
. # # # #`;
case IconNames.Target: return `
. . # . .
. # # # .
# # . # #
. # # # .
. . # . .`;
default: return `
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`;
}
}
//% weight=50 blockGap=8
//% blockId=device_arrow block="%arrow"
//% shim=TD_ID
export function arrowNumber(arrow: ArrowNames): number {
return arrow;
}
//% weight=50 blockGap=8
//% blockId=builtin_arrow_image block="arrow image %i=device_arrow"
export function arrowImage(i: ArrowNames): Image {
let res = images.createImage(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
return set(res, getArrow(i));
}
//% weight=50 blockGap=8
//% blockId=builtin_image block="icon image %i"
export function iconImage(i: IconNames): Image {
let res = images.createImage(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
return set(res, getIcon(i));
}
function set(res: Image, s: string) {
let j = 0;
for (let x of s) {
if (x == "." || x == "#") {
res.setPixel(j % 5, j / 5, x == "#")
j++
}
}
return res
}
}

View File

@ -43,9 +43,9 @@ namespace ImageMethods {
*/
//% help=images/show-image weight=80 blockNamespace=images
//% blockId=device_show_image_offset block="show image %sprite|at offset %offset" blockGap=8
//% parts="ledmatrix"
void showImage(Image sprite, int xOffset) {
uBit.display.print(MicroBitImage(sprite), -xOffset, 0, 0);
//% parts="ledmatrix" async
void showImage(Image sprite, int xOffset, int interval = 400) {
uBit.display.print(MicroBitImage(sprite), -xOffset, 0, 0, interval);
}
/**
@ -150,7 +150,7 @@ namespace ImageMethods {
*/
//% weight=70 help=images/show-frame
//% parts="ledmatrix"
void showFrame(Image i, int frame) {
showImage(i, frame * 5);
void showFrame(Image i, int frame, int interval = 400) {
showImage(i, frame * 5, interval);
}
}

View File

@ -112,7 +112,7 @@ enum class Gesture {
EightG = MICROBIT_ACCELEROMETER_EVT_8G
};
//% color=300 weight=99 icon="\uf192"
//% color=#B4009E weight=99 icon="\uf192"
namespace input {
/**
* Do something when a button (``A``, ``B`` or both ``A+B``) is pressed
@ -212,7 +212,7 @@ namespace input {
double y = uBit.accelerometer.getY();
double z = uBit.accelerometer.getZ();
return (int)sqrt(x*x+y*y+z*z);
}
}
/**
* Get the acceleration value in milli-gravitys (when the board is laying flat with the screen up, x=0, y=0 and z=-1024)

View File

@ -8,7 +8,7 @@ enum class DisplayMode_ {
// TODO DISPLAY_MODE_BLACK_AND_WHITE_LIGHT_SENSE
};
//% color=3 weight=35 icon="\uf205"
//% color=#5C2D91 weight=97 icon="\uf205"
namespace led {
/**
@ -93,7 +93,7 @@ namespace led {
}
/**
* Turns on or off the display
* Turns on or off the display
*/
//% help=led/enable blockId=device_led_enable block="led enable %on"
//% advanced=true parts="ledmatrix"

View File

@ -1,112 +1,112 @@
enum Note {
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=262
C = 262,
//% block=C#
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=277
CSharp = 277,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=294
D = 294,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=311
Eb = 311,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=330
E = 330,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=349
F = 349,
//% block=F#
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=370
FSharp = 370,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=392
G = 392,
//% block=G#
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=415
GSharp = 415,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=440
A = 440,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=466
Bb = 466,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=494
B = 494,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=131
C3 = 131,
//% block=C#3
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=139
CSharp3 = 139,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=147
D3 = 147,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=156
Eb3 = 156,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=165
E3 = 165,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=175
F3 = 175,
//% block=F#3
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=185
FSharp3 = 185,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=196
G3 = 196,
//% block=G#3
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=208
GSharp3 = 208,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=220
A3 = 220,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=233
Bb3 = 233,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=247
B3 = 247,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=262
C4 = 262,
//% block=C#4
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=277
CSharp4 = 277,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=294
D4 = 294,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=311
Eb4 = 311,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=330
E4 = 330,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=349
F4 = 349,
//% block=F#4
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=370
FSharp4 = 370,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=392
G4 = 392,
//% block=G#4
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=415
GSharp4 = 415,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=440
A4 = 440,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=466
Bb4 = 466,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=494
B4 = 494,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=523
C5 = 523,
//% block=C#5
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=555
CSharp5 = 555,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=587
D5 = 587,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=622
Eb5 = 622,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=659
E5 = 659,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=698
F5 = 698,
//% block=F#5
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=740
FSharp5 = 740,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=784
G5 = 784,
//% block=G#5
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=831
GSharp5 = 831,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=880
A5 = 880,
//% blockIdentity=music.noteFrequency
//% blockIdentity=music.noteFrequency enumval=932
Bb5 = 932,
//% blockIdentity=music.noteFrequency
B5 = 989,
//% blockIdentity=music.noteFrequency enumval=988
B5 = 988,
}
enum BeatFraction {
@ -141,6 +141,7 @@ namespace music {
//% help=music/play-tone weight=90
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" blockGap=8
//% parts="headphone"
//% useEnumVal = 1
export function playTone(frequency: number, ms: number): void {
pins.analogPitch(frequency, ms);
}
@ -152,6 +153,7 @@ namespace music {
//% help=music/ring-tone weight=80
//% blockId=device_ring block="ring tone (Hz)|%note=device_note" blockGap=8
//% parts="headphone"
//% useEnumVal = 1
export function ringTone(frequency: number): void {
pins.analogPitch(frequency, 0);
}
@ -174,7 +176,9 @@ namespace music {
*/
//% weight=50 help=music/note-frequency
//% blockId=device_note block="%note"
//% shim=TD_ID
//% shim=TD_ID blockHidden=true
//% blockFieldEditor="note_editor"
//% useEnumVal = 1
export function noteFrequency(name: Note): number {
return name;
}

View File

@ -29,6 +29,32 @@ enum class AnalogPin {
P3 = MICROBIT_ID_IO_P3,
P4 = MICROBIT_ID_IO_P4,
P10 = MICROBIT_ID_IO_P10,
//% block="P5 (write only)"
P5 = MICROBIT_ID_IO_P5,
//% block="P6 (write only)"
P6 = MICROBIT_ID_IO_P6,
//% block="P7 (write only)"
P7 = MICROBIT_ID_IO_P7,
//% block="P8 (write only)"
P8 = MICROBIT_ID_IO_P8,
//% block="P9 (write only)"
P9 = MICROBIT_ID_IO_P9,
//% block="P11 (write only)"
P11 = MICROBIT_ID_IO_P11,
//% block="P12 (write only)"
P12 = MICROBIT_ID_IO_P12,
//% block="P13 (write only)"
P13 = MICROBIT_ID_IO_P13,
//% block="P14 (write only)"
P14 = MICROBIT_ID_IO_P14,
//% block="P15 (write only)"
P15 = MICROBIT_ID_IO_P15,
//% block="P16 (write only)"
P16 = MICROBIT_ID_IO_P16,
//% block="P19 (write only)"
P19 = MICROBIT_ID_IO_P19,
//% block="P20 (write only)"
P20 = MICROBIT_ID_IO_P20
};
enum class PulseValue {
@ -47,6 +73,17 @@ enum class PinPullMode {
PullNone = 2
};
enum class PinEventType {
//% block="edge"
Edge = MICROBIT_PIN_EVENT_ON_EDGE,
//% block="pulse"
Pulse = MICROBIT_PIN_EVENT_ON_PULSE,
//% block="touch"
Touch = MICROBIT_PIN_EVENT_ON_TOUCH,
//% block="none"
None = MICROBIT_PIN_EVENT_NONE
};
MicroBitPin *getPin(int id) {
switch (id) {
case MICROBIT_ID_IO_P0: return &uBit.io.P0;
@ -107,7 +144,7 @@ namespace pins {
*/
//% help=pins/digital-write-pin weight=29
//% blockId=device_set_digital_pin block="digital write|pin %name|to %value"
void digitalWritePin(DigitalPin name, int value) {
void digitalWritePin(DigitalPin name, int value) {
PINOP(setDigitalValue(value));
}
@ -116,7 +153,7 @@ namespace pins {
* @param name pin to write to, eg: AnalogPin.P0
*/
//% help=pins/analog-read-pin weight=25
//% blockId=device_get_analog_pin block="analog read|pin %name" blockGap="8"
//% blockId=device_get_analog_pin block="analog read|pin %name" blockGap="8"
int analogReadPin(AnalogPin name) {
PINREAD(getAnalogValue());
}
@ -128,7 +165,7 @@ namespace pins {
*/
//% help=pins/analog-write-pin weight=24
//% blockId=device_set_analog_pin block="analog write|pin %name|to %value" blockGap=8
void analogWritePin(AnalogPin name, int value) {
void analogWritePin(AnalogPin name, int value) {
PINOP(setAnalogValue(value));
}
@ -139,11 +176,11 @@ namespace pins {
* @param micros period in micro seconds. eg:20000
*/
//% help=pins/analog-set-period weight=23 blockGap=8
//% blockId=device_set_analog_period block="analog set period|pin %pin|to (µs)%micros"
void analogSetPeriod(AnalogPin name, int micros) {
//% blockId=device_set_analog_period block="analog set period|pin %pin|to (µs)%micros"
void analogSetPeriod(AnalogPin name, int micros) {
PINOP(setAnalogPeriodUs(micros));
}
/**
* Configures this pin to a digital input, and generates events where the timestamp is the duration that this pin was either ``high`` or ``low``.
* @param name digital pin to register to, eg: DigitalPin.P0
@ -154,11 +191,11 @@ namespace pins {
void onPulsed(DigitalPin name, PulseValue pulse, Action body) {
MicroBitPin* pin = getPin((int)name);
if (!pin) return;
pin->eventOn(MICROBIT_PIN_EVENT_ON_PULSE);
pin->eventOn(MICROBIT_PIN_EVENT_ON_PULSE);
registerWithDal((int)name, (int)pulse, body);
}
/**
* Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulsed`` handler.
*/
@ -174,7 +211,7 @@ namespace pins {
* @param name the pin which measures the pulse, eg: DigitalPin.P0
* @param value the value of the pulse, eg: PulseValue.High
* @param maximum duration in micro-seconds
*/
*/
//% blockId="pins_pulse_in" block="pulse in (µs)|pin %name|pulsed %value"
//% weight=20 advanced=true
int pulseIn(DigitalPin name, PulseValue value, int maxDuration = 2000000) {
@ -182,20 +219,20 @@ namespace pins {
if (!pin) return 0;
int pulse = value == PulseValue::High ? 1 : 0;
uint64_t tick = system_timer_current_time_us();
uint64_t maxd = (uint64_t)maxDuration;
uint64_t tick = system_timer_current_time_us();
uint64_t maxd = (uint64_t)maxDuration;
while(pin->getDigitalValue() != pulse) {
if(system_timer_current_time_us() - tick > maxd)
return 0;
return 0;
}
uint64_t start = system_timer_current_time_us();
uint64_t start = system_timer_current_time_us();
while(pin->getDigitalValue() == pulse) {
if(system_timer_current_time_us() - tick > maxd)
return 0;
}
uint64_t end = system_timer_current_time_us();
return end - start;
return 0;
}
uint64_t end = system_timer_current_time_us();
return end - start;
}
/**
@ -206,7 +243,7 @@ namespace pins {
//% help=pins/servo-write-pin weight=20
//% blockId=device_set_servo_pin block="servo write|pin %name|to %value" blockGap=8
//% parts=microservo trackArgs=0
void servoWritePin(AnalogPin name, int value) {
void servoWritePin(AnalogPin name, int value) {
PINOP(setServoValue(value));
}
@ -217,7 +254,7 @@ namespace pins {
*/
//% help=pins/servo-set-pulse weight=19
//% blockId=device_set_servo_pulse block="servo set pulse|pin %value|to (µs) %micros"
void servoSetPulse(AnalogPin name, int micros) {
void servoSetPulse(AnalogPin name, int micros) {
PINOP(setServoPulseUs(micros));
}
@ -230,7 +267,7 @@ namespace pins {
*/
//% blockId=device_analog_set_pitch_pin block="analog set pitch pin %name"
//% help=pins/analog-set-pitch weight=3 advanced=true
void analogSetPitchPin(AnalogPin name) {
void analogSetPitchPin(AnalogPin name) {
pitchPin = getPin((int)name);
}
@ -241,8 +278,8 @@ namespace pins {
*/
//% blockId=device_analog_pitch block="analog pitch %frequency|for (ms) %ms"
//% help=pins/analog-pitch weight=4 async advanced=true blockGap=8
void analogPitch(int frequency, int ms) {
if (pitchPin == NULL)
void analogPitch(int frequency, int ms) {
if (pitchPin == NULL)
analogSetPitchPin(AnalogPin::P0);
if (frequency <= 0) {
pitchPin->setAnalogValue(0);
@ -250,7 +287,7 @@ namespace pins {
pitchPin->setAnalogValue(512);
pitchPin->setAnalogPeriodUs(1000000/frequency);
}
if (ms > 0) {
fiber_sleep(ms);
pitchPin->setAnalogValue(0);
@ -259,7 +296,7 @@ namespace pins {
}
}
/**
* Configures the pull of this pin.
* @param name pin to set the pull mode on, eg: DigitalPin.P0
@ -268,13 +305,25 @@ namespace pins {
//% help=pins/set-pull weight=3 advanced=true
//% blockId=device_set_pull block="set pull|pin %pin|to %pull"
void setPull(DigitalPin name, PinPullMode pull) {
PinMode m = pull == PinPullMode::PullDown
PinMode m = pull == PinPullMode::PullDown
? PinMode::PullDown
: pull == PinPullMode::PullUp ? PinMode::PullUp
: pull == PinPullMode::PullUp ? PinMode::PullUp
: PinMode::PullNone;
PINOP(setPull(m));
}
/**
* Configures the events emitted by this pin. Events can be subscribed to
* using ``control.onEvent()``.
* @param name pin to set the event mode on, eg: DigitalPin.P0
* @param type the type of events for this pin to emit, eg: PinEventType.Edge
*/
//% help=pins/set-events weight=4 advanced=true
//% blockId=device_set_pin_events block="set pin %pin|to emit %type|events"
void setEvents(DigitalPin name, PinEventType type) {
getPin((int)name)->eventOn((int)type);
}
/**
* Create a new zero-initialized buffer.
* @param size number of bytes in the buffer
@ -295,7 +344,7 @@ namespace pins {
uBit.i2c.read(address << 1, (char*)buf->payload, size, repeat);
return buf;
}
/**
* Write bytes to a 7-bit I2C `address`.
*/
@ -322,5 +371,5 @@ namespace pins {
auto p = allocSPI();
return p->write(value);
}
}

View File

@ -17,6 +17,7 @@
"helpers.ts",
"images.cpp",
"basic.cpp",
"icons.ts",
"input.cpp",
"input.ts",
"control.ts",
@ -41,7 +42,10 @@
"_locales/no/core-strings.json",
"_locales/ja/core-strings.json",
"_locales/sv-SE/core-jsdoc-strings.json",
"_locales/no/core-jsdoc-strings.json"
"_locales/no/core-jsdoc-strings.json",
"_locales/si-LK/core-strings.json",
"_locales/sv-SE/core-strings.json",
"_locales/si-LK/core-jsdoc-strings.json"
],
"public": true,
"dependencies": {},

View File

@ -34,7 +34,7 @@ enum Delimiters {
Hash = 6,
};
//% weight=2 color=30 icon="\uf287"
//% weight=2 color=#002050 icon="\uf287"
//% advanced=true
namespace serial {
// note that at least one // followed by % is needed per declaration!

35
libs/core/shims.d.ts vendored
View File

@ -40,8 +40,8 @@ declare interface Image {
*/
//% help=images/show-image weight=80 blockNamespace=images
//% blockId=device_show_image_offset block="show image %sprite|at offset %offset" blockGap=8
//% parts="ledmatrix" shim=ImageMethods::showImage
showImage(xOffset: number): void;
//% parts="ledmatrix" async interval.defl=400 shim=ImageMethods::showImage
showImage(xOffset: number, interval?: number): void;
/**
* Draws the ``index``-th frame of the image on the screen.
@ -118,8 +118,8 @@ declare interface Image {
* @param frame TODO
*/
//% weight=70 help=images/show-frame
//% parts="ledmatrix" shim=ImageMethods::showFrame
showFrame(frame: number): void;
//% parts="ledmatrix" interval.defl=400 shim=ImageMethods::showFrame
showFrame(frame: number, interval?: number): void;
}
@ -171,7 +171,8 @@ declare namespace basic {
*/
//% help=basic/clear-screen weight=79
//% blockId=device_clear_display block="clear screen"
//% parts="ledmatrix" shim=basic::clearScreen
//% parts="ledmatrix"
//% advanced=true shim=basic::clearScreen
function clearScreen(): void;
/**
@ -211,7 +212,7 @@ declare namespace basic {
//% color=300 weight=99 icon="\uf192"
//% color=#B4009E weight=99 icon="\uf192"
declare namespace input {
/**
@ -415,19 +416,21 @@ declare namespace control {
/**
* Gets a friendly name for the device derived from the its serial number
*/
//% blockId="control_device_name" block="device name" weight=10 blockGap=8 shim=control::deviceName
//% blockId="control_device_name" block="device name" weight=10 blockGap=8
//% advanced=true shim=control::deviceName
function deviceName(): string;
/**
* Derive a unique, consistent serial number of this device from internal data.
*/
//% blockId="control_device_serial_number" block="device serial number" weight=9 shim=control::deviceSerialNumber
//% blockId="control_device_serial_number" block="device serial number" weight=9
//% advanced=true shim=control::deviceSerialNumber
function deviceSerialNumber(): number;
}
//% color=3 weight=35 icon="\uf205"
//% color=#5C2D91 weight=97 icon="\uf205"
declare namespace led {
/**
@ -497,7 +500,7 @@ declare namespace led {
function setDisplayMode(mode: DisplayMode): void;
/**
* Turns on or off the display
* Turns on or off the display
*/
//% help=led/enable blockId=device_led_enable block="led enable %on"
//% advanced=true parts="ledmatrix" shim=led::enable
@ -628,6 +631,16 @@ declare namespace pins {
//% blockId=device_set_pull block="set pull|pin %pin|to %pull" shim=pins::setPull
function setPull(name: DigitalPin, pull: PinPullMode): void;
/**
* Configures the events emitted by this pin. Events can be subscribed to
* using ``control.onEvent()``.
* @param name pin to set the event mode on, eg: DigitalPin.P0
* @param type the type of events for this pin to emit, eg: PinEventType.Edge
*/
//% help=pins/set-events weight=4 advanced=true
//% blockId=device_set_pin_events block="set pin %pin|to emit %type|events" shim=pins::setEvents
function setEvents(name: DigitalPin, type: PinEventType): void;
/**
* Create a new zero-initialized buffer.
* @param size number of bytes in the buffer
@ -658,7 +671,7 @@ declare namespace pins {
//% weight=2 color=30 icon="\uf287"
//% weight=2 color=#002050 icon="\uf287"
//% advanced=true
declare namespace serial {

View File

@ -0,0 +1,3 @@
{
"devices.onGamepadButton|param|body": "ボタンが押されたときに実行するコード"
}

View File

@ -0,0 +1,3 @@
{
"MesDeviceInfo.Shaken|block": "ゆさぶられる"
}

View File

@ -0,0 +1,62 @@
{
"MesAlertEvent.DisplayToast|block": "meldingsvindu",
"MesAlertEvent.FindMyPhone|block": "finn telefonen",
"MesAlertEvent.PlayRingtone|block": "ringetone",
"MesAlertEvent.PlaySound|block": "spill lyd",
"MesAlertEvent.RingAlarm2|block": "ring alarm 2",
"MesAlertEvent.RingAlarm3|block": "ring alarm 3",
"MesAlertEvent.RingAlarm4|block": "ring alarm 4",
"MesAlertEvent.RingAlarm5|block": "ring alarm 5",
"MesAlertEvent.RingAlarm6|block": "ring alarm 6",
"MesAlertEvent.RingAlarm|block": "ring alarm",
"MesAlertEvent.Vibrate|block": "vibrasjon",
"MesCameraEvent.LaunchPhotoMode|block": "åpne fotomodus",
"MesCameraEvent.LaunchVideoMode|block": "åpne videomodus",
"MesCameraEvent.StartVideoCapture|block": "ta opp video",
"MesCameraEvent.StopPhotoMode|block": "stopp fotomodus",
"MesCameraEvent.StopVideoCapture|block": "stopp videoopptak",
"MesCameraEvent.StopVideoMode|block": "stopp videomodus",
"MesCameraEvent.TakePhoto|block": "ta bilde",
"MesCameraEvent.ToggleFrontRear|block": "bytt forside-bakside",
"MesDeviceInfo.DisplayOff|block": "skjerm av",
"MesDeviceInfo.DisplayOn|block": "skjerm på",
"MesDeviceInfo.IncomingCall|block": "anrop",
"MesDeviceInfo.IncomingMessage|block": "melding mottatt",
"MesDeviceInfo.OrientationLandscape|block": "liggende orientering",
"MesDeviceInfo.OrientationPortrait|block": "stående orientering",
"MesDeviceInfo.Shaken|block": "ristet",
"MesDpadButtonInfo.ADown|block": "A trykkes ned",
"MesDpadButtonInfo.AUp|block": "A slippes opp",
"MesDpadButtonInfo.BDown|block": "B trykkes ned",
"MesDpadButtonInfo.BUp|block": "B slippes opp",
"MesDpadButtonInfo.CDown|block": "C trykkes ned",
"MesDpadButtonInfo.CUp|block": "C slippes opp",
"MesDpadButtonInfo.DDown|block": "D trykkes ned",
"MesDpadButtonInfo.DUp|block": "D slippes opp",
"MesDpadButtonInfo._1Down|block": "1 trykkes ned",
"MesDpadButtonInfo._1Up|block": "1 slippes opp",
"MesDpadButtonInfo._2Down|block": "2 trykkes ned",
"MesDpadButtonInfo._2Up|block": "2 slippes opp",
"MesDpadButtonInfo._3Down|block": "3 trykkes ned",
"MesDpadButtonInfo._3Up|block": "3 slippes opp",
"MesDpadButtonInfo._4Down|block": "4 trykkes ned",
"MesDpadButtonInfo._4Up|block": "4 slippes opp",
"MesRemoteControlEvent.forward|block": "framover",
"MesRemoteControlEvent.nextTrack|block": "neste spor",
"MesRemoteControlEvent.pause|block": "pause",
"MesRemoteControlEvent.play|block": "spill av",
"MesRemoteControlEvent.previousTrack|block": "forrige spor",
"MesRemoteControlEvent.rewind|block": "tilbake",
"MesRemoteControlEvent.stop|block": "stopp",
"MesRemoteControlEvent.volumeDown|block": "volum ned",
"MesRemoteControlEvent.volumeUp|block": "volum opp",
"devices.onGamepadButton|block": "når spillkontroll-knapp |%NAME trykkes",
"devices.onNotified|block": "når varslet om|%event",
"devices.onSignalStrengthChanged|block": "når signalstyrken endrer seg",
"devices.raiseAlertTo|block": "varsle med|%property",
"devices.signalStrength|block": "signalstyrke",
"devices.tellCameraTo|block": "fjernstyring kamera|%property",
"devices.tellRemoteControlTo|block": "fjernstyring musikkspiller|%property",
"devices|block": "enheter",
"{id:category}Devices": "Fjernstyring"
}

View File

@ -6,7 +6,10 @@
"enums.d.ts",
"shims.d.ts",
"devices.cpp",
"_locales/fr/devices-jsdoc-strings.json"
"_locales/fr/devices-jsdoc-strings.json",
"_locales/no/devices-strings.json",
"_locales/ja/devices-strings.json",
"_locales/ja/devices-jsdoc-strings.json"
],
"public": true,
"dependencies": {

View File

@ -0,0 +1,9 @@
{
"radio.onDataPacketReceived": "無線でパケットを受信したときにコードが実行されます。",
"radio.sendNumber": "無線を使って繋がっているデバイスに、数字をブロードキャストします。",
"radio.sendString": "無線で繋がっているデバイスに、文字列とあわせてデバイスのシリアル番号と実行時間をブロードキャストします。",
"radio.sendValue": "無線で繋がっているデバイスに、名前と値のペアとあわせてデバイスのシリアル番号と実行時間をブロードキャストします。",
"radio.setGroup": "無線のグループ ID を設定します。 1 つのグループ ID上に流れる情報だけを、受信することができます。グループIDは、0-255の間で指定できます。",
"radio.setTransmitPower": "無線での送信に使うパワーを指定します。",
"radio.setTransmitSerialNumber": "無線で、デバイスのシリアル番号を送信するかどうかを指定できます。"
}

View File

@ -0,0 +1,10 @@
{
"radio.onDataPacketReceived|block": "無線で受信したとき",
"radio.sendNumber|block": "無線で数字を送信 %value",
"radio.sendString|block": "無線で文字列を送信 %msg",
"radio.sendValue|block": "無線で送信 | %name |= %value",
"radio.setGroup|block": "無線のグループを設定 %ID",
"radio.setTransmitPower|block": "無線の送信パワー %power",
"radio.setTransmitSerialNumber|block": "無線でシリアル番号を送信 %transmit",
"{id:category}Radio": "無線"
}

View File

@ -0,0 +1,3 @@
{
"radio.onDataPacketReceived": "Setter opp kode som skal kjøres når radioen mottar data. Henter mottatte data inn i en variabel."
}

View File

@ -0,0 +1,17 @@
{
"radio.onDataPacketReceived|block": "når radio mottar",
"radio.onDataReceived|block": "radio når data mottatt",
"radio.receiveNumber|block": "radio motta tall",
"radio.receiveString|block": "radio motta tekst",
"radio.receivedSignalStrength|block": "radio signalstyrke",
"radio.sendNumber|block": "radio send tall %value",
"radio.sendString|block": "radio send tekst %msg",
"radio.sendValue|block": "radio send|verdi %name|= %value",
"radio.setGroup|block": "radio sett gruppe %ID",
"radio.setTransmitPower|block": "radio sett sendereffekt %power",
"radio.setTransmitSerialNumber|block": "radio send alltid serienummer %transmit",
"radio.writeReceivedPacketToSerial|block": "radio skriv mottatt pakke til serieport",
"radio.writeValueToSerial|block": "radio skriv verdi til serieport",
"radio|block": "radio",
"{id:category}Radio": "Radio"
}

View File

@ -0,0 +1,4 @@
{
"radio": "රේඩියෝ පැකට්ටු යොදා ගෙන දත්ත සන්නිවේදනය",
"radio.sendValue|param|value": "සංඛ්‍යාමය අගය"
}

View File

@ -0,0 +1,16 @@
{
"radio.onDataReceived|block": "radio on data received",
"radio.receiveNumber|block": "radio receive number",
"radio.receiveString|block": "radio receive string",
"radio.receivedSignalStrength|block": "radio received signal strength",
"radio.sendNumber|block": "radio send number %value",
"radio.sendString|block": "radio send string %msg",
"radio.sendValue|block": "radio send|value %name|= %value",
"radio.setGroup|block": "radio set group %ID",
"radio.setTransmitPower|block": "radio set transmit power %power",
"radio.setTransmitSerialNumber|block": "radio set transmit serial number %transmit",
"radio.writeReceivedPacketToSerial|block": "radio write received packet to serial",
"radio.writeValueToSerial|block": "radio write value to serial",
"radio|block": "radio",
"{id:category}Radio": "රේඩියෝව"
}

View File

@ -0,0 +1,16 @@
{
"radio.onDataReceived|block": "när radion tar emot data",
"radio.receiveNumber|block": "när radion tar emot nummer",
"radio.receiveString|block": "när radio tar emot sträng",
"radio.receivedSignalStrength|block": "när radio tar emot signalstyrka",
"radio.sendNumber|block": "radio sänd nummer %value",
"radio.sendString|block": "radio sänd sträng %msg",
"radio.sendValue|block": "radio sända|värde %name|= %value",
"radio.setGroup|block": "radio ställ in grupp %ID",
"radio.setTransmitPower|block": "radio ställ in överföringsstyrke %power",
"radio.setTransmitSerialNumber|block": "radio ställ in om serienumret sändas %transmit",
"radio.writeReceivedPacketToSerial|block": "radio skriv mottagna paketet till seriell",
"radio.writeValueToSerial|block": "radio skriv värdet till seriell",
"radio|block": "radio",
"{id:category}Radio": "Radio"
}

View File

@ -8,7 +8,14 @@
"radio.cpp",
"radio.ts",
"_locales/de/radio-strings.json",
"_locales/de/radio-jsdoc-strings.json"
"_locales/de/radio-jsdoc-strings.json",
"_locales/si-LK/radio-strings.json",
"_locales/sv-SE/radio-strings.json",
"_locales/no/radio-strings.json",
"_locales/si-LK/radio-jsdoc-strings.json",
"_locales/no/radio-jsdoc-strings.json",
"_locales/ja/radio-strings.json",
"_locales/ja/radio-jsdoc-strings.json"
],
"public": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "pxt-microbit",
"version": "0.7.45",
"version": "0.9.23",
"description": "micro:bit target for PXT",
"keywords": [
"JavaScript",
@ -36,6 +36,6 @@
"semantic-ui-less": "^2.2.4"
},
"dependencies": {
"pxt-core": "0.11.1"
"pxt-core": "0.11.51"
}
}

View File

@ -14,8 +14,8 @@
"cloud": {
"workspace": false,
"packages": true,
"sharing": false,
"publish": false,
"sharing": true,
"publishing": true,
"preferredPackages": [
"Microsoft/pxt-neopixel",
"Microsoft/pxt-filesystem"
@ -72,6 +72,7 @@
"loopsBlocks": true,
"logicBlocks": true,
"variablesBlocks": true,
"textBlocks": true,
"onStartColor": "#0078D7",
"onStartNamespace": "basic",
"onStartWeight": 54
@ -199,7 +200,7 @@
"appLogo": "./static/icons/apple-touch-icon.png",
"organization": "Microsoft",
"organizationUrl": "https://pxt.io/",
"organizationLogo": "./static/Microsoft-logo_rgb_c-gray.png",
"organizationLogo": "./static/Microsoft-logo_rgb_c-gray-square.png",
"organizationWideLogo": "./static/Microsoft-logo_rgb_c-white.png",
"homeUrl": "https://pxt.microbit.org/",
"embedUrl": "https://pxt.microbit.org/",
@ -207,6 +208,7 @@
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
"githubUrl": "https://github.com/Microsoft/pxt-microbit",
"projectGallery": "projects",
"exampleGallery": "examples",
"crowdinProject": "kindscript",
"boardName": "micro:bit",
"sideDoc": "tutorials/getting-started",
@ -331,7 +333,7 @@
"coloredToolbox": true,
"monacoToolbox": true,
"hasAudio": true,
"blocklyOptions": {
"blocklyOptions": {
"grid": {
"spacing": 45,
"length": 7,

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -129,10 +129,11 @@ namespace pxsim.images {
}
namespace pxsim.ImageMethods {
export function showImage(leds: Image, offset: number) {
export function showImage(leds: Image, offset: number, interval: number) {
pxtrt.nullCheck(leds)
leds.copyTo(offset, 5, board().ledMatrixState.image, 0)
runtime.queueDisplayUpdate()
basic.pause(interval);
}
export function plotImage(leds: Image, offset: number): void {
@ -155,8 +156,8 @@ namespace pxsim.ImageMethods {
ImageMethods.plotImage(leds, frame * Image.height);
}
export function showFrame(leds: Image, frame: number) {
ImageMethods.showImage(leds, frame * Image.height);
export function showFrame(leds: Image, frame: number, interval: number) {
ImageMethods.showImage(leds, frame * Image.height, interval);
}
export function pixel(leds: Image, x: number, y: number): number {

View File

@ -119,6 +119,9 @@ namespace pxsim.pins {
export function getPinAddress(name: number) {
return getPin(name)
}
export function setEvents(name: number, event: number) {
}
}
namespace pxsim.devices {

View File

@ -1,5 +1,5 @@
/* Import all components */
@import 'semantic';
@import 'pxtsemantic';
@import 'pxt';
@import 'themes/default/globals/site.variables';
@import 'themes/pxt/globals/site.variables';