Compare commits

...

32 Commits

Author SHA1 Message Date
0e18b13ea1 0.9.24 2017-02-27 22:44:52 -08:00
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
31 changed files with 390 additions and 193 deletions

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: Let's take a look at a simple class-based example:
```ts ```typescript
class Greeter { class Greeter {
greeting: string; greeting: string;
constructor(message: 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: Let's take a look at an example:
```ts-ignore ```typescript-ignore
class Animal { class Animal {
name: string; name: string;
constructor(theName: string) { this.name = theName; } 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. You may still mark a member `public` explicitly.
We could have written the `Animal` class from the previous section in the following way: We could have written the `Animal` class from the previous section in the following way:
```ts-ignore ```typescript-ignore
class Animal { class Animal {
public name: string; public name: string;
public constructor(theName: string) { this.name = theName; } 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: When a member is marked `private`, it cannot be accessed from outside of its containing class. For example:
```ts-ignore ```typescript-ignore
class Animal { class Animal {
private name: string; private name: string;
constructor(theName: string) { this.name = theName; } 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: Let's look at an example to better see how this plays out in practice:
```ts-ignore ```typescript-ignore
class Animal { class Animal {
private name: string; private name: string;
constructor(theName: string) { this.name = theName; } 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 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, declared `protected` can also be accessed by instances of deriving classes. For example,
```ts-ignore ```typescript-ignore
class Person { class Person {
protected name: string; protected name: string;
constructor(name: string) { this.name = name; } 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`. 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, 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 { class Person {
protected name: string; protected name: string;
protected constructor(theName: string) { this.name = theName; } 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. You can make properties readonly by using the `readonly` keyword.
Readonly properties must be initialized at their declaration or in the constructor. Readonly properties must be initialized at their declaration or in the constructor.
```ts-ignore ```typescript-ignore
class Octopus { class Octopus {
readonly name: string; readonly name: string;
readonly numberOfLegs: number = 8; 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. *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: Here's a further revision of the previous `Octopus` class using a parameter property:
```ts-ignore ```typescript-ignore
class Octopus { class Octopus {
readonly numberOfLegs: number = 8; readonly numberOfLegs: number = 8;
constructor(readonly name: string) { constructor(readonly name: string) {

View File

@ -3,7 +3,7 @@
Functions are the fundamental building block of programs. Here is the simplest Functions are the fundamental building block of programs. Here is the simplest
way to make a function that adds two numbers: way to make a function that adds two numbers:
```ts ```typescript
// Named function // Named function
function add(x : number, y : number) { function add(x : number, y : number) {
return x + y; 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. Functions can refer to variables outside of the function body.
When they do so, they're said to `capture` these variables. When they do so, they're said to `capture` these variables.
```ts ```typescript
let z = 100; let z = 100;
function addToZ(x: number, y: number) { 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: Let's add a return type to our add function:
```ts ```typescript
function add(x: number, y: number): number { function add(x: number, y: number): number {
return x + y; 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. 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) { function buildName(firstName: string, lastName: string) {
return firstName + " " + lastName; 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. 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: 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) { function buildName(firstName: string, lastName?: string) {
if (lastName) if (lastName)
return firstName + " " + 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. These are called default-initialized parameters.
Let's take the previous example and default the last name to `"Smith"`. Let's take the previous example and default the last name to `"Smith"`.
```ts-ignore ```typescript-ignore
function buildName(firstName: string, lastName = "Smith") { function buildName(firstName: string, lastName = "Smith") {
return firstName + " " + lastName; 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. 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 This means optional parameters and trailing default parameters will share commonality in their types, so both
```ts ```typescript
function buildName(firstName: string, lastName?: string) { function buildName(firstName: string, lastName?: string) {
// ... // ...
} }
@ -102,7 +102,7 @@ function buildName(firstName: string, lastName?: string) {
and and
```ts ```typescript
function buildName(firstName: string, lastName = "Smith") { 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. 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`: 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) { function buildName(firstName = "Will", lastName: string) {
return firstName + " " + lastName; 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: In TypeScript, you can gather these arguments together into a variable:
```ts-ignore ```typescript-ignore
function buildName(firstName: string, ...restOfName: string[]) { function buildName(firstName: string, ...restOfName: string[]) {
return firstName + " " + restOfName.join(" "); 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: The ellipsis is also used in the type of the function with rest parameters:
```ts-ignore ```typescript-ignore
function buildName(firstName: string, ...restOfName: string[]) { function buildName(firstName: string, ...restOfName: string[]) {
return firstName + " " + restOfName.join(" "); 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. The most basic datatype is the simple true/false value, which is called a `boolean` value.
```ts ```typescript
let isDone: boolean = false; 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: Integer values can be specified via decimal, hexadecimal and octal notation:
```ts ```typescript
let decimal: number = 42; let decimal: number = 42;
let hex: number = 0xf00d; let hex: number = 0xf00d;
let binary: number = 0b1010; 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. As in other languages, we use the type `string` to refer to textual data.
Use double quotes (`"`) or single quotes (`'`) to surround string data. Use double quotes (`"`) or single quotes (`'`) to surround string data.
```ts ```typescript
let color: string = "blue"; let color: string = "blue";
color = 'red'; color = 'red';
``` ```
@ -40,7 +40,7 @@ color = 'red';
You can also use *template strings*, which can span multiple lines and have embedded expressions. 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 }`. 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 fullName: string = `Bob Bobbington`;
let age: number = 37; let age: number = 37;
let sentence: string = `Hello, my name is ${ fullName }. 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: This is equivalent to declaring `sentence` like so:
```ts ```typescript
let fullName: string = `Bob Bobbington`; let fullName: string = `Bob Bobbington`;
let age: number = 37; let age: number = 37;
let sentence: string = "Hello, my name is " + fullName + ".\n\n" + 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. 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: 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]; let list: number[] = [1, 2, 3];
``` ```
The second way uses a generic array type, `Array<elemType>`: The second way uses a generic array type, `Array<elemType>`:
```ts ```typescript
let list: Array<number> = [1, 2, 3]; 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`. 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. 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} enum Color {Red, Green, Blue}
let c: Color = Color.Green; 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. 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`: For example, we can start the previous example at `1` instead of `0`:
```ts ```typescript
enum Color {Red = 1, Green, Blue} enum Color {Red = 1, Green, Blue}
let c: Color = Color.Green; let c: Color = Color.Green;
``` ```
Or, even manually set all the values in the enum: Or, even manually set all the values in the enum:
```ts ```typescript
enum Color {Red = 1, Green = 2, Blue = 4} enum Color {Red = 1, Green = 2, Blue = 4}
let c: Color = Color.Green; 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. `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: You may commonly see this as the return type of functions that do not return a value:
```ts ```typescript
function warnUser(): void { function warnUser(): void {
basic.showString("This is my warning message"); 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 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 no explicit type annotation. For example, in this code
```ts ```typescript
let x = 3; let x = 3;
let y = x + 3 let y = x + 3
``` ```

View File

@ -1,8 +1,16 @@
# Variable Declarations # 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. Declaring a variable in JavaScript has always traditionally been done with the `var` keyword.
```typescript ```typescript-ignore
var a = 10; 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. ## 4. Write the five (5) lines of code that will add the following five words to `data->coll`: puppy, clock, night, cat, cow.
```ts ```typescript
let coll = (<string[]>[]) let coll : string[] = [];
``` ```
<br/> <br/>

View File

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

@ -17,7 +17,7 @@
"AnalogPin.P20|block": "P20 (write only)", "AnalogPin.P20|block": "P20 (write only)",
"AnalogPin.P5|block": "P5 (write only)", "AnalogPin.P5|block": "P5 (write only)",
"AnalogPin.P6|block": "P6 (write only)", "AnalogPin.P6|block": "P6 (write only)",
"AnalogPin.P7|block": "P5 (write only)", "AnalogPin.P7|block": "P7 (write only)",
"AnalogPin.P8|block": "P8 (write only)", "AnalogPin.P8|block": "P8 (write only)",
"AnalogPin.P9|block": "P9 (write only)", "AnalogPin.P9|block": "P9 (write only)",
"BaudRate.BaudRate115200|block": "115200", "BaudRate.BaudRate115200|block": "115200",

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é", "LedSpriteProperty.Brightness|block": "luminosité",
"Math.randomBoolean|block": "choisir au hasard vrai ou faux", "Math.randomBoolean|block": "choisir au hasard vrai ou faux",
"Math|block": "Maths", "Math|block": "Maths",
@ -30,6 +70,7 @@
"input.magneticForce|block": "force magnétique (µT) |%NAME", "input.magneticForce|block": "force magnétique (µT) |%NAME",
"input.onButtonPressed|block": "lorsque le button|%NAME|est pressé", "input.onButtonPressed|block": "lorsque le button|%NAME|est pressé",
"input.onGesture|block": "lorsque|%NAME", "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.onPinReleased|block": "lorsque la broche %NAME|est lachée",
"input.pinIsPressed|block": "broche %NAME| est pressée", "input.pinIsPressed|block": "broche %NAME| est pressée",
"input.rotation|block": "rotation (°)|%NAME", "input.rotation|block": "rotation (°)|%NAME",

View File

@ -1,92 +1,40 @@
{ {
"Math.randomBoolean":"硬貨を弾くことのようなちょうど 'true' または 'false' の値をランダムに生成します。", "Math.randomBoolean": "「真」か「偽」をランダムに生成します。",
"String.fromCharCode":"指定された ASCII 文字コードから文字列を確認します。", "basic.clearScreen": "すべてのLEDをオフにします。",
"basic":"基本的なマイクロ: ビット機能へのアクセスを提供します。", "basic.forever": "ずっとコードをバックグラウンドで繰り返し実行します。",
"basic.clearScreen":"すべての Led をオフにします。", "basic.pause": "ミリ秒で指定された時間、一時停止します。",
"basic.forever":"永遠にバック グラウンドでコードを繰り返します。各イテレーションを実行するその他のコードを使用できます。", "basic.plotLeds": "LED 画面にイメージを描画します。",
"basic.pause":"ミリ秒で指定された時間一時停止します。", "basic.showIcon": "選択されたアイコンを、LED画面に表示します。",
"basic.plotLeds":"LED 画面にイメージを描画します。", "basic.showLeds": "LED 画面にイメージを描画します。",
"basic.showAnimation":"アニメーションとして LED スクリーンのシーケンスを示しています。", "basic.showNumber": "画面上のに数字をスクロールさせます。数が1桁で、画面上に収まる場合、スクロールしません。",
"basic.showLeds":"LED 画面にイメージを描画します。", "basic.showString": "一度に1文字ずつ、テキストを画面に表示します。1文字だけの場合は、スクロールしません。",
"basic.showNumber":"画面上の数字をスクロールします。数が画面上に収まる場合 (つまりは 1 桁)、スクロールしません。", "input.acceleration": "加速度値を取得します。スクリーンを上に向けて置いたとき、xは0、yも0、zは-1024です",
"basic.showString":"一度に 1 つの文字の表示のテキストを表示します。文字列が画面上に収まる場合 (すなわち、1 つの文字)、スクロールしません。", "input.buttonIsPressed": "``A`` か ``B`` のボタンが押されているかを取得します。",
"control":"ランタイムおよびイベント ユーティリティ。", "input.compassHeading": "現在の、コンパスの値を取得します。",
"control.inBackground":"スケジュールは、バック グラウンドで実行されるコードします。", "input.lightLevel": "LEDスクリーンに当たる光の明るさを 0 (暗い) から 255 (明るい)の範囲で取得します。",
"control.reset":"BBC のマイクロ: ビットをリセットします。", "input.onButtonPressed": "ボタン (``A``, ``B`` or both ``A+B``) が押されたときに実行されます。",
"game":"単一 LED スプライト ゲーム エンジン", "input.onGesture": "ジェスチャ(例えば、ゆさぶる)が行われたときに実行します。",
"game.addScore":"現在のスコアにポイントを追加します。", "input.onPinPressed": "ピンが押されたときに実行されます。",
"game.gameOver":"ゲーム アニメーションを表示します。", "input.onPinReleased": "ピンがタッチされなくなったときに実行されます。",
"game.score":"現在のスコアを取得します。", "input.pinIsPressed": "ピンがタッチされているかの状態を取得します。状態を取得するためには、グラウンドにつながっている必要があります。",
"game.setScore":"現在のスコアの値を設定します", "input.rotation": "デバイスの、ピッチかロールを度数で取得します",
"game.startCountdown":"ゲームのカウント ダウン タイマーを開始します。", "input.runningTime": "電源が入ってから経過したミリ秒数を取得します。",
"images":"作成、操作および LED の画像を表示します。", "input.temperature": "摂氏で、温度を取得します。",
"images.createBigImage":"2 フレームを持つイメージを作成します。", "led.brightness": "画面の明るさを 0 (オフ) 255 (フルに明るい)の範囲で取得します。",
"images.createImage":"LED 画面に合ったイメージを作成します。", "led.enable": "画面を表示、または非表示にします。",
"input":"イベントやセンサーからのデータ", "led.plot": "X、Y座標で指定したLEDを点灯します。(0, 0)が左上です。",
"input.acceleration":"ミリ gravitys の加速度値を取得 (ボードを敷設するときフラット スクリーンを x = 0、y = 0、z = 1024年)", "led.point": "X、Y座標で指定されたLEDの、ON/OFFの状態を取得します。(0,0)が左上です。",
"input.buttonIsPressed":"'、' と 'B' のボタンの状態 (押されてかどうか) を取得します。", "led.setBrightness": "画面の明るさを 0 (オフ) 255 (フルに明るい)の範囲で設定します。",
"input.calibrate":"時代遅れ、コンパス キャリブレーションは自動です。", "led.stopAnimation": "現在のアニメーションをキャンセルし、保留中のアニメーションもクリアします。",
"input.compassHeading":"度で、現在のコンパス コンパス針路を取得します。", "led.toggle": "指定された場所のLEDの点滅を切り替えます。",
"input.lightLevel":"'0 ' (暗い)「255」明るいから適用範囲内の LED スクリーン光レベルを読み取ります。", "led.unplot": "X、Y座標で指定された場所のLEDを消灯します。(0, 0) は左上です。",
"input.magneticForce":"「マイクロ ・ テスラ」(μ '' T '') の磁気力の値を取得します。シミュレータでは、この関数はサポートされていません。", "music.beat": "拍の長さをミリ秒で返します",
"input.onButtonPressed":"'、'、' B '(両方の' A + B ') ボタンが押されたときに何か", "music.changeTempoBy": "テンポを指定した数だけ増減します。",
"input.onGesture":"画面を向いているときに実行するコードをアタッチします。", "music.playTone": "指定された長さの間、``P0``から音を鳴らします。",
"input.onLogoDown":"ロゴは下方向とボードが垂直方向に実行されるコードをアタッチします。", "music.rest": "``P0`` から、指定された時間だけ音を鳴らさない様にします。",
"input.onLogoUp":"ロゴは上方向きとボードが垂直方向に実行されるコードをアタッチします。", "music.rest|param|ms": "残り時間(ミリ秒)",
"input.onPinPressed":"(「P0 '' や '' P1 '' 両方 '' P2 '') ピンが押されたときに何かを行います。", "music.ringTone": "ピン``P0`` から音をを再生します。",
"input.onScreenDown":"画面が直面しているときに実行するコードをアタッチします", "music.setTempo": "テンポを設定します",
"input.onScreenUp":"画面を向いているときに実行するコードをアタッチします。", "music.tempo": "現在のテンポを、bpm (1分間あたりの拍の数)で返します。テンポの値が大きくなると、より早く音楽が再生されます。",
"input.onShake":"デバイスを振るときに実行するコードをアタッチします。", "serial.readLine": "シリアルポートからテキストを読み取ります。"
"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":"書き込み、「名前: 値」ペアのシリアル ライン。"
} }

View File

@ -106,7 +106,8 @@
"String.fromCharCode|block": "文字コード %code|の文字", "String.fromCharCode|block": "文字コード %code|の文字",
"basic.clearScreen|block": "表示を消す", "basic.clearScreen|block": "表示を消す",
"basic.forever|block": "ずっと", "basic.forever|block": "ずっと",
"basic.pause|block": "ひと休み(ミリ秒) %pause", "basic.pause|block": "一時停止(ミリ秒) %pause",
"basic.showIcon|block": "アイコン %i を表示",
"basic.showLeds|block": "LEDに表示", "basic.showLeds|block": "LEDに表示",
"basic.showNumber|block": "数を表示|%number", "basic.showNumber|block": "数を表示|%number",
"basic.showString|block": "文字列を表示|%text", "basic.showString|block": "文字列を表示|%text",
@ -121,9 +122,12 @@
"images.createImage|block": "画像を作成", "images.createImage|block": "画像を作成",
"images|block": "画像", "images|block": "画像",
"input.acceleration|block": "加速度ミリG|%NAME", "input.acceleration|block": "加速度ミリG|%NAME",
"input.buttonIsPressed|block": "ボタン|%NAME|が押されている",
"input.compassHeading|block": "方角(°)", "input.compassHeading|block": "方角(°)",
"input.lightLevel|block": "明るさ", "input.lightLevel|block": "明るさ",
"input.magneticForce|block": "磁力µT|%NAME", "input.magneticForce|block": "磁力µT|%NAME",
"input.onButtonPressed|block": "ボタン|%NAME|が押されたとき",
"input.onGesture|block": "%NAME|とき",
"input.onPinPressed|block": "端子 %name|がタッチされたとき", "input.onPinPressed|block": "端子 %name|がタッチされたとき",
"input.onPinReleased|block": "端子 %NAME|がタッチされなくなったとき", "input.onPinReleased|block": "端子 %NAME|がタッチされなくなったとき",
"input.pinIsPressed|block": "端子 %NAME|がタッチされている", "input.pinIsPressed|block": "端子 %NAME|がタッチされている",
@ -134,11 +138,17 @@
"led.brightness|block": "明るさ", "led.brightness|block": "明るさ",
"led.enable|block": "表示をオンまたはオフにする %on", "led.enable|block": "表示をオンまたはオフにする %on",
"led.plot|block": "点灯|x %x|y %y", "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.toggle|block": "反転|x %x|y %y",
"led.unplot|block": "消灯|x %x|y %y", "led.unplot|block": "消灯|x %x|y %y",
"led|block": "LED", "led|block": "LED",
"music.beat|block": "%fraction|拍", "music.beat|block": "%fraction|拍",
"music.changeTempoBy|block": "テンポを増減するbpm|%value", "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.setTempo|block": "テンポを設定するbpm|%value",
"music.tempo|block": "テンポbpm", "music.tempo|block": "テンポbpm",
"music|block": "音楽", "music|block": "音楽",

View File

@ -7,6 +7,19 @@
"AcceleratorRange.OneG|block": "1 g", "AcceleratorRange.OneG|block": "1 g",
"AcceleratorRange.TwoG": "Akselerometerets måleområde er opp til 2 ganger tyngekraften", "AcceleratorRange.TwoG": "Akselerometerets måleområde er opp til 2 ganger tyngekraften",
"AcceleratorRange.TwoG|block": "2 g", "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.BaudRate115200|block": "115200",
"BaudRate.BaudRate9600|block": "9600", "BaudRate.BaudRate9600|block": "9600",
"BeatFraction.Breve|block": "4", "BeatFraction.Breve|block": "4",
@ -31,6 +44,8 @@
"Direction.Right|block": "høyre", "Direction.Right|block": "høyre",
"DisplayMode.BackAndWhite|block": "svart og hvitt", "DisplayMode.BackAndWhite|block": "svart og hvitt",
"DisplayMode.Greyscale|block": "gråtone", "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": "Hendelse når et støt på over 8G detekteres",
"Gesture.EightG|block": "8 G", "Gesture.EightG|block": "8 G",
"Gesture.FreeFall": "Hendelse når micro:bit faller!", "Gesture.FreeFall": "Hendelse når micro:bit faller!",
@ -121,7 +136,12 @@
"PinPullMode.PullUp|block": "høy", "PinPullMode.PullUp|block": "høy",
"PulseValue.High|block": "høy", "PulseValue.High|block": "høy",
"PulseValue.Low|block": "lav", "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.fromCharCode|block": "tekst fra tegnverdi %code",
"String.substr|block": "del av %this=text|fra posisjon %start|med lengde %length",
"String|block": "Tekst", "String|block": "Tekst",
"basic.clearScreen|block": "tøm skjermen", "basic.clearScreen|block": "tøm skjermen",
"basic.forever|block": "gjenta for alltid", "basic.forever|block": "gjenta for alltid",
@ -138,6 +158,7 @@
"game.addScore|block": "endre poengsum med|%points", "game.addScore|block": "endre poengsum med|%points",
"game.gameOver|block": "game over", "game.gameOver|block": "game over",
"game.score|block": "poengsum", "game.score|block": "poengsum",
"game.setScore|block": "sett poengsum til %points",
"game.startCountdown|block": "start nedtelling|(ms) %duration", "game.startCountdown|block": "start nedtelling|(ms) %duration",
"game|block": "spill", "game|block": "spill",
"images.createBigImage|block": "lag stort bilde", "images.createBigImage|block": "lag stort bilde",
@ -159,20 +180,28 @@
"input.temperature|block": "temperatur (°C)", "input.temperature|block": "temperatur (°C)",
"input|block": "inngang", "input|block": "inngang",
"led.brightness|block": "lysstyrke", "led.brightness|block": "lysstyrke",
"led.enable|block": "skjerm på %on",
"led.plotBarGraph|block": "søylediagram av %value |opp til %high", "led.plotBarGraph|block": "søylediagram av %value |opp til %high",
"led.plot|block": "tenn|x %x|y %y", "led.plot|block": "tenn|x %x|y %y",
"led.point|block": "lyser i|x %x|y %y", "led.point|block": "lyser i|x %x|y %y",
"led.setBrightness|block": "sett lysstyrke %value", "led.setBrightness|block": "sett lysstyrke %value",
"led.stopAnimation|block": "stopp animasjon", "led.stopAnimation|block": "stopp animasjon",
"led.toggle|block": "bytt|x %x|y %y",
"led.unplot|block": "slukk|x %x|y %y",
"led|block": "LED", "led|block": "LED",
"music.beat|block": "%fraction|takt",
"music.changeTempoBy|block": "endre tempo med (bpm)|%value", "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.playTone|block": "spill|tone %note=device_note|i %duration=device_beat",
"music.rest|block": "pause (ms) |%duration = device_beat", "music.rest|block": "pause (ms) |%duration = device_beat",
"music.ringTone|block": "ring tone (Hz)|%note=device_note", "music.ringTone|block": "ring tone (Hz)|%note=device_note",
"music.setTempo|block": "sett tempo til (bpm)|%value", "music.setTempo|block": "sett tempo til (bpm)|%value",
"music.tempo|block": "tempo (bpm)",
"music|block": "musikk", "music|block": "musikk",
"pins.analogPitch|block": "analog tone %frequency|i (ms) %ms",
"pins.analogReadPin|block": "les analogverdi|fra %name", "pins.analogReadPin|block": "les analogverdi|fra %name",
"pins.analogSetPeriod|block": "analog sett periodetid|på %pin|til (µs) %micros", "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.analogWritePin|block": "skriv analog|til %name|verdi %value",
"pins.digitalReadPin|block": "les digitalverdi|fra %name", "pins.digitalReadPin|block": "les digitalverdi|fra %name",
"pins.digitalWritePin|block": "skriv digital|til %name|verdi %value", "pins.digitalWritePin|block": "skriv digital|til %name|verdi %value",
@ -183,15 +212,29 @@
"pins.pulseDuration|block": "pulslengde (µs)", "pins.pulseDuration|block": "pulslengde (µs)",
"pins.servoSetPulse|block": "servo skriv pulslengde|på %value|til (µs) %micros", "pins.servoSetPulse|block": "servo skriv pulslengde|på %value|til (µs) %micros",
"pins.servoWritePin|block": "servo skriv|til %name|verdi %value", "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.setPull|block": "sett utilkoblet verdi|for %pin|til %pull",
"pins.spiWrite|block": "SPI skriv %value",
"pins|block": "tilkoblinger", "pins|block": "tilkoblinger",
"serial.onDataReceived|block": "når serieport|mottar %delimiters=serial_delimiter_conv",
"serial.readLine|block": "serieport|les linje", "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.redirect|block": "sett serieport|tilkobling|send %tx| motta %rx|med hastighet %rate",
"serial.writeLine|block": "serieport|skriv linje %text", "serial.writeLine|block": "serieport|skriv linje %text",
"serial.writeNumber|block": "serieport|skriv tall %value", "serial.writeNumber|block": "serieport|skriv tall %value",
"serial.writeString|block": "serieport|skriv tekst %text", "serial.writeString|block": "serieport|skriv tekst %text",
"serial.writeValue|block": "serieport|skriv verdi %name|= %value", "serial.writeValue|block": "serieport|skriv verdi %name|= %value",
"serial|block": "føljetong", "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}Math": "Matematikk",
"{id:category}Music": "Musikk",
"{id:category}Pins": "Tilkobling",
"{id:category}Serial": "Serieport",
"{id:category}String": "Tekst" "{id:category}String": "Tekst"
} }

View File

@ -284,7 +284,7 @@ declare namespace led {
P5 = 12, // MICROBIT_ID_IO_P5 P5 = 12, // MICROBIT_ID_IO_P5
//% block="P6 (write only)" //% block="P6 (write only)"
P6 = 13, // MICROBIT_ID_IO_P6 P6 = 13, // MICROBIT_ID_IO_P6
//% block="P5 (write only)" //% block="P7 (write only)"
P7 = 14, // MICROBIT_ID_IO_P7 P7 = 14, // MICROBIT_ID_IO_P7
//% block="P8 (write only)" //% block="P8 (write only)"
P8 = 15, // MICROBIT_ID_IO_P8 P8 = 15, // MICROBIT_ID_IO_P8

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
enum IconNames { enum IconNames {
//% block="heart" //% block="heart"
//% blockImage=1
Heart = 0, Heart = 0,
//% block="small heart" //% block="small heart"
SmallHeart, SmallHeart,
@ -136,6 +137,7 @@ namespace basic {
//% blockId=basic_show_icon //% blockId=basic_show_icon
//% block="show icon %i" icon="\uf00a" //% block="show icon %i" icon="\uf00a"
//% parts="ledmatrix" //% parts="ledmatrix"
//% help=basic/show-icon
export function showIcon(icon: IconNames) { export function showIcon(icon: IconNames) {
let res = images.iconImage(icon) let res = images.iconImage(icon)
res.showImage(0) res.showImage(0)
@ -146,6 +148,7 @@ namespace basic {
//% block="show arrow %i=device_arrow" //% block="show arrow %i=device_arrow"
//% parts="ledmatrix" //% parts="ledmatrix"
//% advanced=true //% advanced=true
//% help=basic/show-arrow
export function showArrow(i: number) { export function showArrow(i: number) {
let res = images.arrowImage(i) let res = images.arrowImage(i)
res.showImage(0) res.showImage(0)

View File

@ -112,7 +112,7 @@ enum class Gesture {
EightG = MICROBIT_ACCELEROMETER_EVT_8G EightG = MICROBIT_ACCELEROMETER_EVT_8G
}; };
//% color=300 weight=99 icon="\uf192" //% color=#B4009E weight=99 icon="\uf192"
namespace input { namespace input {
/** /**
* Do something when a button (``A``, ``B`` or both ``A+B``) is pressed * 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 y = uBit.accelerometer.getY();
double z = uBit.accelerometer.getZ(); double z = uBit.accelerometer.getZ();
return (int)sqrt(x*x+y*y+z*z); 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) * 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 // TODO DISPLAY_MODE_BLACK_AND_WHITE_LIGHT_SENSE
}; };
//% color=3 weight=35 icon="\uf205" //% color=#5C2D91 weight=97 icon="\uf205"
namespace led { 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" //% help=led/enable blockId=device_led_enable block="led enable %on"
//% advanced=true parts="ledmatrix" //% advanced=true parts="ledmatrix"

View File

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

View File

@ -33,7 +33,7 @@ enum class AnalogPin {
P5 = MICROBIT_ID_IO_P5, P5 = MICROBIT_ID_IO_P5,
//% block="P6 (write only)" //% block="P6 (write only)"
P6 = MICROBIT_ID_IO_P6, P6 = MICROBIT_ID_IO_P6,
//% block="P5 (write only)" //% block="P7 (write only)"
P7 = MICROBIT_ID_IO_P7, P7 = MICROBIT_ID_IO_P7,
//% block="P8 (write only)" //% block="P8 (write only)"
P8 = MICROBIT_ID_IO_P8, P8 = MICROBIT_ID_IO_P8,

View File

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

View File

@ -212,7 +212,7 @@ declare namespace basic {
//% color=300 weight=99 icon="\uf192" //% color=#B4009E weight=99 icon="\uf192"
declare namespace input { declare namespace input {
/** /**
@ -430,7 +430,7 @@ declare namespace control {
//% color=3 weight=35 icon="\uf205" //% color=#5C2D91 weight=97 icon="\uf205"
declare namespace led { declare namespace led {
/** /**
@ -500,7 +500,7 @@ declare namespace led {
function setDisplayMode(mode: DisplayMode): void; 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" //% help=led/enable blockId=device_led_enable block="led enable %on"
//% advanced=true parts="ledmatrix" shim=led::enable //% advanced=true parts="ledmatrix" shim=led::enable
@ -671,7 +671,7 @@ declare namespace pins {
//% weight=2 color=30 icon="\uf287" //% weight=2 color=#002050 icon="\uf287"
//% advanced=true //% advanced=true
declare namespace serial { 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", "enums.d.ts",
"shims.d.ts", "shims.d.ts",
"devices.cpp", "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, "public": true,
"dependencies": { "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

@ -13,7 +13,9 @@
"_locales/sv-SE/radio-strings.json", "_locales/sv-SE/radio-strings.json",
"_locales/no/radio-strings.json", "_locales/no/radio-strings.json",
"_locales/si-LK/radio-jsdoc-strings.json", "_locales/si-LK/radio-jsdoc-strings.json",
"_locales/no/radio-jsdoc-strings.json" "_locales/no/radio-jsdoc-strings.json",
"_locales/ja/radio-strings.json",
"_locales/ja/radio-jsdoc-strings.json"
], ],
"public": true, "public": true,
"dependencies": { "dependencies": {

View File

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

View File

@ -333,7 +333,7 @@
"coloredToolbox": true, "coloredToolbox": true,
"monacoToolbox": true, "monacoToolbox": true,
"hasAudio": true, "hasAudio": true,
"blocklyOptions": { "blocklyOptions": {
"grid": { "grid": {
"spacing": 45, "spacing": 45,
"length": 7, "length": 7,

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB