Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
4e194536d3 | |||
570cd7474f | |||
9ea5597734 | |||
2c0cc6a3d7 | |||
08f79c5a1a | |||
f817912e07 | |||
603932c2b6 | |||
a0907e7229 | |||
635d4a7624 | |||
69d3938d85 | |||
f08f9105ba | |||
7228cbe1cb | |||
1ea0a0172a | |||
d548dfb578 | |||
a52ce112dc | |||
ea956f1a73 | |||
ba1b9a54b4 | |||
59e39fa76d | |||
9187c47e09 | |||
fcf91caeb4 | |||
822227eb48 | |||
8a331648d6 | |||
4f70d341e4 | |||
e06659ab4c | |||
437c36b983 | |||
3d73f193a8 | |||
a71dee2923 | |||
9ef5b8d4ad | |||
8aa47f3d1e | |||
02b0716043 | |||
188d5b3aa7 | |||
16c67f0e30 | |||
104185a41e | |||
73363d11b2 |
3
.gitignore
vendored
@ -16,6 +16,9 @@ clients/win10/*.opendb
|
||||
clients/**/bin/**
|
||||
clients/**/obj/**
|
||||
clients/electron/projects
|
||||
libs/**/_locales/**
|
||||
libs/**/shims.d.ts
|
||||
libs/**/enums.d.ts
|
||||
|
||||
videos/**
|
||||
|
||||
|
@ -41,3 +41,17 @@
|
||||
## Reference #reference
|
||||
|
||||
* [Reference](/reference)
|
||||
* [Brick](/reference/brick)
|
||||
* [show string](/reference/brick/show-string)
|
||||
* [show number](/reference/brick/show-number)
|
||||
* [show value](/reference/brick/show-value)
|
||||
* [show mood](/reference/brick/show-mood)
|
||||
* [show image](/reference/brick/show-image)
|
||||
* [clear screen](/reference/brick/clear-screen)
|
||||
* [print ports](/reference/brick/print-ports)
|
||||
* [on event](/reference/brick/button/on-event)
|
||||
* [is pressed](/reference/brick/button/is-pressed)
|
||||
* [was pressed](/reference/brick/button/was-pressed)
|
||||
* [pause until](/reference/brick/button/pause-until)
|
||||
* [set light](/reference/brick/set-light)
|
||||
* [battery level](/reference/brick/battery-level)
|
||||
|
@ -7,12 +7,12 @@ Welcome to the **Microsoft MakeCode** editor for the **@boardname@**!
|
||||
You can program the @boardname@ using [Blocks](/blocks) or [JavaScript](/javascript) in your web browser:
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
|
||||
motors.largeA.setSpeed(50)
|
||||
})
|
||||
```
|
||||
```typescript
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
|
||||
motors.largeA.setSpeed(50)
|
||||
})
|
||||
```
|
||||
@ -33,7 +33,7 @@ You can run your code using the micro:bit simulator, all within the confines of
|
||||
The simulator has support for the LED screen, buttons, as well as compass, accelerometer, and digital I/O pins.
|
||||
|
||||
```sim
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
|
||||
motors.largeA.setSpeed(50)
|
||||
})
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
```blocks
|
||||
let speed = 0;
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
if (speed < 100)
|
||||
speed = speed + 10;
|
||||
motors.largeBC.setSpeed(speed);
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
```blocks
|
||||
let speed = 0;
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
if (speed < 100)
|
||||
speed = speed + 10;
|
||||
motors.largeBC.setSpeed(speed);
|
||||
})
|
||||
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch2.onEvent(ButtonEvent.Pressed, function () {
|
||||
if (speed > -100)
|
||||
speed = speed - 10;
|
||||
motors.largeBC.setSpeed(speed);
|
||||
|
@ -17,11 +17,11 @@ function update() {
|
||||
brick.showString("speed: " + speed, 1)
|
||||
motors.largeBC.setSpeed(speed)
|
||||
}
|
||||
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch2.onEvent(ButtonEvent.Pressed, function () {
|
||||
accelerate()
|
||||
update()
|
||||
})
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
decelerate()
|
||||
update()
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Ignition Activity 1
|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.eyesDizzy)
|
||||
})
|
||||
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectDetected, function () {
|
||||
|
@ -7,7 +7,7 @@ sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright,
|
||||
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
})
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsLightOn);
|
||||
})
|
||||
```
|
@ -1,9 +1,9 @@
|
||||
# Reversing the robot Activity 1
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
motors.largeBC.setSpeed(50)
|
||||
sensors.touch1.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
|
||||
motors.largeBC.setSpeed(0)
|
||||
loops.pause(1000)
|
||||
brick.setLight(BrickLight.OrangeFlash)
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Reversing the robot Activity 2
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
sensors.touch1.pauseUntil(TouchSensorEvent.Pressed)
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
|
||||
motors.largeBC.setSpeed(50)
|
||||
sensors.touch2.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch2.pauseUntil(ButtonEvent.Pressed)
|
||||
motors.largeBC.setSpeed(0)
|
||||
loops.pause(1000)
|
||||
brick.setLight(BrickLight.OrangeFlash)
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Reversing the robot Activity 3
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
brick.showImage(images.eyesSleeping)
|
||||
sensors.touch1.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
|
||||
brick.showImage(images.eyesNeutral)
|
||||
motors.largeBC.setSpeed(50)
|
||||
sensors.touch2.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch2.pauseUntil(ButtonEvent.Pressed)
|
||||
brick.showImage(images.eyesTiredMiddle)
|
||||
motors.largeBC.setSpeed(0)
|
||||
loops.pause(1000)
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
```blocks
|
||||
let drive: number[] = []
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(1)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonRight.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(3)
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonUp.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(4)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonDown.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(5)
|
||||
})
|
||||
pauseUntil(() => drive.length >= 5)
|
||||
|
@ -2,23 +2,23 @@
|
||||
|
||||
```blocks
|
||||
let drive: number[] = []
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(1)
|
||||
music.playSoundEffectUntilDone(sounds.systemClick)
|
||||
})
|
||||
brick.buttonRight.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonRight.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(3)
|
||||
music.playSoundEffectUntilDone(sounds.systemClick)
|
||||
})
|
||||
brick.buttonUp.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonUp.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(4)
|
||||
music.playSoundEffectUntilDone(sounds.systemClick)
|
||||
})
|
||||
brick.buttonDown.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonDown.onEvent(ButtonEvent.Bumped, function () {
|
||||
drive.push(5)
|
||||
music.playSoundEffectUntilDone(sounds.systemClick)
|
||||
})
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Click);
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
|
||||
loops.pause(1000)
|
||||
music.playSoundEffectUntilDone(sounds.communicationGo)
|
||||
for (let d of drive) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Three Point Turn Activity 1
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
motors.largeBC.tank(75, 30)
|
||||
loops.pause(1500)
|
||||
motors.largeBC.tank(-30, -75)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Three Point Turn Activity 2
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
motors.largeBC.tank(75, 30)
|
||||
loops.pause(1500)
|
||||
motors.largeBC.tank(-30, -75)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Three Point Turn Activity 3
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
motors.largeBC.tank(75, 30)
|
||||
loops.pause(1500)
|
||||
motors.largeBC.tank(-30, -75)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Traffic Lights Activity 1
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
motors.largeBC.tank(20, 20)
|
||||
sensors.color3.pauseForColor(ColorSensorColor.Red)
|
||||
motors.largeBC.tank(0, 0)
|
||||
|
@ -111,7 +111,7 @@ function stop() {
|
||||
motors.stopAllMotors()
|
||||
state = 0
|
||||
moods.knockedOut.show();
|
||||
sensors.touch3.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch3.pauseUntil(ButtonEvent.Pressed)
|
||||
moods.neutral.show();
|
||||
}
|
||||
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectNear, function () {
|
||||
|
@ -149,7 +149,7 @@ loops.forever(function () {
|
||||
brick.setLight(BrickLight.RedPulse);
|
||||
brick.showImage(images.eyesKnockedOut)
|
||||
music.playSoundEffect(sounds.movementsSpeedDown)
|
||||
sensors.touch3.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch3.pauseUntil(ButtonEvent.Pressed)
|
||||
brick.setLight(BrickLight.Off);
|
||||
})
|
||||
|
||||
|
@ -11,7 +11,7 @@ function INI() {
|
||||
motors.mediumA.setSpeed(30, 1, MoveUnit.Seconds);
|
||||
motors.mediumA.setSpeed(-50, 90, MoveUnit.Degrees);
|
||||
motors.largeC.setSpeed(50)
|
||||
sensors.touch1.pauseUntil(TouchSensorEvent.Pressed);
|
||||
sensors.touch1.pauseUntil(ButtonEvent.Pressed);
|
||||
motors.largeC.setSpeed(-50, 0.86, MoveUnit.Rotations);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ function INI() {
|
||||
motors.mediumA.setSpeed(30, 1, MoveUnit.Seconds);
|
||||
motors.mediumA.setSpeed(-50, 90, MoveUnit.Degrees);
|
||||
motors.largeC.setSpeed(50)
|
||||
sensors.touch1.pauseUntil(TouchSensorEvent.Pressed);
|
||||
sensors.touch1.pauseUntil(ButtonEvent.Pressed);
|
||||
motors.largeC.setSpeed(-50, 0.86, MoveUnit.Rotations);
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ loops.forever(function () {
|
||||
brick.setLight(BrickLight.RedPulse);
|
||||
brick.showImage(images.eyesKnockedOut)
|
||||
music.playSoundEffect(sounds.movementsSpeedDown)
|
||||
sensors.touch3.pauseUntil(TouchSensorEvent.Pressed)
|
||||
sensors.touch3.pauseUntil(ButtonEvent.Pressed)
|
||||
brick.setLight(BrickLight.Off);
|
||||
})
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
Use a touch sensor to make the brick happy.
|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
})
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Released, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Released, function () {
|
||||
brick.showImage(images.expressionsSick)
|
||||
})
|
||||
```
|
@ -44,7 +44,7 @@ loops.forever(function () {
|
||||
lasterror = error
|
||||
if (brick.buttonEnter.wasPressed()) {
|
||||
motors.largeBC.setSpeed(0)
|
||||
brick.buttonDown.pauseUntil(ButtonEvent.Click)
|
||||
brick.buttonDown.pauseUntil(ButtonEvent.Bumped)
|
||||
}
|
||||
})
|
||||
```
|
40
docs/examples/print-ports.md
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
# Print Ports
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Print the port states on the screen
|
||||
*/
|
||||
//% blockId=brickPrintPorts block="print ports"
|
||||
//% help=brick/print-ports
|
||||
//% weight=1 group="Screen"
|
||||
function printPorts() {
|
||||
const col = 44;
|
||||
clearScreen();
|
||||
|
||||
function scale(x: number) {
|
||||
if (Math.abs(x) > 1000) return Math.round(x / 100) / 10 + "k";
|
||||
return ("" + (x >> 0));
|
||||
}
|
||||
|
||||
// motors
|
||||
const datas = motors.getAllMotorData();
|
||||
for(let i = 0; i < datas.length; ++i) {
|
||||
const data = datas[i];
|
||||
if (!data.actualSpeed && !data.count) continue;
|
||||
const x = i * col;
|
||||
print(`${scale(data.actualSpeed)}%`, x, brick.LINE_HEIGHT)
|
||||
print(`${scale(data.count)}>`, x, 2 * brick.LINE_HEIGHT)
|
||||
print(`${scale(data.tachoCount)}|`, x, 3 * brick.LINE_HEIGHT)
|
||||
}
|
||||
|
||||
// sensors
|
||||
const sis = sensors.internal.getActiveSensors();
|
||||
for(let i =0; i < sis.length; ++i) {
|
||||
const si = sis[i];
|
||||
const x = (si.port() - 1) * col;
|
||||
const v = si._query();
|
||||
print(`${scale(v)}`, x, 9 * brick.LINE_HEIGHT)
|
||||
}
|
||||
}
|
||||
```
|
@ -3,7 +3,7 @@
|
||||
This program will activate an alarm when an object is lifted from the Touch Sensor.
|
||||
|
||||
```blocks
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Released, function () {
|
||||
sensors.touch1.onEvent(ButtonEvent.Released, function () {
|
||||
music.playSoundEffectUntilDone(sounds.informationActivate);
|
||||
})
|
||||
```
|
@ -1,8 +1,11 @@
|
||||
# Reference
|
||||
|
||||
|
||||
```namespaces
|
||||
brick.showMood(moods.sleeping);
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
[brick](/reference/brick),
|
||||
[touch sensor](/reference/sensors/touch-sensor),
|
||||
[color sensor](/reference/sensors/color-sensor)
|
30
docs/reference/brick.md
Normal file
@ -0,0 +1,30 @@
|
||||
# Brick
|
||||
|
||||
## Screen
|
||||
|
||||
```cards
|
||||
brick.showMood(moods.sleeping);
|
||||
brick.showImage(images.expressionsBigSmile);
|
||||
brick.showString("Hello world!", 1);
|
||||
brick.showNumber(0, 1);
|
||||
brick.showValue("item", 0, 1);
|
||||
brick.clearScreen();
|
||||
```
|
||||
|
||||
## Buttons
|
||||
|
||||
```cards
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
|
||||
});
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
|
||||
brick.buttonEnter.isPressed()
|
||||
brick.buttonEnter.wasPressed()
|
||||
brick.setLight(BrickLight.Red);
|
||||
```
|
||||
|
||||
## Other
|
||||
|
||||
```cards
|
||||
brick.batteryLevel()
|
||||
```
|
33
docs/reference/brick/battery-level.md
Normal file
@ -0,0 +1,33 @@
|
||||
# battery Level
|
||||
|
||||
Return the current battery level.
|
||||
|
||||
```sig
|
||||
brick.batteryLevel();
|
||||
```
|
||||
|
||||
## Returns
|
||||
|
||||
* a [number](/types/number) which is the current charge level of the brick's battery. This is a percentage of total charge left in the battery.
|
||||
|
||||
## Example
|
||||
|
||||
Show the battery level percentage on the screen. Also, show a green light if the battery level is above 15%. If the battery level is below 15% but above 5%, show a orange light. But, if the battery level is below 5%, show a pulsing red light.
|
||||
|
||||
```blocks
|
||||
let battery = 0;
|
||||
loops.forever(function() {
|
||||
brick.showString("Battery level:", 1)
|
||||
brick.showNumber(battery, 2)
|
||||
battery = brick.batteryLevel();
|
||||
if (battery > 15)
|
||||
{
|
||||
brick.setLight(BrickLight.Green);
|
||||
} else if (battery > 5) {
|
||||
brick.setLight(BrickLight.Orange);
|
||||
} else {
|
||||
brick.setLight(BrickLight.RedPulse)
|
||||
}
|
||||
loops.pause(30000)
|
||||
})
|
||||
```
|
53
docs/reference/brick/button/is-pressed.md
Normal file
@ -0,0 +1,53 @@
|
||||
# is Pressed
|
||||
|
||||
Check if a button is being pressed or not.
|
||||
|
||||
```sig
|
||||
brick.buttonEnter.isPressed()
|
||||
```
|
||||
|
||||
## ~hint
|
||||
|
||||
**Touch sensors**
|
||||
|
||||
Your @boardname@ has touch sensors that work like buttons. Instead of saying `enter` or `left` as the source button, use a touch sensor block with a sensor name like `touch 1`.
|
||||
|
||||
```block
|
||||
if (sensors.touch1.isPressed()) {
|
||||
console.log("Hey, I feel pressed.");
|
||||
}
|
||||
```
|
||||
|
||||
Read about [touch sensors](/reference/sensors/touch-sensor) and using them as touch buttons.
|
||||
|
||||
## ~
|
||||
|
||||
## Returns
|
||||
|
||||
* a [boolean](types/boolean): `true` if the button is pressed, `false` if the button is not pressed
|
||||
|
||||
## Example
|
||||
|
||||
Set the brick light to green when the `down` is pressed. When the button is not pressed, the brick light is red.
|
||||
|
||||
```blocks
|
||||
let isRed = false;
|
||||
loops.forever(function() {
|
||||
if (brick.buttonLeft.isPressed()) {
|
||||
brick.setLight(BrickLight.Green);
|
||||
isRed = false;
|
||||
} else {
|
||||
if (!isRed) {
|
||||
brick.setLight(BrickLight.Red);
|
||||
isRed = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[was pressed](/reference/brick/button/was-pressed),
|
||||
[on event](/reference/brick/button/on-event)
|
||||
|
||||
[Touch sensors](/reference/sensors/touch-sensor)
|
57
docs/reference/brick/button/on-event.md
Normal file
@ -0,0 +1,57 @@
|
||||
# on Event
|
||||
|
||||
Run some code when a button is clicked, pressed down, or released.
|
||||
|
||||
```sig
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
## ~hint
|
||||
|
||||
**Touch sensors**
|
||||
|
||||
Your @boardname@ has touch sensors that work like buttons. Instead of saying `enter` or `left` as the source button, use a touch sensor block with a sensor name like `touch 1`.
|
||||
|
||||
```block
|
||||
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.setLight(BrickLight.Orange);
|
||||
});
|
||||
```
|
||||
|
||||
Read about [touch sensors](/reference/sensors/touch-sensor) and using them as touch buttons.
|
||||
|
||||
## ~
|
||||
|
||||
## Parameters
|
||||
|
||||
* **ev**: the button action to run some code for. The button actions (events) are:
|
||||
> * ``click``: button was clicked (pressed and released)
|
||||
> * ``up``: button is released from just being pressed
|
||||
> * ``down``: button is just pressed down
|
||||
* **body**: the code you want to run when something happens with a button
|
||||
|
||||
## Example
|
||||
|
||||
Check for event on the ENTER button. Put a message on the screen when the button is pressed, clicked, or released.
|
||||
|
||||
```blocks
|
||||
brick.showString("ENTER is: UP", 1);
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Released, function () {
|
||||
brick.showString("ENTER is: UP ", 1);
|
||||
});
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
brick.showString("ENTER is: DOWN ", 1);
|
||||
});
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
brick.showString("ENTER was: CLICKED", 1);
|
||||
});
|
||||
```
|
||||
|
||||
### See also
|
||||
|
||||
[is pressed](/reference/brick/button/is-pressed),
|
||||
[was pressed](/reference/brick/button/was-pressed),
|
||||
|
||||
[Touch sensor](/reference/sensors/touch-sensor)
|
37
docs/reference/brick/button/pause-until.md
Normal file
@ -0,0 +1,37 @@
|
||||
# pause Until
|
||||
|
||||
Causes your program to wait until an event at a button happens.
|
||||
|
||||
```sig
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
* **ev**: the button action to wait for. The button actions (events) are:
|
||||
> * ``click``: button was clicked (pressed and released)
|
||||
> * ``up``: button is released from just being pressed
|
||||
> * ``down``: button is just pressed down
|
||||
|
||||
## Example
|
||||
|
||||
Wait for the `up` button to go up before continuing with displaying a message on the screen.
|
||||
|
||||
```blocks
|
||||
let waitTime = 0;
|
||||
brick.showString("We're going to wait", 1);
|
||||
brick.showString("for you to press and", 2);
|
||||
brick.showString("release the UP button", 3);
|
||||
waitTime = control.millis();
|
||||
brick.buttonUp.pauseUntil(ButtonEvent.Bumped);
|
||||
brick.clearScreen();
|
||||
if (control.millis() - waitTime > 5000) {
|
||||
brick.showString("Ok, that took awhile!", 1)
|
||||
} else {
|
||||
brick.showString("Ah, you let go!", 1)
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[on event](/reference/brick/button/on-event)
|
50
docs/reference/brick/button/was-pressed.md
Normal file
@ -0,0 +1,50 @@
|
||||
# was Pressed
|
||||
|
||||
Check if a button was pressed earlier.
|
||||
|
||||
```sig
|
||||
brick.buttonEnter.wasPressed()
|
||||
```
|
||||
|
||||
The fact that a button was pressed earlier is remembered. Once **was pressed** is used, this fact is forgotten and the result is `false` the next time you check with **was pressed** button _state_ is reset). But, if you press the button again before you check with **was pressed**, it will tell you `true`.
|
||||
|
||||
## ~hint
|
||||
|
||||
**Touch sensors**
|
||||
|
||||
Your @boardname@ has touch sensors that work like buttons. Instead of saying `enter` or `left` as the source button, use a touch sensor block with a sensor name like `touch 1`.
|
||||
|
||||
```block
|
||||
if (sensors.touch1.wasPressed()) {
|
||||
console.log("Hey, I was pressed.");
|
||||
}
|
||||
```
|
||||
|
||||
Read about [touch sensors](/reference/sensors/touch-sensor) and using them as touch buttons.
|
||||
|
||||
## ~
|
||||
|
||||
## Returns
|
||||
|
||||
* a [boolean](types/boolean): `true` if the button was pressed before, `false` if the button was not pressed before
|
||||
|
||||
## Example
|
||||
|
||||
Set the brick light to green if the `right` button was pressed before the `left` button. If not, the brick light is turned off when the `left` button is pressed.
|
||||
|
||||
```blocks
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Bumped, function() {
|
||||
if (brick.buttonRight.wasPressed()) {
|
||||
brick.setLight(BrickLight.Green)
|
||||
} else {
|
||||
brick.setLight(BrickLight.Off)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[is pressed](/reference/brick/button/is-pressed),
|
||||
[on event](/reference/brick/button/on-event)
|
||||
|
||||
[Touch sensors](/reference/sensors/touch-sensor)
|
22
docs/reference/brick/clear-screen.md
Normal file
@ -0,0 +1,22 @@
|
||||
# clear Screen
|
||||
|
||||
Clear any text or numbers displayed on the screen. The screen will be blank.
|
||||
|
||||
```sig
|
||||
brick.clearScreen();
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
Clear the screen after displaying the message.
|
||||
|
||||
```blocks
|
||||
brick.showString("This message will", 1);
|
||||
brick.showString("self-destruct in:", 2);
|
||||
brick.showString("seconds", 5);
|
||||
for (let i = 0; i < 10; i++) {
|
||||
brick.showNumber(10 - i, 4);
|
||||
loops.pause(1000);
|
||||
}
|
||||
brick.clearScreen();
|
||||
```
|
37
docs/reference/brick/set-light.md
Normal file
@ -0,0 +1,37 @@
|
||||
# set Light
|
||||
|
||||
Set the light on the brick to a solid or flashing color.
|
||||
|
||||
```sig
|
||||
brick.setLight(BrickLight.Red);
|
||||
```
|
||||
## Parameters
|
||||
|
||||
* **pattern**: the color or color pattern for the brick light to show. The brick light can have these color patterns:
|
||||
>* `off`: brick light is off
|
||||
>* `green`: solid green
|
||||
>* `red`: solid red
|
||||
>* `orange`: solid orange
|
||||
>* `green flash`: flashing green
|
||||
>* `red flash`: flashing red
|
||||
>* `orange flash`: flashing orange
|
||||
>* `green pulse`: pulsing green
|
||||
>* `red pulse`: pulsing red
|
||||
>* `orange pulse`: pulsing orange
|
||||
|
||||
## Example
|
||||
|
||||
Repeatedly show a different color pattern for the brick light.
|
||||
|
||||
```blocks
|
||||
loops.forever(function () {
|
||||
brick.setLight(BrickLight.Orange)
|
||||
loops.pause(1000)
|
||||
brick.setLight(BrickLight.GreenFlash)
|
||||
loops.pause(2000)
|
||||
brick.setLight(BrickLight.RedPulse)
|
||||
loops.pause(2000)
|
||||
brick.setLight(BrickLight.Off)
|
||||
loops.pause(500)
|
||||
})
|
||||
```
|
24
docs/reference/brick/show-image.md
Normal file
@ -0,0 +1,24 @@
|
||||
# show Image
|
||||
|
||||
Show an image on the brick's display.
|
||||
|
||||
```sig
|
||||
brick.showImage(images.expressionsBigSmile);
|
||||
```
|
||||
You can choose one of several images to show on the display.
|
||||
|
||||
## Parameters
|
||||
|
||||
**image**: A image to show on the brick's display. Use the image picker to choose the image you want to show.
|
||||
|
||||
## Example
|
||||
|
||||
Show a sleeping image on the brick's display.
|
||||
|
||||
```blocks
|
||||
brick.showImage(images.expressionsZzz)
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[show image](/reference/brick/show-mood)
|
24
docs/reference/brick/show-number.md
Normal file
@ -0,0 +1,24 @@
|
||||
# show Number
|
||||
|
||||
Show a number on the screen at the line you select.
|
||||
|
||||
```sig
|
||||
brick.showNumber(0, 1);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
* **value**: a [number](/types/number) to show on the brick's screen.
|
||||
* **line**: The line number on the screen where the value is displayed. The line numbers for the screen start with line `1`.
|
||||
|
||||
## Example
|
||||
|
||||
Show the number `1000` on the screen.
|
||||
|
||||
```blocks
|
||||
brick.showNumber(1000, 1);
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[show string](/reference/brick/show-string), [show value](/reference/brick/show-value)
|
29
docs/reference/brick/show-string.md
Normal file
@ -0,0 +1,29 @@
|
||||
# show String
|
||||
|
||||
Show some text on a the screen at the line you select.
|
||||
|
||||
```sig
|
||||
brick.showString("Hello world", 1)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
* **text**: a [string](/types/string) to show on the brick's screen.
|
||||
* **line**: the line [number](/types/number) on the screen where the text is displayed. The line numbers for the screen start with line `1`.
|
||||
|
||||
## Example
|
||||
|
||||
Show a greeting on the screen. Then, respond with another message when ENTER is pressed.
|
||||
|
||||
```blocks
|
||||
brick.showString("Hello, I dare you to", 1);
|
||||
brick.showString("press ENTER...", 2);
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
brick.showString("Hey! Don't push my", 4);
|
||||
brick.showString("buttons.", 5);
|
||||
});
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[show number](/reference/brick/show-number)
|
29
docs/reference/brick/show-value.md
Normal file
@ -0,0 +1,29 @@
|
||||
# show Value
|
||||
|
||||
Show a name-value-pair on the screen at the line you select.
|
||||
|
||||
```sig
|
||||
brick.showValue("item", 0, 1);
|
||||
```
|
||||
|
||||
Name-value-pairs are used to report data values to the screen. If you want to show the current temperature on the screen, you might use `"temp"` as the data name for the the value.
|
||||
|
||||
## Parameters
|
||||
|
||||
* **name**: a [string](/types/string) which is the name of the data value.
|
||||
* **value**: a [number](/types/number) to show on the brick's screen.
|
||||
* **line**: The line number on the screen where the value is displayed. The line numbers for the screen start with line `1`.
|
||||
|
||||
## Example
|
||||
|
||||
Show the current amount of ambient light detected by sensor 2.
|
||||
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
|
||||
brick.showValue("color", sensors.color2.light(LightIntensityMode.Ambient), 1)
|
||||
})
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[show number](/reference/brick/show-number)
|
BIN
docs/static/configurations/chrome-version.png
vendored
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/static/configurations/edge-version.png
vendored
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
docs/static/configurations/firefox-version.png
vendored
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
docs/static/configurations/ie-version.png
vendored
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
docs/static/configurations/osx-version.png
vendored
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
docs/static/configurations/safari-version.png
vendored
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
docs/static/configurations/windows-version.png
vendored
Normal file
After Width: | Height: | Size: 82 KiB |
331
docs/static/download/connect.svg
vendored
Normal file
@ -0,0 +1,331 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="261.3" height="109.3" viewBox="0 0 69.1 28.9" id="svg9461">
|
||||
<defs id="defs9455">
|
||||
<clipPath id="clipPath8689">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8687"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8663">
|
||||
<path d="M309.8 89.4h3.7v3.7h-3.7z" id="path8661"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8647">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8645"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .6661 -.32488 0 300.7 115)" id="linearGradient8637">
|
||||
<stop offset="0" id="stop8633" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop8635" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8595">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8593"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 12.8096 -17.18704 0 300.7 98.4)" id="linearGradient8585">
|
||||
<stop offset="0" id="stop8579" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop8581" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop8583" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8561">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8559"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.33016 5.597 0 300.7 88.4)" id="linearGradient8551">
|
||||
<stop offset="0" id="stop8547" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8549" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8525">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8523"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.56074 .70884 0 300.7 115.6)" id="linearGradient8515">
|
||||
<stop offset="0" id="stop8511" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8513" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8493">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8491"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.39765 2.48247 0 300.7 98.1)" id="linearGradient8483">
|
||||
<stop offset="0" id="stop8479" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop8481" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8449">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8447"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8977">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8975"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8951">
|
||||
<path d="M593 101h3.6v3.7H593z" id="path8949"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8935">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8933"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .67046 -.32706 0 583.8 126.8)" id="linearGradient8925">
|
||||
<stop offset="0" id="stop8921" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop8923" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8883">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8881"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 12.89405 -17.29507 0 583.7 110)" id="linearGradient8873">
|
||||
<stop offset="0" id="stop8867" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop8869" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop8871" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8849">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8847"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.33884 5.6329 0 583.7 100)" id="linearGradient8839">
|
||||
<stop offset="0" id="stop8835" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8837" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8813">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8811"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.56429 .71345 0 583.7 127.4)" id="linearGradient8803">
|
||||
<stop offset="0" id="stop8799" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8801" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8781">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8779"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.41323 2.4988 0 583.7 109.8)" id="linearGradient8771">
|
||||
<stop offset="0" id="stop8767" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop8769" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8737">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8735"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9285">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9283"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9259">
|
||||
<path d="M852.5 96.3h3.3v3.3h-3.3z" id="path9257"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9243">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9241"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .61565 -.3002 0 844 120)" id="linearGradient9233">
|
||||
<stop offset="0" id="stop9229" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop9231" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9191">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9189"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 11.84237 -15.8829 0 844 104.6)" id="linearGradient9181">
|
||||
<stop offset="0" id="stop9175" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop9177" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop9179" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9157">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9155"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.22922 5.1724 0 844 95.3)" id="linearGradient9147">
|
||||
<stop offset="0" id="stop9143" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop9145" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9121">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9119"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.51809 .65506 0 844 120.5)" id="linearGradient9111">
|
||||
<stop offset="0" id="stop9107" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop9109" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9089">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9087"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.21578 2.29436 0 844 104.3)" id="linearGradient9079">
|
||||
<stop offset="0" id="stop9075" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop9077" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9009">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9007"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9041">
|
||||
<path d="M779.5 134.7h16.7v-12.6h-16.7z" id="path9039"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9045">
|
||||
<path d="M779.5 134.7h16.7v-12.6h-16.7z" id="path9043"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8907">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8905"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8881">
|
||||
<path d="M309.8 89.4h3.7v3.7h-3.7z" id="path8879"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8865">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8863"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8813-1">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8811-4"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8779">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8777"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8743">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8741"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8711">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8709"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8667">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8665"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="layer1" transform="translate(0 -268)">
|
||||
<g id="g11329" transform="matrix(.35278 0 0 -.35278 -42.7 327.3)">
|
||||
<g id="g8661">
|
||||
<g clip-path="url(#clipPath8667)" id="g8663">
|
||||
<g transform="translate(134 148)" id="g8669">
|
||||
<path id="path8671" d="M0 0h83a4 4 0 0 0 4-4v-52.5H-4V-4a4 4 0 0 0 4 4" fill="#e6e6e6"/>
|
||||
</g>
|
||||
<g transform="translate(134 146.5)" id="g8673">
|
||||
<path id="path8675" d="M0 0h83c1.3 0 2.4-1.1 2.4-2.5V-52c0-.9-.6-1.5-1.5-1.5H-1c-.8 0-1.5.6-1.5 1.5v49.5C-2.5-1.1-1.4 0 0 0z" fill="none" stroke="#282828" stroke-width="3"/>
|
||||
</g>
|
||||
<g transform="translate(121 91)" id="g8677">
|
||||
<path id="path8679" d="M0 0h108.8v-1.2a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3z" fill="#626262"/>
|
||||
</g>
|
||||
<g transform="translate(165.8 91)" id="g8681">
|
||||
<path id="path8683" d="M0 0h19.3c0-.8-.6-1.4-1.4-1.4H1.4C.6-1.4 0-.8 0 0" fill="#818181"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8685">
|
||||
<g id="g8687">
|
||||
<g id="g8693">
|
||||
<g id="g8695">
|
||||
<path id="path8703" d="M285 127.8a.6.6 0 0 1-.7-.5V96.9c0-.3.3-.6.6-.6h31.5c.3 0 .6.3.6.6v30.4c0 .3-.3.5-.6.5z" fill="url(#linearGradient8483)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8705">
|
||||
<g clip-path="url(#clipPath8711)" id="g8707">
|
||||
<g transform="translate(286.8 99.6)" id="g8713">
|
||||
<path id="path8715" d="M0 0h27.8c.4 0 .6-.3.6-.6v-11.3c0-.4-.2-.6-.6-.6H0c-.3 0-.6.2-.6.6V-.6c0 .3.3.6.6.6" fill="#f2f2f2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8717">
|
||||
<g id="g8719">
|
||||
<g id="g8725">
|
||||
<g id="g8727">
|
||||
<path id="path8735-5" d="M286.5 137.2a.6.6 0 0 1-.6-.6v-22.2c0-.3.3-.6.6-.6h28.4c.3 0 .5.3.5.6v22.2c0 .3-.2.6-.5.6z" fill="url(#linearGradient8515)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8737">
|
||||
<g clip-path="url(#clipPath8743)" id="g8739">
|
||||
<g transform="translate(289.7 134.1)" id="g8745">
|
||||
<path id="path8747" d="M0 0h22c.6 0 1-.5 1-1.1v-12.4c0-.6-.4-1-1-1H0c-.6 0-1.1.4-1.1 1V-1c0 .5.5 1 1.1 1" fill="#393939"/>
|
||||
</g>
|
||||
<g transform="translate(291.4 133.5)" id="g8749">
|
||||
<path id="path8751" d="M0 0h18.7c.4 0 .8-.4.8-.8v-11.9c0-.4-.4-.8-.8-.8H0c-.4 0-.8.3-.8.8V-.8c0 .4.4.8.8.8" fill="#98b6a7"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8753">
|
||||
<g id="g8755">
|
||||
<g id="g8761">
|
||||
<g id="g8763">
|
||||
<path id="path8771" d="M286.2 94v-6.4c0-.3.2-.6.6-.6h27.8c.3 0 .6.3.6.6V94z" fill="url(#linearGradient8551)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8773">
|
||||
<g clip-path="url(#clipPath8779)" id="g8775">
|
||||
<g transform="translate(298.7 97.7)" id="g8781">
|
||||
<path id="path8783" d="M0 0l-4.2 4.2v.5h-1a2.4 2.4 0 0 0 0 5h1v.5L0 14.4h4l4.2-4.2v-.6h1a2.4 2.4 0 1 0 0-4.9h-1v-.5L4.2 0z" fill="#6a6a6a"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8785">
|
||||
<g id="g8787">
|
||||
<g id="g8793">
|
||||
<g id="g8795">
|
||||
<path id="path8805" d="M298.7 112.1l-4.2-4.3v-.5h-1c-1.4 0-2.5-1-2.5-2.4s1.1-2.5 2.5-2.5h1v-.5l4.2-4.2h4.2l4 4.2v.5h1c1.4 0 2.5 1.1 2.5 2.5 0 1.3-1.1 2.4-2.5 2.4h-1v.6l-4 4.2z" fill="url(#linearGradient8585)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8807">
|
||||
<g clip-path="url(#clipPath8813-1)" id="g8809">
|
||||
<g transform="translate(293.4 106.7)" id="g8815">
|
||||
<path id="path8817" d="M0 0h3v-3.6H0c-1 0-1.8.8-1.8 1.8S-1 0 0 0" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g transform="translate(308 103.1)" id="g8819">
|
||||
<path id="path8821" d="M0 0h-3v3.6h3c1 0 1.8-.8 1.8-1.8S1 0 0 0" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g transform="translate(299 106.7)" id="g8823">
|
||||
<path id="path8825" d="M0 0h3.5l.2-.1v-3.4l-.2-.1H0l-.1.1V0H0" fill="#393939"/>
|
||||
</g>
|
||||
<g transform="translate(298.8 111.4)" id="g8827">
|
||||
<path id="path8829" d="M0 0h3.8l2.8-2.9L5.4-4v-2.1h-1V-5c0 .5-.5.9-1 .9H.2a.7.7 0 0 1-.8-.8V-6h-1v2l-1.2 1.2z" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g transform="translate(302.6 98.4)" id="g8831">
|
||||
<path id="path8833" d="M0 0h-3.7l-2.9 2.9L-5.4 4v2.1h1V5c0-.5.5-.9 1-.9h3.2c.4 0 .8.4.8.8v1.3h1v-2L2.8 3z" fill="#a9aba9"/>
|
||||
</g>
|
||||
<path id="path8835" d="M300.3 119.6h.9v-4.1h-1z" fill="#393939"/>
|
||||
<path id="path8837" d="M300.3 115.7h.9v-1.8h-1z" fill="#9b9b9b"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8839">
|
||||
<g id="g8841">
|
||||
<g id="g8847">
|
||||
<g id="g8849">
|
||||
<path id="path8857" d="M300.3 113.8h.9v1.9h-1z" fill="url(#linearGradient8637)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8859">
|
||||
<g clip-path="url(#clipPath8865)" id="g8861">
|
||||
<path id="path8867" d="M300.3 113.8h.9v-1.7h-1z" fill="#818181"/>
|
||||
<g transform="translate(288.2 113.8)" id="g8869">
|
||||
<path id="path8871" d="M0 0h7v-1.7L5.2-3.4H.6c-.3 0-.6.2-.6.5z" fill="#a9aba9"/>
|
||||
</g>
|
||||
<path id="path8873" d="M309.9 93h3.6v-3.6h-3.6z" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8875">
|
||||
<g clip-path="url(#clipPath8881)" id="g8877">
|
||||
<g transform="translate(313.2 91.6)" id="g8883">
|
||||
<path id="path8885" d="M0 0v-.3C-.3-.7-.4-1-.8-1l-.3.2v.1a.6.6 0 0 0-.5-.3c-.1 0-.2 0-.3.2l-.4-.1h-.6c-.2 0-.3 0-.3.2l.3 1h.4V0l.1.1.5.2.3-.1h.3c.2.1.3 0 .4 0V.1l.4.2.3-.1L0 0m-3.4-2.1H.2v3.6h-3.6z" fill="#fe0"/>
|
||||
</g>
|
||||
<g transform="translate(313.3 91.4)" id="g8887">
|
||||
<path id="path8889" d="M0 0c0-.2 0-.3-.2-.5 0-.2-.3-.4-.6-.4l-.4.1a.7.7 0 0 0-.4-.1H-2a.6.6 0 0 0-.4 0H-3c-.3 0-.4.1-.4.3 0 .4.1.7.3 1 0 .2.2.2.4.2h2.1L0 .5V0m-3.5-2H.1v3.6h-3.6z" fill="#d52715"/>
|
||||
</g>
|
||||
<path id="path8891" d="M313.4 89.5H310V93h3.5zm-3.6 0h3.7V93h-3.7z" fill="#171714"/>
|
||||
<g transform="translate(313.3 92)" id="g8893">
|
||||
<path id="path8895" d="M0 0v-.2.2m0 0v-.2.1m0 0zm0 0z" fill="#171714"/>
|
||||
</g>
|
||||
<g transform="translate(312.9 91.6)" id="g8897">
|
||||
<path id="path8899" d="M0 0l-.2-.5v-.1h-.1c0 .2 0 .4.2.6H0m.3-.2L0-.6C0-.8-.2-1-.3-1c-.2 0-.3 0-.3.3l.1.5c.1.2.2.4.5.4s.3-.3.3-.5M-1 .1V0l-.3-.5.1-.1.2.2c0 .2 0 .2.2.2s.2-.1.1-.2c0-.3-.2-.5-.5-.5a.3.3 0 0 0-.2.3v.5c.2.2.3.4.6.4.2 0 .3 0 .3-.2 0-.1 0-.2-.2-.2h-.1v.2m-1-.5v-.2h.3c0-.2-.2-.3-.3-.3-.2 0-.3.1-.3.2 0 .3 0 .5.2.7 0 .2.2.3.4.3l.2-.1c0-.1 0-.2-.2-.2h-.1v-.1c.1 0 .2 0 .1-.2h-.3m-.6-.3h.2c0-.2-.1-.3-.3-.3 0 0-.2 0-.2.2l.3.9s.1.1.2 0h.1c0-.3-.1-.5-.3-.8M0 .4C-.2.4-.3.4-.4.2l-.4.2-.4-.1-.3.1c-.2 0-.3 0-.4-.2v.1l-.3.1s-.2 0-.3-.2l-.3-.9c0-.2.1-.3.3-.3l.4.1h.9l.5.1.4-.2c.3 0 .5.3.6.7V0a.4.4 0 0 1-.3.4" fill="#171714"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8901">
|
||||
<g clip-path="url(#clipPath8907)" id="g8903">
|
||||
<g transform="translate(295 91.5)" id="g8909">
|
||||
<path id="path8911" d="M0 0v-.3h-.6l-.1-.1v-.4H0v-.4h-1l-.2.1h-.3l-.1-.1v-.5l.1-.1H.6V.5h-2.2v-.6h.5V0H0z" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g transform="translate(293 92)" id="g8913">
|
||||
<path id="path8915" d="M0 0h-.5l-.1-.1-.6-1.3L-2 0h-.6v-.1l.9-2 .2-.1h.4l.1.1 1 2V0" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g transform="translate(290 91.1)" id="g8917">
|
||||
<path id="path8919" d="M0 0h.1v-.4L0-.5h-1.5v-.3H0L.1-1v-.4h-2.2v2c0 .1 0 .2.1.1H.1V.4h-1.6V0z" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<path id="path8921" d="M249 87h-13v7.9h13z" fill="#a9aba9"/>
|
||||
<path id="path8923" d="M263.5 87h-12.9v7.9h12.9z"/>
|
||||
<path id="path8925" d="M240.7 92.2h-1.3v1.4h1.3z"/>
|
||||
<path id="path8927" d="M240.7 88.2h-1.3v1.4h1.3z"/>
|
||||
<path id="path8929" d="M258.2 86h-14.5v9.9h14.5z"/>
|
||||
<path id="path8931" d="M311.6 141h-5v9h5z" fill="#a9aba9"/>
|
||||
<path id="path8933-4" d="M311.2 151.6h-4v9.3h4z"/>
|
||||
<path id="path8935" d="M311.2 141.4h-.3v3h.3z"/>
|
||||
<path id="path8937" d="M307.3 141.4h-.4v3h.4z"/>
|
||||
<path id="path8939" d="M312.9 145h-7.3v12.2h7.3z"/>
|
||||
<g transform="translate(309.2 158)" id="g8941">
|
||||
<path id="path8943" d="M0 0v8.8h-36.4v-75.5h-15.1" fill="none" stroke="#000" stroke-width="2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 16 KiB |
252
docs/static/download/firmware.svg
vendored
Normal file
@ -0,0 +1,252 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="261.3" height="109.3" viewBox="0 0 69.1 28.9" id="svg9461">
|
||||
<defs id="defs9455">
|
||||
<clipPath id="clipPath8689">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8687"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8663">
|
||||
<path d="M309.8 89.4h3.7v3.7h-3.7z" id="path8661"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8647">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8645"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .6661 -.32488 0 300.7 115)" id="linearGradient8637">
|
||||
<stop offset="0" id="stop8633" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop8635" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8595">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8593"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 12.8096 -17.18704 0 300.7 98.4)" id="linearGradient8585">
|
||||
<stop offset="0" id="stop8579" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop8581" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop8583" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8561">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8559"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.33016 5.597 0 300.7 88.4)" id="linearGradient8551">
|
||||
<stop offset="0" id="stop8547" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8549" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8525">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8523"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.56074 .70884 0 300.7 115.6)" id="linearGradient8515">
|
||||
<stop offset="0" id="stop8511" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8513" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8493">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8491"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.39765 2.48247 0 300.7 98.1)" id="linearGradient8483">
|
||||
<stop offset="0" id="stop8479" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop8481" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8449">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8447"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8977">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8975"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8951">
|
||||
<path d="M593 101h3.6v3.7H593z" id="path8949"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8935">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8933"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .67046 -.32706 0 583.8 126.8)" id="linearGradient8925">
|
||||
<stop offset="0" id="stop8921" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop8923" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8883">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8881"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 12.89405 -17.29507 0 583.7 110)" id="linearGradient8873">
|
||||
<stop offset="0" id="stop8867" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop8869" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop8871" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8849">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8847"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.33884 5.6329 0 583.7 100)" id="linearGradient8839">
|
||||
<stop offset="0" id="stop8835" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8837" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8813">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8811"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.56429 .71345 0 583.7 127.4)" id="linearGradient8803">
|
||||
<stop offset="0" id="stop8799" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8801" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8781">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8779"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.41323 2.4988 0 583.7 109.8)" id="linearGradient8771">
|
||||
<stop offset="0" id="stop8767" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop8769" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8737">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8735"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="layer1" transform="translate(0 -268)">
|
||||
<g id="g10860" transform="translate(-20.8 -2)">
|
||||
<g transform="matrix(.35278 0 0 -.35278 62.8 291.4)" id="g8727">
|
||||
<path id="path8729" d="M0 0h24" fill="none" stroke="#000" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="g8731" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8737)" id="g8733">
|
||||
<g transform="translate(458 159.9)" id="g8739">
|
||||
<path id="path8741" d="M0 0h83a4 4 0 0 0 4-4v-52.5H-4V-4a4 4 0 0 0 4 4" fill="#e6e6e6"/>
|
||||
</g>
|
||||
<g transform="translate(458 158.4)" id="g8743">
|
||||
<path id="path8745" d="M0 0h83c1.3 0 2.4-1.1 2.4-2.5V-52c0-.9-.6-1.5-1.5-1.5H-1c-.8 0-1.5.6-1.5 1.5v49.5C-2.5-1.1-1.4 0 0 0z" fill="none" stroke="#282828" stroke-width="3"/>
|
||||
</g>
|
||||
<g transform="translate(445 102.9)" id="g8747">
|
||||
<path id="path8749" d="M0 0h108.8v-1.2a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3z" fill="#626262"/>
|
||||
</g>
|
||||
<g transform="translate(489.8 102.9)" id="g8751">
|
||||
<path id="path8753" d="M0 0h19.3c0-.8-.6-1.4-1.4-1.4H1.4C.6-1.4 0-.8 0 0" fill="#818181"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8755" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g id="g8757">
|
||||
<g id="g8763">
|
||||
<g id="g8765">
|
||||
<path id="path8773" d="M567.9 139.7a.6.6 0 0 1-.6-.6v-30.6c0-.3.2-.6.6-.6h31.7c.3 0 .5.3.5.6v30.6c0 .3-.2.6-.5.6z" fill="url(#linearGradient8771)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8775" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8781)" id="g8777">
|
||||
<g transform="translate(569.7 111.2)" id="g8783">
|
||||
<path id="path8785" d="M0 0h28c.3 0 .6-.3.6-.6V-12c0-.4-.3-.6-.6-.6H0c-.3 0-.6.2-.6.6V-.6c0 .3.3.6.6.6" fill="#f2f2f2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8787" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g id="g8789">
|
||||
<g id="g8795">
|
||||
<g id="g8797">
|
||||
<path id="path8805" d="M569.4 149.1a.6.6 0 0 1-.6-.6v-22.3c0-.3.3-.6.6-.6H598c.3 0 .6.3.6.6v22.3c0 .3-.3.6-.6.6z" fill="url(#linearGradient8803)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8807" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8813)" id="g8809">
|
||||
<g transform="translate(572.7 146)" id="g8815">
|
||||
<path id="path8817" d="M0 0h22.1c.6 0 1.1-.5 1.1-1.1v-12.5c0-.6-.5-1-1-1H0c-.6 0-1.1.4-1.1 1V-1c0 .5.5 1 1.1 1" fill="#393939"/>
|
||||
</g>
|
||||
<g transform="translate(574.4 145.4)" id="g8819">
|
||||
<path id="path8821" d="M0 0h18.8c.4 0 .8-.4.8-.8v-12c0-.4-.4-.8-.8-.8H0c-.4 0-.8.4-.8.8v12c0 .4.4.8.8.8" fill="#98b6a7"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8823" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g id="g8825">
|
||||
<g id="g8831">
|
||||
<g id="g8833">
|
||||
<path id="path8841" d="M569.1 105.6v-6.4c0-.3.3-.6.6-.6h28c.3 0 .6.3.6.6v6.4z" fill="url(#linearGradient8839)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8843" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8849)" id="g8845">
|
||||
<g transform="translate(581.7 109.3)" id="g8851">
|
||||
<path id="path8853" d="M0 0l-4.2 4.2v.6h-1a2.5 2.5 0 0 0 0 4.9h1v.5L0 14.5h4l4.2-4.2v-.6h1a2.5 2.5 0 0 0 0-5h-1v-.5L4.2 0z" fill="#6a6a6a"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8855" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g id="g8857">
|
||||
<g id="g8863">
|
||||
<g id="g8865">
|
||||
<path id="path8875" d="M581.7 123.8l-4.2-4.2v-.6h-1a2.5 2.5 0 1 1 0-5v.1h1v-.5l4.2-4.3h4.2l4.2 4.3v.5h1a2.5 2.5 0 0 1-.1 4.9h-1v.7l-4.1 4.1z" fill="url(#linearGradient8873)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8877" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8883)" id="g8879">
|
||||
<g transform="translate(576.4 118.4)" id="g8885">
|
||||
<path id="path8887" d="M0 0h3v-3.6H0A1.8 1.8 0 1 0 0 0" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g transform="translate(591 114.8)" id="g8889">
|
||||
<path id="path8891" d="M0 0h-3v3.6h3A1.8 1.8 0 1 0 0 0" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g transform="translate(582 118.4)" id="g8893">
|
||||
<path id="path8895" d="M0 0h3.6v-3.6H-.1V0H0" fill="#393939"/>
|
||||
</g>
|
||||
<g transform="translate(581.9 123.2)" id="g8897">
|
||||
<path id="path8899" d="M0 0h3.8l2.8-2.9L5.5-4v-2H4.3v1c0 .5-.4 1-1 1h-3a.7.7 0 0 1-.8-.8v-1.4h-1V-4l-1.2 1.2z" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g transform="translate(585.6 110)" id="g8901">
|
||||
<path id="path8903" d="M0 0h-3.8l-2.8 2.9 1.2 1.2v2h1V5c0-.5.5-1 1-1h3.2c.5 0 .8.4.8.8v1.4h1.1V4l1.2-1.2z" fill="#a9aba9"/>
|
||||
</g>
|
||||
<path id="path8905" d="M583.3 131.4h.9v-4.1h-.9z" fill="#393939"/>
|
||||
<path id="path8907" d="M583.3 127.4h.9v-1.8h-.9z" fill="#9b9b9b"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8909" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g id="g8911">
|
||||
<g id="g8917">
|
||||
<g id="g8919">
|
||||
<path id="path8927" d="M583.3 125.6h.9v1.8h-.9z" fill="url(#linearGradient8925)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8929" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8935)" id="g8931">
|
||||
<path id="path8937" d="M583.3 125.6h.9v-1.8h-.9z" fill="#818181"/>
|
||||
<g transform="translate(571.2 125.6)" id="g8939">
|
||||
<path id="path8941" d="M0 0h7v-1.7L5.3-3.5H.6c-.3 0-.6.3-.6.6z" fill="#a9aba9"/>
|
||||
</g>
|
||||
<path id="path8943" d="M593 104.7h3.6V101H593z" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8945" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8951)" id="g8947">
|
||||
<g transform="translate(596.4 103.2)" id="g8953">
|
||||
<path id="path8955" d="M0 0v-.3C-.3-.8-.4-1-.8-1l-.3.2a.6.6 0 0 0-.5-.2c-.1 0-.2 0-.3.2C-2-1-2.1-1-2.2-1h-.6a.3.3 0 0 0-.3.2l.3 1h.5l.5.2.2-.1h.4c.1.1.3 0 .4 0V.1l.4.2.3-.1L0 0m-3.4-2.1H.2v3.6h-3.6z" fill="#fe0"/>
|
||||
</g>
|
||||
<g transform="translate(596.5 103)" id="g8957">
|
||||
<path id="path8959" d="M0 0c0-.2 0-.3-.2-.5 0-.2-.3-.4-.6-.4l-.4.1a.7.7 0 0 0-.4-.1H-2a.7.7 0 0 0-.4 0H-3c-.2 0-.3.1-.4.3 0 .4.2.7.4 1 0 .2.2.2.4.2h2.1L0 .5V0m-3.5-2H.1v3.6h-3.6z" fill="#d52715"/>
|
||||
</g>
|
||||
<path id="path8961" d="M596.6 101H593v3.6h3.6zm-3.7 0h3.7v3.7H593z" fill="#171714"/>
|
||||
<g transform="translate(596.5 103.7)" id="g8963">
|
||||
<path id="path8965" d="M0 0v-.2.2m0 0v-.2.1m0 0zm0 0z" fill="#171714"/>
|
||||
</g>
|
||||
<g transform="translate(596 103.2)" id="g8967">
|
||||
<path id="path8969" d="M0 0a3 3 0 0 0-.2-.6h-.1c0 .2 0 .4.2.6H0m.3-.2L0-.6C0-.8-.2-1-.3-1c-.2 0-.3 0-.3.3l.1.4c.1.3.2.5.5.5s.3-.3.3-.5M-1 .1V0l-.3-.5.1-.1.2.2c0 .2 0 .2.2.2s.2-.1.1-.2c0-.3-.2-.5-.5-.5a.3.3 0 0 0-.3.3l.2.5c0 .2.2.4.5.4.2 0 .3 0 .3-.2 0-.1 0-.2-.2-.2h-.1v.2m-1-.5v-.2h.3c0-.2-.2-.3-.3-.3-.2 0-.3.1-.3.2 0 .3 0 .5.2.7 0 .2.2.3.4.3l.2-.1c0-.2 0-.2-.2-.2h-.1v-.1c.1 0 .2 0 .1-.2l-.3-.1m-.6-.2h.2c0-.2-.1-.3-.3-.3 0 0-.2 0-.2.2l.3.9s.1.1.2 0h.1c0-.3-.2-.5-.3-.8M0 .4C-.2.4-.3.4-.4.2l-.4.2-.4-.1-.3.1c-.2 0-.3 0-.4-.2v.1l-.3.1c-.1 0-.2 0-.3-.2-.1-.3-.3-.6-.3-1 0 0 .1-.2.3-.2l.3.1c.1 0 .2-.1.4 0h.6l.5.1.4-.2c.3 0 .5.3.6.6V0a.4.4 0 0 1-.3.4" fill="#171714"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g8971" transform="matrix(.35278 0 0 -.35278 -129 330.1)">
|
||||
<g clip-path="url(#clipPath8977)" id="g8973">
|
||||
<g transform="translate(578 103)" id="g8979">
|
||||
<path id="path8981" d="M0 0v-.3h-.6l-.1-.1v-.4H0v-.4h-1l-.2.2h-.3l-.1-.1v-.6H.7V.5h-2.3v-.6h.5V0H0z" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g transform="translate(576 103.6)" id="g8983">
|
||||
<path id="path8985" d="M0 0h-.5l-.1-.1-.6-1.3L-2-.1V0h-.5s-.1 0 0-.1l.9-2 .2-.1h.5l1 2L0 0" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g transform="translate(573 102.8)" id="g8987">
|
||||
<path id="path8989" d="M0 0h.1v-.4L0-.5h-1.5v-.3H0L.1-1v-.4h-2.2v2l.1.2H.1V.4h-1.6V0z" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g transform="translate(583.5 136.6)" id="g8991">
|
||||
<path id="path8993" d="M0 0l-.8 1.3-1.4-2.9 4-1c-.5.5-.5.7-.9 1.3.5.1 1 .4 1.4.7.8.4 1.5 1 2 1.9a4 4 0 0 1-.6 3.6c-.4 0-.8 0-1.3-.2C3.5 3 3.5 1 0 0" fill="#303030"/>
|
||||
</g>
|
||||
<g transform="translate(583.1 141.4)" id="g8995">
|
||||
<path id="path8997" d="M0 0l.8-1.2 1.4 2.8-3.8 1 .7-1.3-1.3-.7a4.5 4.5 0 0 1-2-2c-.4-1-.2-2.4.5-3.4.4 0 .8 0 1.2.2C-3.3-3-3.3-1 0 0" fill="#303030"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 13 KiB |
327
docs/static/download/transfer.svg
vendored
Normal file
@ -0,0 +1,327 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="261.3" height="109.3" viewBox="0 0 69.1 28.9" id="svg9461">
|
||||
<defs id="defs9455">
|
||||
<clipPath id="clipPath8689">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8687"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8663">
|
||||
<path d="M309.8 89.4h3.7v3.7h-3.7z" id="path8661"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8647">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8645"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .6661 -.32488 0 300.7 115)" id="linearGradient8637">
|
||||
<stop offset="0" id="stop8633" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop8635" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8595">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8593"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 12.8096 -17.18704 0 300.7 98.4)" id="linearGradient8585">
|
||||
<stop offset="0" id="stop8579" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop8581" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop8583" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8561">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8559"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.33016 5.597 0 300.7 88.4)" id="linearGradient8551">
|
||||
<stop offset="0" id="stop8547" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8549" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8525">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8523"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.56074 .70884 0 300.7 115.6)" id="linearGradient8515">
|
||||
<stop offset="0" id="stop8511" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8513" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8493">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8491"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.39765 2.48247 0 300.7 98.1)" id="linearGradient8483">
|
||||
<stop offset="0" id="stop8479" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop8481" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8449">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8447"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8977">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8975"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8951">
|
||||
<path d="M593 101h3.6v3.7H593z" id="path8949"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath8935">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8933"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .67046 -.32706 0 583.8 126.8)" id="linearGradient8925">
|
||||
<stop offset="0" id="stop8921" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop8923" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8883">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8881"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 12.89405 -17.29507 0 583.7 110)" id="linearGradient8873">
|
||||
<stop offset="0" id="stop8867" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop8869" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop8871" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8849">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8847"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.33884 5.6329 0 583.7 100)" id="linearGradient8839">
|
||||
<stop offset="0" id="stop8835" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8837" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8813">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8811"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.56429 .71345 0 583.7 127.4)" id="linearGradient8803">
|
||||
<stop offset="0" id="stop8799" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop8801" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8781">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8779"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.41323 2.4988 0 583.7 109.8)" id="linearGradient8771">
|
||||
<stop offset="0" id="stop8767" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop8769" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath8737">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path8735"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9285">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9283"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9259">
|
||||
<path d="M852.5 96.3h3.3v3.3h-3.3z" id="path9257"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9243">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9241"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 .61565 -.3002 0 844 120)" id="linearGradient9233">
|
||||
<stop offset="0" id="stop9229" stop-color="#757575"/>
|
||||
<stop offset="1" id="stop9231" stop-color="#393939"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9191">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9189"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 11.84237 -15.8829 0 844 104.6)" id="linearGradient9181">
|
||||
<stop offset="0" id="stop9175" stop-color="#6a6a6a"/>
|
||||
<stop offset=".5" id="stop9177" stop-color="#48e400"/>
|
||||
<stop offset="1" id="stop9179" stop-color="#6a6a6a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9157">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9155"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -1.22922 5.1724 0 844 95.3)" id="linearGradient9147">
|
||||
<stop offset="0" id="stop9143" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop9145" stop-color="#535453"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9121">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9119"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -.51809 .65506 0 844 120.5)" id="linearGradient9111">
|
||||
<stop offset="0" id="stop9107" stop-color="#a9aba9"/>
|
||||
<stop offset="1" id="stop9109" stop-color="#818181"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9089">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9087"/>
|
||||
</clipPath>
|
||||
<linearGradient x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -2.21578 2.29436 0 844 104.3)" id="linearGradient9079">
|
||||
<stop offset="0" id="stop9075" stop-color="#f2f2f2"/>
|
||||
<stop offset="1" id="stop9077" stop-color="#7a7a7a"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clipPath9009">
|
||||
<path d="M0 1145.9h1366V0H0z" id="path9007"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9041">
|
||||
<path d="M779.5 134.7h16.7v-12.6h-16.7z" id="path9039"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath9045">
|
||||
<path d="M779.5 134.7h16.7v-12.6h-16.7z" id="path9043"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="layer1" transform="translate(0 -268)">
|
||||
<g id="g8999" transform="matrix(.35278 0 0 -.35278 40.2 289.4)">
|
||||
<path d="M0 0h40" id="path9001" fill="none" stroke="#000" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="g9011" transform="matrix(.35278 0 0 -.35278 10.4 271.7)">
|
||||
<path d="M0 0h83a4 4 0 0 0 4-4v-52.5H-4V-4a4 4 0 0 0 4 4" id="path9013" fill="#e6e6e6"/>
|
||||
</g>
|
||||
<g id="g9015" transform="matrix(.35278 0 0 -.35278 10.4 272.3)">
|
||||
<path d="M0 0h83c1.3 0 2.4-1.1 2.4-2.5V-52c0-.9-.6-1.5-1.5-1.5H-1c-.8 0-1.5.6-1.5 1.5v49.5C-2.5-1.1-1.4 0 0 0z" id="path9017" fill="none" stroke="#282828" stroke-width="3"/>
|
||||
</g>
|
||||
<g id="g9019" transform="matrix(.35278 0 0 -.35278 5.8 291.9)">
|
||||
<path d="M0 0h108.8v-1.2a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3z" id="path9021" fill="#626262"/>
|
||||
</g>
|
||||
<g id="g9023" transform="matrix(.35278 0 0 -.35278 21.6 291.9)">
|
||||
<path d="M0 0h19.3c0-.8-.6-1.4-1.4-1.4H1.4C.6-1.4 0-.8 0 0" id="path9025" fill="#818181"/>
|
||||
</g>
|
||||
<g id="g9027" transform="matrix(.35278 0 0 -.35278 45 286.7)">
|
||||
<path d="M0 0l-28-5.4-7.6 39 20 3.9c3.9-2.4 8-4.7 9.4-5.4z" id="path9029" fill="#fff"/>
|
||||
</g>
|
||||
<g id="g9031" transform="matrix(.35278 0 0 -.35278 45.4 287)">
|
||||
<path d="M0 0l-30-5.8-8 41 21.5 4.1c4.7-2.8 10-5.7 10-5.7zm-2.3 1.6l-6 30.7c-1.6.8-5.2 2.8-8.6 4.9l-18.7-3.6 7.2-37 26 5" id="path9033" fill="#303030"/>
|
||||
</g>
|
||||
<g id="g9035" transform="matrix(.35278 0 0 -.35278 -239.7 326.4)">
|
||||
<g id="g9061">
|
||||
<g clip-path="url(#clipPath9041)" id="g9059">
|
||||
<g id="g9057">
|
||||
<g id="g9055">
|
||||
<g clip-path="url(#clipPath9045)" id="g9053">
|
||||
<g aria-label=".uf2" transform="scale(1 -1) rotate(-11 -255.3 -4117.6)" style="-inkscape-font-specification:LEGOChalet60-Bold" id="text9051" font-weight="700" font-size="9" font-family="LEGO Chalet 60" fill="#303030">
|
||||
<path d="M2.4 0H.8v-1.7h1.6z" id="path12451"/>
|
||||
<path d="M7.6 0H6.1v-.5l-.9.5-.8.1Q3.6.1 3-.3q-.4-.5-.4-1.4V-5h1.6v3l.1.4q0 .2.3.3h.9l.5-.2V-5h1.5z" id="path12453"/>
|
||||
<path d="M11.1-5.7H9.7q-.2.2-.2.7h1.3v1.1H9.6V0H8v-3.9h-.7v-1H8v-.2q0-.9.5-1.3Q9-7 10-7h.6l.5.1z" id="path12455"/>
|
||||
<path d="M16 0h-5.2v-1L12-2l1-.8q.5-.5.7-1 .2-.3.2-.7 0-.4-.3-.7-.3-.2-.8-.2l-.9.2-.8.4H11v-1.5l.9-.2 1.2-.2q1.2 0 1.9.5.6.6.6 1.5 0 .6-.3 1.2-.3.5-1 1.1l-.7.7-.6.4h3z" id="path12457"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9063">
|
||||
<g id="g9065">
|
||||
<g id="g9071">
|
||||
<g id="g9073">
|
||||
<path d="M829.4 131.8a.5.5 0 0 1-.5-.6v-28c0-.3.2-.6.5-.6h29.1c.3 0 .6.3.6.6v28c0 .3-.3.6-.6.6z" id="path9081" fill="url(#linearGradient9079)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9083">
|
||||
<g id="g9085" clip-path="url(#clipPath9089)">
|
||||
<g id="g9091" transform="translate(831.1 105.6)">
|
||||
<path d="M0 0h25.7c.3 0 .6-.2.6-.5V-11c0-.3-.3-.6-.6-.6H0c-.3 0-.5.3-.5.6V-.5c0 .3.2.5.5.5" id="path9093" fill="#f2f2f2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9095">
|
||||
<g id="g9097">
|
||||
<g id="g9103">
|
||||
<g id="g9105">
|
||||
<path d="M830.9 140.4a.5.5 0 0 1-.6-.5v-20.5c0-.3.3-.6.6-.6H857c.3 0 .5.3.5.6v20.5c0 .3-.2.5-.5.5z" id="path9113" fill="url(#linearGradient9111)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9115">
|
||||
<g id="g9117" clip-path="url(#clipPath9121)">
|
||||
<g id="g9123" transform="translate(833.9 137.6)">
|
||||
<path d="M0 0h20.3c.6 0 1-.5 1-1v-11.4c0-.6-.4-1-1-1H0a1 1 0 0 0-1 1V-1c0 .5.4 1 1 1" id="path9125" fill="#393939"/>
|
||||
</g>
|
||||
<g id="g9127" transform="translate(835.4 137)">
|
||||
<path d="M0 0h17.2c.5 0 .8-.3.8-.7v-11c0-.5-.3-.8-.8-.8H0c-.4 0-.7.3-.7.8v11c0 .4.3.7.7.7" id="path9129" fill="#98b6a7"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9131">
|
||||
<g id="g9133">
|
||||
<g id="g9139">
|
||||
<g id="g9141">
|
||||
<path d="M830.6 100.4v-5.8c0-.3.2-.5.5-.5h25.7c.3 0 .6.2.6.5v5.8z" id="path9149" fill="url(#linearGradient9147)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9151">
|
||||
<g id="g9153" clip-path="url(#clipPath9157)">
|
||||
<g id="g9159" transform="translate(842.2 103.9)">
|
||||
<path d="M0 0l-3.9 3.9v.5h-1a2.3 2.3 0 1 0 0 4.5h1v.5l3.9 4h3.8c1.7-1.9 3.9-4 3.9-4V9h.8a2.3 2.3 0 0 0 0-4.5h-.8V4L3.8 0z" id="path9161" fill="#6a6a6a"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9163">
|
||||
<g id="g9165">
|
||||
<g id="g9171">
|
||||
<g id="g9173">
|
||||
<path d="M842.1 117.2l-3.8-3.9v-.5h-1a2.3 2.3 0 1 1 0-4.5h1v-.5l3.9-3.9h3.8l3.8 3.9v.5h1c1.1 0 2 1 2.1 2.2 0 1.2-1 2.3-2.2 2.3h-.9v.6l-3.8 3.8z" id="path9183" fill="url(#linearGradient9181)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9185">
|
||||
<g id="g9187" clip-path="url(#clipPath9191)">
|
||||
<g id="g9193" transform="translate(837.3 112.3)">
|
||||
<path d="M0 0h2.8v-3.4H0A1.7 1.7 0 0 0 0 0" id="path9195" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g id="g9197" transform="translate(850.7 109)">
|
||||
<path d="M0 0h-2.8v3.4H0A1.7 1.7 0 0 0 0 0" id="path9199" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g id="g9201" transform="translate(842.4 112.3)">
|
||||
<path d="M0 0h3.3v-3.3H-.1V0H0" id="path9203" fill="#393939"/>
|
||||
</g>
|
||||
<g id="g9205" transform="translate(842.3 116.6)">
|
||||
<path d="M0 0h3.5L6-2.6 5-3.7v-2H4v1.2c0 .4-.4.8-.8.8h-3a.7.7 0 0 1-.7-.7v-1.3h-1v2l-1.1 1z" id="path9207" fill="#a9aba9"/>
|
||||
</g>
|
||||
<g id="g9209" transform="translate(845.8 104.6)">
|
||||
<path d="M0 0h-3.5L-6 2.7l1.1 1v2h1V4.6c0-.5.4-.9.8-.9h3a.7.7 0 0 1 .8.7v1.3h1v-2l1-1z" id="path9211" fill="#a9aba9"/>
|
||||
</g>
|
||||
<path d="M843.6 124.1h.8v-3.7h-.8z" id="path9213" fill="#393939"/>
|
||||
<path d="M843.6 120.5h.8V119h-.8z" id="path9215" fill="#9b9b9b"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9217">
|
||||
<g id="g9219">
|
||||
<g id="g9225">
|
||||
<g id="g9227">
|
||||
<path d="M843.6 118.8h.8v1.7h-.8z" id="path9235" fill="url(#linearGradient9233)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9237">
|
||||
<g id="g9239" clip-path="url(#clipPath9243)">
|
||||
<path d="M843.6 118.8h.8v-1.6h-.8z" id="path9245" fill="#818181"/>
|
||||
<g id="g9247" transform="translate(832.5 118.8)">
|
||||
<path d="M0 0h6.5v-1.6L4.8-3.2H.5c-.3 0-.5.3-.5.6z" id="path9249" fill="#a9aba9"/>
|
||||
</g>
|
||||
<path d="M852.5 99.6h3.3v-3.3h-3.3z" id="path9251" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9253">
|
||||
<g id="g9255" clip-path="url(#clipPath9259)">
|
||||
<g id="g9261" transform="translate(855.6 98.2)">
|
||||
<path d="M0 0v-.3C-.3-.7-.4-1-.7-1-.9-1-1-1-1-.8a.5.5 0 0 0-.5-.2l-.3.1h-.8l-.3.1c0 .4.2.6.3 1h.5l.4.2.3-.1h.6V.2h.1l.4.2.2-.1V0m-3-2H.2v3.4H-3z" id="path9263" fill="#fe0"/>
|
||||
</g>
|
||||
<g id="g9265" transform="translate(855.7 98.1)">
|
||||
<path d="M0 0l-.1-.4C-.2-.7-.5-1-.7-1c-.2 0-.3 0-.4.2a.6.6 0 0 0-.4-.2l-.3.1a.6.6 0 0 0-.3 0h-.6c-.2 0-.4 0-.4.3l.3.9.4.2.2-.1.4.1h.6l.4-.1h.7L0 0m-3.2-1.8H.1v3.3h-3.3z" id="path9267" fill="#d52715"/>
|
||||
</g>
|
||||
<path d="M855.8 96.3h-3.3v3.3h3.3zm-3.3 0h3.3v3.3h-3.3z" id="path9269" fill="#171714"/>
|
||||
<g id="g9271" transform="translate(855.7 98.7)">
|
||||
<path d="M0 0v-.2.2m0 0v-.1m0 0zm0 0z" id="path9273" fill="#171714"/>
|
||||
</g>
|
||||
<g id="g9275" transform="translate(855.3 98.2)">
|
||||
<path d="M0 0l-.2-.5h-.1c0 .2 0 .4.2.5H0m.2-.1L.1-.6l-.4-.2c-.1 0-.3 0-.3.2l.1.5c.1.2.2.4.5.4s.3-.3.2-.4m-1 .2l-.3-.6.2.1v.1l.1.1c.2 0 .2-.1.2-.2 0-.2-.2-.4-.5-.4-.1 0-.2 0-.2.2V0c.2.2.3.4.6.4.1 0 .2 0 .2-.2L-.6 0s-.2 0-.1.1m-1-.4v-.1h.3c0-.2-.2-.3-.3-.3-.1 0-.2 0-.3.2l.2.7.4.2.2-.1c0-.1 0-.2-.2-.2l-.2-.1.3-.1c0-.2-.2-.2-.3-.1m-.6-.2h.2c0-.3-.2-.3-.3-.3 0 0-.2 0-.2.2 0 .3.2.5.3.8h.2c0-.2 0-.5-.2-.7M0 .4C-.2.4-.3.4-.4.2c-.1.2-.2.2-.4.2L-1 .3l-.3.1c-.1 0-.3 0-.4-.2v.1h-.5l-.3-1s.1-.2.3-.2l.3.1.3-.1.3.1.3-.1c.2 0 .3 0 .4.2l.4-.2c.3 0 .5.2.6.6V0a.3.3 0 0 1-.3.4" id="path9277" fill="#171714"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(.35278 0 0 -.35278 -239.7 326.4)" id="g9279">
|
||||
<g id="g9281" clip-path="url(#clipPath9285)">
|
||||
<g id="g9287" transform="translate(838.7 98.2)">
|
||||
<path d="M0 0v-.3h-.5l-.1-.1v-.4H0v-.3h-1v.2h-.4v-.6h2V.4h-2v-.5h.4V0h1z" id="path9289" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g id="g9291" transform="translate(836.9 98.7)">
|
||||
<path d="M0 0h-.4l-.2-.1-.5-1.2-.6 1.2-.1.1h-.5v-.1l.8-1.8.2-.1h.5l.9 2H0" id="path9293" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g id="g9295" transform="translate(834.2 97.9)">
|
||||
<path d="M0 0h.1v-.4h-1.5v-.4H0L.1-1v-.3H-2v2h2V.3h-1.5V0z" id="path9297" fill="#f2f2f2"/>
|
||||
</g>
|
||||
<g id="g9299" transform="translate(820.8 131.1)">
|
||||
<path d="M0 0l-1.9-2.9 7.3-1C4.3 1.3 4 1.7 3.4 5.2l-2-3a39.5 39.5 0 0 1-4.1 3.2c-1.4.8-3 1.3-4.7 1.5-2.1 0-4.3-.2-6.4-.8l.1-3.3C-9 4.8-3.5 3.8 0 0" id="path9301" fill="#303030"/>
|
||||
</g>
|
||||
<g id="g9303" transform="translate(767 107.4)">
|
||||
<path d="M0 0c1.6 2.3 3.8 4 6.4 5" id="path9305" fill="none" stroke="#303030"/>
|
||||
</g>
|
||||
<g id="g9307" transform="translate(766.2 110.4)">
|
||||
<path d="M0 0c1.6 2.3 3.8 4 6.4 5" id="path9309" fill="none" stroke="#303030"/>
|
||||
</g>
|
||||
<g id="g9311" transform="translate(765.6 113.3)">
|
||||
<path d="M0 0c1.6 2.3 3.8 4 6.4 5" id="path9313" fill="none" stroke="#303030"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
209
docs/static/lego-logo-white.svg
vendored
Normal file
@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg10"
|
||||
width="236.9"
|
||||
height="56.7"
|
||||
version="1.1"
|
||||
sodipodi:docname="lego-logo-white.svg"
|
||||
inkscape:export-filename="C:\gh\pxt-ev3\docs\static\lego_education_logo_white.png"
|
||||
inkscape:export-xdpi="138.33701"
|
||||
inkscape:export-ydpi="138.33701"
|
||||
inkscape:version="0.92.1 r15371">
|
||||
<metadata
|
||||
id="metadata54">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="837"
|
||||
id="namedview52"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.8374843"
|
||||
inkscape:cx="118.45"
|
||||
inkscape:cy="28.35"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg10" />
|
||||
<defs
|
||||
id="defs14">
|
||||
<clipPath
|
||||
id="clipPath26">
|
||||
<path
|
||||
d="M332 275.6h177.7v42.5H332z"
|
||||
id="path24" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipPath76">
|
||||
<path
|
||||
d="M332 275.6h177.7v42.5H332z"
|
||||
id="path74" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g
|
||||
id="g18"
|
||||
transform="matrix(1.33333 0 0 -1.33333 0 56.7)"
|
||||
inkscape:export-xdpi="138.33701"
|
||||
inkscape:export-ydpi="138.33701">
|
||||
<g
|
||||
id="g130"
|
||||
transform="translate(-332 -275.6)">
|
||||
<g
|
||||
id="g20">
|
||||
<g
|
||||
clip-path="url(#clipPath26)"
|
||||
id="g22">
|
||||
<g
|
||||
transform="translate(387.6 297.7)"
|
||||
id="g28">
|
||||
<path
|
||||
id="path30"
|
||||
d="M0 0h6.3c0 1.4-.2 2.2-.5 2.6-.4.3-1.3.5-2.7.5C1.7 3 .8 2.9.5 2.5.2 2 0 1.3 0 0m6.3-4.1h3.4c0-2-.6-3.3-1.8-4-.8-.4-2.4-.6-4.8-.6-2.6 0-4.4.5-5.3 1.6-.8 1-1.2 2.8-1.2 5.5S-3 3-2.2 4C-1.4 5.1.4 5.7 3 5.7 6 5.7 7.8 5 8.6 4c.7-1 1.1-3 1.1-6.2H0c0-1.7.1-2.7.4-3.2.4-.6 1.3-.8 2.7-.8 1.2 0 2 0 2.3.2.6.3 1 .9 1 1.8"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(406.4 300.7)"
|
||||
id="g32">
|
||||
<path
|
||||
id="path34"
|
||||
d="M0 0c-1.4 0-2.2-.4-2.6-1.1a7 7 0 0 1-.5-3c0-2 .2-3.3.4-3.8.4-.9 1.3-1.3 2.7-1.3 1.6 0 2.6.4 3 1.2.3.6.4 1.8.4 3.8a7 7 0 0 1-.5 3.1C2.4-.4 1.5 0 0 0m3.4-11.7v2.2C2.7-11 1.2-11.8-1-11.8c-2.4 0-4 .7-4.7 2.2-.5 1-.7 2.7-.7 5.4 0 2.3.3 4 .9 5C-4.8 2-3.3 2.5-1 2.5s3.7-.7 4.2-2h.2v7.9h3.3v-20.2z"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(428.8 289)"
|
||||
id="g36">
|
||||
<path
|
||||
id="path38"
|
||||
d="M0 0h-3.3v2.2C-4 .6-5.6-.1-7.9-.1c-3.2 0-4.8 1.3-4.8 4v10.2h3.4V5.2c0-1 .1-1.8.4-2.1.3-.4 1-.7 2-.7 1.2 0 2.1.3 2.6.9.5.5.8 1.4.8 2.7v8H0z"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(441 294.4)"
|
||||
id="g40">
|
||||
<path
|
||||
id="path42"
|
||||
d="M0 0h3.4c0-2.3-.5-3.8-1.6-4.6-.8-.6-2.4-1-4.8-1-2.7 0-4.4.6-5.2 1.7-.8 1-1.1 2.8-1.1 5.6 0 2.7.3 4.5 1 5.4C-7.3 8.3-5.6 9-3 9c2.3 0 3.9-.3 4.8-1 1-.6 1.6-2 1.6-4.1H0c0 1-.2 1.8-.7 2-.4.4-1.2.5-2.3.5-1.4 0-2.3-.3-2.6-1-.2-.5-.4-1.7-.4-3.6 0-2 .1-3.2.4-3.6.3-.7 1.2-1 2.6-1 1.3 0 2 .1 2.4.5.4.3.6 1.1.6 2.4"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(452.8 295.4)"
|
||||
id="g44">
|
||||
<path
|
||||
id="path46"
|
||||
d="M0 0c-1.1 0-1.8 0-2.2-.2-.6-.3-1-1-1-1.8 0-1 .3-1.6.8-1.8.4-.3 1.2-.4 2.4-.4 1.1 0 1.8.1 2.2.3.6.3 1 1 1 1.9 0 .9-.4 1.4-1 1.7A6 6 0 0 1 0 0m3.1-6.3l.1 1.7c-.3-.8-1-1.3-1.9-1.6-.5-.2-1.4-.3-2.5-.3-1.8 0-3.1.3-4 .9C-6-5-6.4-3.8-6.4-2-6.5-.3-6 .8-5 1.5c.7.5 2 .8 3.8.8 1.1 0 2 0 2.5-.2C2 1.8 2.7 1.4 3 .7h.1v1.8c0 1.2-.1 2-.4 2.4-.4.5-1.3.7-2.6.7-.9 0-1.5 0-1.9-.3-.5-.3-.7-.8-.7-1.7H-6c0 1.9.6 3.1 1.8 3.7.8.4 2.2.6 4.2.6 2.4 0 4-.3 4.9-1 1-.7 1.5-2.2 1.5-4.4v-8.8z"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(460.9 300.6)"
|
||||
id="g48">
|
||||
<path
|
||||
id="path50"
|
||||
d="M0 0v2.6h1.8v3.2H5V2.6h5.5V0H5v-7.2c0-.7 0-1.2.2-1.4.2-.3.6-.5 1.3-.5.8 0 1.3.3 1.5 1l.2 2h3c0-2-.3-3.4-.8-4.2-.7-.9-2-1.4-3.9-1.4-1.8 0-3 .3-3.7.9-.8.6-1.1 1.8-1.1 3.6V0z"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<path
|
||||
id="path52"
|
||||
d="M478.2 289h-3.4v14.2h3.4zm0 17.3h-3.4v3h3.4z"
|
||||
fill="#fff" />
|
||||
<g
|
||||
transform="translate(487.5 300.7)"
|
||||
id="g54">
|
||||
<path
|
||||
id="path56"
|
||||
d="M0 0c-1.4 0-2.4-.3-2.8-1-.3-.4-.5-1.7-.5-3.6 0-2 .2-3.2.5-3.7.4-.6 1.3-1 2.8-1 1.5 0 2.4.4 2.8 1 .3.5.5 1.7.5 3.7S3-1.4 2.8-1C2.4-.3 1.5 0 0 0m0 2.6C2.8 2.6 4.7 2 5.5 1c.8-.9 1.1-2.7 1.1-5.6 0-2.9-.3-4.8-1-5.6-1-1-2.8-1.6-5.6-1.6s-4.7.5-5.5 1.6c-.8.8-1.1 2.7-1.1 5.6 0 2.9.3 4.7 1 5.6 1 1 2.8 1.6 5.6 1.6"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(497 303.2)"
|
||||
id="g58">
|
||||
<path
|
||||
id="path60"
|
||||
d="M0 0h3.4v-2.1A3 3 0 0 0 5.3-.2C6 0 6.7 0 8 0c1.8 0 3-.3 3.8-1 .7-.9 1-2.1 1-4v-9H9.4v9c0 1-.2 1.7-.6 2-.3.5-1 .7-2 .7-1.4 0-2.4-.4-2.8-1-.4-.6-.6-1.5-.6-3V-14H0z"
|
||||
fill="#fff" />
|
||||
</g>
|
||||
<path
|
||||
id="path62"
|
||||
d="M384.5 316.4h125.2v1.7H384.5z"
|
||||
fill="#006cb6" />
|
||||
<path
|
||||
id="path64"
|
||||
d="M384.5 275.6H471v1.7h-86.5z"
|
||||
fill="#006cb6" />
|
||||
<path
|
||||
id="path66"
|
||||
d="M482.3 275.6h27.4v1.7h-27.4z"
|
||||
fill="#006cb6" />
|
||||
</g>
|
||||
</g>
|
||||
<path
|
||||
id="path68"
|
||||
d="M332.3 275.9h42v42h-42z"
|
||||
fill="#fff" />
|
||||
<g
|
||||
id="g70">
|
||||
<g
|
||||
clip-path="url(#clipPath76)"
|
||||
id="g72">
|
||||
<g
|
||||
transform="translate(371.5 300.4)"
|
||||
id="g78">
|
||||
<path
|
||||
id="path80"
|
||||
d="M0 0c0-1.3-.5-3-.9-4C-2.3-8.4-4-11.1-8-11.1c-1.2 0-3.2.3-4 2.4l-.2.5-.3-.5a6.5 6.5 0 0 0-5-2.4c-1.6 0-2.8.5-3.6 1.4l-.2.3-.2-.3c-.8-.9-2.3-1.4-4-1.4-1.4 0-2.5.4-3.3 1.3l-.2.2-.2-.2c-.8-.9-2.2-1.3-3.9-1.3-2 0-3.2 1.2-3.3 3 0 3 2.7 9 3.9 10.8a3.4 3.4 0 0 0 3.1 1.8c1 0 1.6-.2 2-.6.3-.4.4-.7.4-1.4v-1l.5.9c1.2 2 3.3 2.2 5.3 2.2 1.3 0 2.6-.5 3-1.3l.2-.3.3.2a6 6 0 0 0 4 1.4c1.8 0 3.1-.5 3.9-1.3l.4-.7.2-.4.3.3c1.1 1.4 2.6 2 4.5 2 1.5 0 2.6-.4 3.4-1.2C0 2.3 0 1 0 0m-39.2-24.5h42v42h-42z"
|
||||
fill="#ffed00" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(372.7 298.8)"
|
||||
id="g82">
|
||||
<path
|
||||
id="path84"
|
||||
d="M0 0a24 24 0 0 0-1.8-5.5c-1.4-3-3.4-5.3-7.2-5.3-2 0-3.7.6-4.7 1.8a7.6 7.6 0 0 0-5-1.9 6 6 0 0 0-3.8 1.2 7.3 7.3 0 0 0-7.7 0 7 7 0 0 0-4-1.1C-37-10.8-39-9-39-6.5c0 3.3 2.7 9.4 4 11.5a5 5 0 0 0 4.4 2.4c2 0 2.7-.5 3-1.3 1.6 1.4 3.6 1.4 5 1.4 1.7 0 2.7-.4 3.5-1 1.2.6 2.6 1 4.2 1 2 0 3.6-.5 4.7-1.5a7 7 0 0 0 4.6 1.5c2.3 0 3.8-.9 4.7-2.1C.5 3.6.2 1.9 0 0m-40.3-22.9h42v42h-42z"
|
||||
fill="#e20614" />
|
||||
</g>
|
||||
<path
|
||||
id="path86"
|
||||
d="M374 276.2h-41.4v41.3H374zm-42-.6h42.6v42.5H332z"
|
||||
fill="#1c1c1b" />
|
||||
<g
|
||||
transform="translate(372.7 306.3)"
|
||||
id="g88">
|
||||
<path
|
||||
id="path90"
|
||||
d="M0 0a1 1 0 0 1-1-1c0-.6.4-1 1-1s1 .4 1 1C1-.5.6 0 0 0m0-.2a.8.8 0 1 0 0-1.6.8.8 0 0 0 0 1.6m.5-1.4l-.1.3-.2.2.3.3c0 .2-.2.3-.4.3h-.5v-1h.2v.4H0l.2-.3v-.2zm-.7.7v.2H0l.2-.1L0-.9z"
|
||||
fill="#1c1c1b" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(367.4 300.5)"
|
||||
id="g92">
|
||||
<path
|
||||
id="path94"
|
||||
d="M0 0c0-1-1.6-5.4-2.2-6.4-.2-.4-.5-.7-1-.7s-.6.3-.7.6c0 1 1.8 6 2.4 6.7.3.4.6.5 1 .5C0 .7 0 .3 0 0m2.9-1.8c-.4-1.8-1.2-3.9-2-5.5-1.5-2.6-3.2-3-4.8-3-1.5 0-3.2.7-3.2 3 0 1.7.7 4 1.3 5.7 1 2.8 2.2 5.1 5.7 5 4 0 3.3-3.6 3-5.2m-13 2.5c-.5 0-.9-.3-1.2-.7-.6-1-2-4.5-2.2-6-.1-1 .3-1.1.8-1.1.7 0 1.6.8 1.9 2.1 0 0-1.5 0-1 1.3.3 1.3 1 1.5 2.2 1.6 2.4 0 2.2-1.7 2-2.6-.6-3-2.8-5.5-5.9-5.5-2 0-3.4 1.1-3.4 3.3 0 1.5.8 3.9 1.4 5.3 1.3 3 2.6 5 6 5 2 0 3.7-.7 3.5-2.6-.2-1.4-1-2.2-2.2-2.3-.4 0-1.8 0-1.3 1.4.1.5.2.8-.5.8m-10.7-5.2l-.6-2a7 7 0 0 0 2 .2c1.1 0 1.8-.4 1.8-1.3 0-2-2.3-2.6-3.9-2.6-1.7 0-3.2 1-3.2 2.8A21 21 0 0 0-22.3.4c1.4 2.8 2.8 3.1 5.2 3.1 1.1 0 2.3-.4 2.3-1.4 0-1.4-1.2-2-2.3-2H-19s-.4-.6-.8-1.7c2.2.3 3.1-.2 2.8-1.5-.5-1.7-2-1.8-3.8-1.4m-7-2c2.2.4 2.7-.4 2.6-1.1-.2-2.2-2.1-2.6-3.8-2.6-1.2 0-2.3.6-2.4 2 0 2.5 2.5 8.3 3.7 10.2.6 1 1.3 1.4 2.3 1.4 1 0 1.3-.5 1.3-1.1 0-1.7-2.8-6.8-3.6-8.8M-.3 4.7a6 6 0 0 1-4.7-2l-.5.7c-.9 1-2.2 1.4-4 1.4-1.8 0-3.3-.6-4.3-1.4-.5.8-1.8 1.4-3.3 1.4-2 0-4.2-.3-5.5-2.4 0 .8-.1 1.2-.5 1.6-.6.6-1.4.7-2.2.7-1.5 0-2.6-.6-3.4-2-1.1-1.8-4-7.9-3.9-10.8 0-2 1.3-3.3 3.6-3.4 1.8 0 3.2.5 4.1 1.4.8-.9 2-1.4 3.5-1.4 1.6 0 3.2.5 4.2 1.6.8-1 2.1-1.6 3.8-1.6 2.1 0 4 1 5.2 2.6.7-1.9 2.4-2.6 4.3-2.6 4.1 0 6 2.8 7.4 7.3.4 1 .8 2.7.9 4.1.1 2.4-.9 4.8-4.7 4.8"
|
||||
fill="#1c1c1b" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 9.6 KiB |
BIN
docs/static/lego_education_logo_white.png
vendored
Normal file
After Width: | Height: | Size: 9.1 KiB |
@ -77,7 +77,7 @@ export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) {
|
||||
let rbfBIN = pxt.U.fromHex(rbfHex)
|
||||
pxt.HF2.write16(rbfBIN, 4, rbfBIN.length)
|
||||
|
||||
let origElfUF2 = UF2.parseFile(pxt.U.stringToUint8Array(atob(resp.outfiles[pxt.outputName()])))
|
||||
let origElfUF2 = UF2.parseFile(pxt.U.stringToUint8Array(ts.pxtc.decodeBase64(resp.outfiles[pxt.outputName()])))
|
||||
|
||||
let mkFile = (ext: string, data: Uint8Array = null) => {
|
||||
let f = UF2.newBlockFile()
|
||||
|
@ -8,7 +8,7 @@ import { FieldSpeed } from "./field_speed";
|
||||
import { FieldBrickButtons } from "./field_brickbuttons";
|
||||
import { FieldTurnRatio } from "./field_turnratio";
|
||||
|
||||
pxt.editor.initExtensionsAsync = function(opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
|
||||
pxt.editor.initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
|
||||
pxt.debug('loading pxt-ev3 target extensions...')
|
||||
updateBlocklyShape();
|
||||
const res: pxt.editor.ExtensionResult = {
|
||||
@ -28,7 +28,95 @@ pxt.editor.initExtensionsAsync = function(opts: pxt.editor.ExtensionOptions): Pr
|
||||
selector: "turnratio",
|
||||
editor: FieldTurnRatio
|
||||
}],
|
||||
deployCoreAsync
|
||||
deployCoreAsync,
|
||||
showUploadInstructionsAsync: (fn: string, url: string, confirmAsync: (options: any) => Promise<number>) => {
|
||||
let resolve: (thenableOrResult?: void | PromiseLike<void>) => void;
|
||||
let reject: (error: any) => void;
|
||||
const deferred = new Promise<void>((res, rej) => {
|
||||
resolve = res;
|
||||
reject = rej;
|
||||
});
|
||||
const boardName = pxt.appTarget.appTheme.boardName || "???";
|
||||
const boardDriveName = pxt.appTarget.appTheme.driveDisplayName || pxt.appTarget.compile.driveName || "???";
|
||||
|
||||
// https://msdn.microsoft.com/en-us/library/cc848897.aspx
|
||||
// "For security reasons, data URIs are restricted to downloaded resources.
|
||||
// Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements"
|
||||
const downloadAgain = !pxt.BrowserUtils.isIE() && !pxt.BrowserUtils.isEdge();
|
||||
const docUrl = pxt.appTarget.appTheme.usbDocs;
|
||||
const saveAs = pxt.BrowserUtils.hasSaveAs();
|
||||
|
||||
const htmlBody = `
|
||||
<div class="ui three column grid stackable">
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
<img class="ui medium rounded image" src="./static/download/connect.svg" style="height:109px;width:261px;margin-bottom:1rem;">
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
<span class="ui yellow circular label">1</span>
|
||||
<strong>${lf("Connect EV3 to computer with USB cable")}</strong>
|
||||
<br/>
|
||||
${lf("Use the miniUSB port on top of EV3 brick")}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
<img class="ui medium rounded image" src="./static/download/firmware.svg" style="height:109px;width:261px;margin-bottom:1rem;">
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
<span class="ui blue circular label">2</span>
|
||||
<strong>${lf("Make sure you have the latest EV3 firmware")}</strong>
|
||||
<br/>
|
||||
<a href="" target="_blank">${lf("Click here to update to latest firmware")}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="ui">
|
||||
<div class="image">
|
||||
<img class="ui medium rounded image" src="./static/download/transfer.svg" style="height:109px;width:261px;margin-bottom:1rem;">
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="description">
|
||||
<span class="ui blue circular label">3</span>
|
||||
${lf("Move the .uf2 file to EV3 brick")}
|
||||
<br/>
|
||||
${lf("Locate the downloaded .uf2 file and drag it to the EV3 drive")}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
return confirmAsync({
|
||||
header: lf("Download to your EV3"),
|
||||
htmlBody,
|
||||
hasCloseIcon: true,
|
||||
hideCancel: true,
|
||||
hideAgree: false,
|
||||
agreeLbl: lf("I got it"),
|
||||
buttons: [downloadAgain ? {
|
||||
label: fn,
|
||||
icon: "download",
|
||||
class: "lightgrey focused",
|
||||
url,
|
||||
fileName: fn
|
||||
} : undefined, docUrl ? {
|
||||
label: lf("Help"),
|
||||
icon: "help",
|
||||
class: "lightgrey",
|
||||
url: docUrl
|
||||
} : undefined]
|
||||
//timeout: 20000
|
||||
}).then(() => { });
|
||||
}
|
||||
};
|
||||
initAsync().catch(e => {
|
||||
// probably no HID - we'll try this again upon deployment
|
||||
|
@ -40,7 +40,8 @@ export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCust
|
||||
var labelContainer = document.createElement('div');
|
||||
this.speedSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg") as SVGGElement;
|
||||
pxsim.svg.hydrate(this.speedSVG, {
|
||||
viewBox: "0 0 200 100"
|
||||
viewBox: "0 0 200 100",
|
||||
width: "170"
|
||||
});
|
||||
|
||||
labelContainer.appendChild(this.speedSVG);
|
||||
@ -58,7 +59,7 @@ export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCust
|
||||
|
||||
this.reporter = pxsim.svg.child(this.speedSVG, "text", {
|
||||
'x': 100, 'y': 80,
|
||||
'text-anchor': 'middle', 'alignment-baseline': 'middle',
|
||||
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||
'style': 'font-size: 50px',
|
||||
'class': 'sim-text inverted number'
|
||||
}) as SVGTextElement;
|
||||
|
@ -56,7 +56,7 @@ export class FieldTurnRatio extends Blockly.FieldSlider implements Blockly.Field
|
||||
}, marker);
|
||||
this.reporter_ = pxsim.svg.child(svg, "text", {
|
||||
'x': FieldTurnRatio.HALF, 'y': 96,
|
||||
'text-anchor': 'middle', 'alignment-baseline': 'middle',
|
||||
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||
'style': 'font-size: 50px',
|
||||
'class': 'sim-text inverted number'
|
||||
}) as SVGTextElement;
|
||||
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
"automation": "Automation, process control and robotic controllers",
|
||||
"automation.Behavior": "A behavior",
|
||||
"automation.Behavior.update": "Called on each behavior iteration even for suppresed behaviors",
|
||||
"automation.Behavior.update|param|elapsed": "milli seconds since last call",
|
||||
"automation.BehaviorManager": "A manager for behaviors",
|
||||
"automation.BehaviorManager.add": "Adds a new behavior to the behavior manager",
|
||||
"automation.BehaviorManager.add|param|behavior": "the behavior to add",
|
||||
"automation.BehaviorManager.start": "Starts the behavior control loop",
|
||||
"automation.BehaviorManager.stop": "Stops the execution loop",
|
||||
"automation.PIDController": "A PID controller.\n* Reference: Feedback System, Karl Johan Astrom & Rickard M. Murry",
|
||||
"automation.PIDController.compute": "Computes the output based on the system state",
|
||||
"automation.PIDController.setControlSaturation": "Sets the control saturation values",
|
||||
"automation.PIDController.setControlSaturation|param|high": "highest control value, eg: 100",
|
||||
"automation.PIDController.setControlSaturation|param|low": "lowest control value, eg: -100",
|
||||
"automation.PIDController.setDerivativeFilter": "Sets the derivative filter gain",
|
||||
"automation.PIDController.setDerivativeFilter|param|N": "the filter gain, eg:10",
|
||||
"automation.PIDController.setGains": "Sets the PID gains",
|
||||
"automation.PIDController.setGains|param|b": "setpoint weight, eg: 0.9",
|
||||
"automation.PIDController.setGains|param|kd": "derivative gain",
|
||||
"automation.PIDController.setGains|param|ki": "integral gain",
|
||||
"automation.PIDController.setGains|param|kp": "proportional gain",
|
||||
"automation.PIDController.setPoint": "Updates the desired setpoint",
|
||||
"automation.addBehavior": "Adds the behavior and starts it",
|
||||
"automation.addBehavior|param|behavior": "a behavior"
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"automation.PIDController.compute|block": "%pid|compute for timestep %timestep|(ms) at state %y",
|
||||
"automation.PIDController.setControlSaturation|block": "set %pid|control saturation from %low|to %high",
|
||||
"automation.PIDController.setDerivativeFilter|block": "set %pid|derivative filter %N",
|
||||
"automation.PIDController.setGains|block": "set %pid|gains kp %kp|ki %ki|kd %kd",
|
||||
"automation.PIDController.setPoint|block": "set %pid|point to %ysp",
|
||||
"automation.addBehavior|block": "add behavior %behavior",
|
||||
"automation|block": "automation",
|
||||
"{id:category}Automation": "Automation",
|
||||
"{id:group}Behaviors": "Behaviors",
|
||||
"{id:group}PID": "PID"
|
||||
}
|
@ -1,157 +0,0 @@
|
||||
{
|
||||
"Array": "Add, remove, and replace items in lists.\n\nAdd, remove, and replace items in lists.",
|
||||
"Array.filter": "Return the elements of an array that meet the condition specified in a callback function.",
|
||||
"Array.filter|param|callbackfn": "A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.",
|
||||
"Array.get": "Get the value at a particular index",
|
||||
"Array.get|param|index": "the zero-based position in the list of the item, eg: 0",
|
||||
"Array.indexOf": "Return the index of the first occurrence of a value in an array.",
|
||||
"Array.indexOf|param|fromIndex": "The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.",
|
||||
"Array.indexOf|param|item": "The value to locate in the array.",
|
||||
"Array.insertAt": "Insert the value at a particular index, increases length by 1",
|
||||
"Array.insertAt|param|index": "the zero-based position in the list to insert the value, eg: 0",
|
||||
"Array.length": "Get or set the length of an array. This number is one more than the index of the last element the array.",
|
||||
"Array.map": "Call a defined callback function on each element of an array, and return an array containing the results.",
|
||||
"Array.map|param|callbackfn": "A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.",
|
||||
"Array.pop": "Remove the last element from an array and return it.",
|
||||
"Array.push": "Append a new element to an array.",
|
||||
"Array.reduce": "Call the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.",
|
||||
"Array.reduce|param|callbackfn": "A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.",
|
||||
"Array.reduce|param|initialValue": "Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.",
|
||||
"Array.removeAt": "Remove the element at a certain index.",
|
||||
"Array.removeElement": "Remove the first occurence of an object. Returns true if removed.",
|
||||
"Array.reverse": "Reverse the elements in an array. The first array element becomes the last, and the last array element becomes the first.",
|
||||
"Array.set": "Store a value at a particular index",
|
||||
"Array.set|param|index": "the zero-based position in the list to store the value, eg: 0",
|
||||
"Array.shift": "Remove the first element from an array and return it. This method changes the length of the array.",
|
||||
"Array.slice": "Return a section of an array.",
|
||||
"Array.slice|param|end": "The end of the specified portion of the array. eg: 0",
|
||||
"Array.slice|param|start": "The beginning of the specified portion of the array. eg: 0",
|
||||
"Array.sort": "Sort the elements of an array in place and returns the array. The sort is not necessarily stable.",
|
||||
"Array.splice": "Remove elements from an array.",
|
||||
"Array.splice|param|deleteCount": "The number of elements to remove. eg: 0",
|
||||
"Array.splice|param|start": "The zero-based location in the array from which to start removing elements. eg: 0",
|
||||
"Array.unshift": "Add one element to the beginning of an array and return the new length of the array.",
|
||||
"Boolean.toString": "Returns a string representation of an object.",
|
||||
"Buffer.fill": "Fill (a fragment) of the buffer with given value.",
|
||||
"Buffer.getNumber": "Read a number in specified format from the buffer.",
|
||||
"Buffer.length": "Returns the length of a Buffer object.",
|
||||
"Buffer.rotate": "Rotate buffer left in place.\n\n\n\nstart. eg: -1",
|
||||
"Buffer.rotate|param|length": "number of elements in buffer. If negative, length is set as the buffer length minus",
|
||||
"Buffer.rotate|param|offset": "number of bytes to shift; use negative value to shift right",
|
||||
"Buffer.rotate|param|start": "start offset in buffer. Default is 0.",
|
||||
"Buffer.setNumber": "Write a number in specified format in the buffer.",
|
||||
"Buffer.shift": "Shift buffer left in place, with zero padding.\n\n\n\nstart. eg: -1",
|
||||
"Buffer.shift|param|length": "number of elements in buffer. If negative, length is set as the buffer length minus",
|
||||
"Buffer.shift|param|offset": "number of bytes to shift; use negative value to shift right",
|
||||
"Buffer.shift|param|start": "start offset in buffer. Default is 0.",
|
||||
"Buffer.slice": "Return a copy of a fragment of a buffer.",
|
||||
"Buffer.toHex": "Convert a buffer to its hexadecimal representation.",
|
||||
"Buffer.write": "Write contents of `src` at `dstOffset` in current buffer.",
|
||||
"Math": "More complex operations with numbers.",
|
||||
"Math.abs": "Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5.",
|
||||
"Math.abs|param|x": "A numeric expression for which the absolute value is needed.",
|
||||
"Math.acos": "Returns the arccosine (in radians) of a number",
|
||||
"Math.acos|param|x": "A number",
|
||||
"Math.asin": "Returns the arcsine (in radians) of a number",
|
||||
"Math.asin|param|x": "A number",
|
||||
"Math.atan": "Returns the arctangent (in radians) of a number",
|
||||
"Math.atan2": "Returns the arctangent of the quotient of its arguments.",
|
||||
"Math.atan2|param|x": "A number",
|
||||
"Math.atan2|param|y": "A number",
|
||||
"Math.atan|param|x": "A number",
|
||||
"Math.ceil": "Returns the smallest number greater than or equal to its numeric argument.",
|
||||
"Math.ceil|param|x": "A numeric expression.",
|
||||
"Math.constrain": "Constrains a number to be within a range",
|
||||
"Math.cos": "Returns the cosine of a number.",
|
||||
"Math.cos|param|x": "An angle in radians",
|
||||
"Math.exp": "Returns returns ``e^x``.",
|
||||
"Math.exp|param|x": "A number",
|
||||
"Math.floor": "Returns the greatest number less than or equal to its numeric argument.",
|
||||
"Math.floor|param|x": "A numeric expression.",
|
||||
"Math.icos": "Returns the cosine of an input angle. This is an 8-bit approximation.",
|
||||
"Math.icos|param|theta": "input angle from 0-255",
|
||||
"Math.idiv": "Returns the value of integer signed 32 bit division of two numbers.",
|
||||
"Math.idiv|param|x": "The first number",
|
||||
"Math.idiv|param|y": "The second number",
|
||||
"Math.imul": "Returns the value of integer signed 32 bit multiplication of two numbers.",
|
||||
"Math.imul|param|x": "The first number",
|
||||
"Math.imul|param|y": "The second number",
|
||||
"Math.isin": "Returns the sine of an input angle. This is an 8-bit approximation.",
|
||||
"Math.isin|param|theta": "input angle from 0-255",
|
||||
"Math.log": "Returns the natural logarithm (base e) of a number.",
|
||||
"Math.log|param|x": "A number",
|
||||
"Math.map": "Re-maps a number from one range to another. That is, a value of ``from low`` would get mapped to ``to low``, a value of ``from high`` to ``to high``, values in-between to values in-between, etc.",
|
||||
"Math.map|param|fromHigh": "the upper bound of the value's current range, eg: 1023",
|
||||
"Math.map|param|fromLow": "the lower bound of the value's current range",
|
||||
"Math.map|param|toHigh": "the upper bound of the value's target range, eg: 4",
|
||||
"Math.map|param|toLow": "the lower bound of the value's target range",
|
||||
"Math.map|param|value": "value to map in ranges",
|
||||
"Math.max": "Returns the larger of two supplied numeric expressions.",
|
||||
"Math.min": "Returns the smaller of two supplied numeric expressions.",
|
||||
"Math.pow": "Returns the value of a base expression taken to a specified power.",
|
||||
"Math.pow|param|x": "The base value of the expression.",
|
||||
"Math.pow|param|y": "The exponent value of the expression.",
|
||||
"Math.random": "Returns a pseudorandom number between 0 and 1.",
|
||||
"Math.randomRange": "Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.",
|
||||
"Math.randomRange|param|max": "the upper inclusive bound, eg: 10",
|
||||
"Math.randomRange|param|min": "the lower inclusive bound, eg: 0",
|
||||
"Math.round": "Returns a supplied numeric expression rounded to the nearest number.",
|
||||
"Math.round|param|x": "The value to be rounded to the nearest number.",
|
||||
"Math.sign": "Returns the sign of the x, indicating whether x is positive, negative or zero.",
|
||||
"Math.sign|param|x": "The numeric expression to test",
|
||||
"Math.sin": "Returns the sine of a number.",
|
||||
"Math.sin|param|x": "An angle in radians",
|
||||
"Math.sqrt": "Returns the square root of a number.",
|
||||
"Math.sqrt|param|x": "A numeric expression.",
|
||||
"Math.tan": "Returns the tangent of a number.",
|
||||
"Math.tan|param|x": "An angle in radians",
|
||||
"Math.trunc": "Returns the number with the decimal part truncated.",
|
||||
"Math.trunc|param|x": "A numeric expression.",
|
||||
"Number.toString": "Returns a string representation of a number.",
|
||||
"String": "Combine, split, and search text strings.\n\nCombine, split, and search text strings.",
|
||||
"String.charAt": "Return the character at the specified index.",
|
||||
"String.charAt|param|index": "The zero-based index of the desired character.",
|
||||
"String.charCodeAt": "Return the Unicode value of the character at the specified location.",
|
||||
"String.charCodeAt|param|index": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.",
|
||||
"String.compare": "See how the order of characters in two strings is different (in ASCII encoding).",
|
||||
"String.compare|param|that": "String to compare to target string",
|
||||
"String.concat": "Returns a string that contains the concatenation of two or more strings.",
|
||||
"String.concat|param|other": "The string to append to the end of the string.",
|
||||
"String.fromCharCode": "Make a string from the given ASCII character code.",
|
||||
"String.isEmpty": "Returns a value indicating if the string is empty",
|
||||
"String.length": "Returns the length of a String object.",
|
||||
"String.substr": "Return a substring of the current string.",
|
||||
"String.substr|param|length": "number of characters to extract",
|
||||
"String.substr|param|start": "first character index; can be negative from counting from the end, eg:0",
|
||||
"control": "Program controls and events.",
|
||||
"control.AnimationQueue.cancel": "Cancels the current running animation and clears the queue",
|
||||
"control.AnimationQueue.runUntilDone": "Runs 'render' in a loop until it returns false or the 'stop' function is called",
|
||||
"control.assert": "Display an error code and stop the program when the assertion is `false`.",
|
||||
"control.deviceSerialNumber": "Derive a unique, consistent serial number of this device from internal data.",
|
||||
"control.millis": "Gets the number of milliseconds elapsed since power on.",
|
||||
"control.onEvent": "Run code when a registered event happens.",
|
||||
"control.onEvent|param|value": "the event value to match",
|
||||
"control.panic": "Display an error code and stop the program.",
|
||||
"control.panic|param|code": "an error number to display. eg: 5",
|
||||
"control.reset": "Reset the device.",
|
||||
"control.runInParallel": "Run other code in the parallel.",
|
||||
"control.waitForEvent": "Blocks the calling thread until the specified event is raised.",
|
||||
"control.waitMicros": "Block the current fiber for the given microseconds",
|
||||
"control.waitMicros|param|micros": "number of micro-seconds to wait. eg: 4",
|
||||
"hex": "Tagged hex literal converter",
|
||||
"loops.forever": "Repeats the code forever in the background. On each iteration, allows other codes to run.",
|
||||
"loops.pause": "Pause for the specified time in milliseconds",
|
||||
"loops.pause|param|ms": "how long to pause for, eg: 100, 200, 500, 1000, 2000",
|
||||
"parseInt": "Convert a string to an integer.",
|
||||
"pauseUntil": "Busy wait for a condition to be true",
|
||||
"pauseUntil|param|condition": "condition to test for",
|
||||
"pauseUntil|param|timeOut": "if positive, maximum duration to wait for in milliseconds",
|
||||
"serial": "Reading and writing data over a serial connection.",
|
||||
"serial.writeBuffer": "Send a buffer across the serial connection.",
|
||||
"serial.writeLine": "Write a line of text to the serial port.",
|
||||
"serial.writeNumber": "Write a number to the serial port.",
|
||||
"serial.writeString": "Write some text to the serial port.",
|
||||
"serial.writeValue": "Write a name:value pair as a line of text to the serial port.",
|
||||
"serial.writeValue|param|name": "name of the value stream, eg: \"x\"",
|
||||
"serial.writeValue|param|value": "to write"
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
{
|
||||
"Array.indexOf|block": "%list| find index of %value",
|
||||
"Array.insertAt|block": "%list| insert at %index| value %value",
|
||||
"Array.length|block": "length of %VALUE",
|
||||
"Array.pop|block": "get and remove last value from %list",
|
||||
"Array.push|block": "%list| add value %value| to end",
|
||||
"Array.removeAt|block": "%list| remove value at %index",
|
||||
"Array.reverse|block": "reverse %list",
|
||||
"Array.shift|block": "get and remove first value from %list",
|
||||
"Array.unshift|block": "%list| insert %value| at beginning",
|
||||
"Array|block": "Array",
|
||||
"Math.constrain|block": "constrain %value|between %low|and %high",
|
||||
"Math.map|block": "map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh",
|
||||
"Math.randomRange|block": "pick random %min|to %limit",
|
||||
"Math|block": "Math",
|
||||
"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.length|block": "length of %VALUE",
|
||||
"String.substr|block": "substring of %this=text|from %start|of length %length",
|
||||
"String|block": "String",
|
||||
"control.assert|block": "assert %cond|with value %code",
|
||||
"control.deviceSerialNumber|block": "device serial number",
|
||||
"control.millis|block": "millis (ms)",
|
||||
"control.onEvent|block": "on event|from %src|with value %value",
|
||||
"control.panic|block": "panic %code",
|
||||
"control.reset|block": "reset",
|
||||
"control.runInParallel|block": "run in parallel",
|
||||
"control.waitForEvent|block": "wait for event|from %src|with value %value",
|
||||
"control.waitMicros|block": "wait (µs)%micros",
|
||||
"control|block": "control",
|
||||
"fieldeditors|block": "fieldeditors",
|
||||
"loops.forever|block": "forever",
|
||||
"loops.pause|block": "pause %pause=timePicker|ms",
|
||||
"loops|block": "loops",
|
||||
"parseInt|block": "parse to integer %text",
|
||||
"serial.writeBuffer|block": "serial|write buffer %buffer",
|
||||
"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": "serial",
|
||||
"{id:category}Array": "Array",
|
||||
"{id:category}Arrays": "Arrays",
|
||||
"{id:category}Boolean": "Boolean",
|
||||
"{id:category}Buffer": "Buffer",
|
||||
"{id:category}Control": "Control",
|
||||
"{id:category}Helpers": "Helpers",
|
||||
"{id:category}Loops": "Loops",
|
||||
"{id:category}Math": "Math",
|
||||
"{id:category}Number": "Number",
|
||||
"{id:category}Serial": "Serial",
|
||||
"{id:category}String": "String",
|
||||
"{id:category}Text": "Text"
|
||||
}
|
34
libs/base/enums.d.ts
vendored
@ -1,34 +0,0 @@
|
||||
// Auto-generated. Do not edit.
|
||||
|
||||
|
||||
declare const enum NumberFormat {
|
||||
Int8LE = 1,
|
||||
UInt8LE = 2,
|
||||
Int16LE = 3,
|
||||
UInt16LE = 4,
|
||||
Int32LE = 5,
|
||||
Int8BE = 6,
|
||||
UInt8BE = 7,
|
||||
Int16BE = 8,
|
||||
UInt16BE = 9,
|
||||
Int32BE = 10,
|
||||
|
||||
UInt32LE = 11,
|
||||
UInt32BE = 12,
|
||||
Float32LE = 13,
|
||||
Float64LE = 14,
|
||||
Float32BE = 15,
|
||||
Float64BE = 16,
|
||||
}
|
||||
|
||||
|
||||
declare const enum ValType {
|
||||
Undefined = 0,
|
||||
Boolean = 1,
|
||||
Number = 2,
|
||||
String = 3,
|
||||
Object = 4,
|
||||
Function = 5,
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
159
libs/base/shims.d.ts
vendored
@ -1,159 +0,0 @@
|
||||
// Auto-generated. Do not edit.
|
||||
|
||||
|
||||
|
||||
//% indexerGet=BufferMethods::getByte indexerSet=BufferMethods::setByte
|
||||
declare interface Buffer {
|
||||
/**
|
||||
* Write a number in specified format in the buffer.
|
||||
*/
|
||||
//% shim=BufferMethods::setNumber
|
||||
setNumber(format: NumberFormat, offset: int32, value: number): void;
|
||||
|
||||
/**
|
||||
* Read a number in specified format from the buffer.
|
||||
*/
|
||||
//% shim=BufferMethods::getNumber
|
||||
getNumber(format: NumberFormat, offset: int32): number;
|
||||
|
||||
/** Returns the length of a Buffer object. */
|
||||
//% property shim=BufferMethods::length
|
||||
length: int32;
|
||||
|
||||
/**
|
||||
* Fill (a fragment) of the buffer with given value.
|
||||
*/
|
||||
//% offset.defl=0 length.defl=-1 shim=BufferMethods::fill
|
||||
fill(value: int32, offset?: int32, length?: int32): void;
|
||||
|
||||
/**
|
||||
* Return a copy of a fragment of a buffer.
|
||||
*/
|
||||
//% offset.defl=0 length.defl=-1 shim=BufferMethods::slice
|
||||
slice(offset?: int32, length?: int32): Buffer;
|
||||
|
||||
/**
|
||||
* Shift buffer left in place, with zero padding.
|
||||
* @param offset number of bytes to shift; use negative value to shift right
|
||||
* @param start start offset in buffer. Default is 0.
|
||||
* @param length number of elements in buffer. If negative, length is set as the buffer length minus
|
||||
* start. eg: -1
|
||||
*/
|
||||
//% start.defl=0 length.defl=-1 shim=BufferMethods::shift
|
||||
shift(offset: int32, start?: int32, length?: int32): void;
|
||||
|
||||
/**
|
||||
* Convert a buffer to its hexadecimal representation.
|
||||
*/
|
||||
//% shim=BufferMethods::toHex
|
||||
toHex(): string;
|
||||
|
||||
/**
|
||||
* Rotate buffer left in place.
|
||||
* @param offset number of bytes to shift; use negative value to shift right
|
||||
* @param start start offset in buffer. Default is 0.
|
||||
* @param length number of elements in buffer. If negative, length is set as the buffer length minus
|
||||
* start. eg: -1
|
||||
*/
|
||||
//% start.defl=0 length.defl=-1 shim=BufferMethods::rotate
|
||||
rotate(offset: int32, start?: int32, length?: int32): void;
|
||||
|
||||
/**
|
||||
* Write contents of `src` at `dstOffset` in current buffer.
|
||||
*/
|
||||
//% shim=BufferMethods::write
|
||||
write(dstOffset: int32, src: Buffer): void;
|
||||
}
|
||||
declare namespace loops {
|
||||
|
||||
/**
|
||||
* Repeats the code forever in the background. On each iteration, allows other codes to run.
|
||||
* @param body code to execute
|
||||
*/
|
||||
//% help=loops/forever weight=100 afterOnStart=true
|
||||
//% blockId=forever block="forever" blockAllowMultiple=1 shim=loops::forever
|
||||
function forever(a: () => void): void;
|
||||
|
||||
/**
|
||||
* Pause for the specified time in milliseconds
|
||||
* @param ms how long to pause for, eg: 100, 200, 500, 1000, 2000
|
||||
*/
|
||||
//% help=loops/pause weight=99
|
||||
//% async block="pause %pause=timePicker|ms"
|
||||
//% blockId=device_pause shim=loops::pause
|
||||
function pause(ms: int32): void;
|
||||
}
|
||||
declare namespace control {
|
||||
|
||||
/**
|
||||
* Gets the number of milliseconds elapsed since power on.
|
||||
*/
|
||||
//% help=control/millis weight=50
|
||||
//% blockId=control_running_time block="millis (ms)" shim=control::millis
|
||||
function millis(): int32;
|
||||
|
||||
/**
|
||||
* Run code when a registered event happens.
|
||||
* @param id the event compoent id
|
||||
* @param value the event value to match
|
||||
*/
|
||||
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src|with value %value"
|
||||
//% blockExternalInputs=1
|
||||
//% help="control/on-event" flags.defl=16 shim=control::onEvent
|
||||
function onEvent(src: int32, value: int32, handler: () => void, flags?: int32): void;
|
||||
|
||||
/**
|
||||
* Reset the device.
|
||||
*/
|
||||
//% weight=30 async help=control/reset blockGap=8
|
||||
//% blockId="control_reset" block="reset" shim=control::reset
|
||||
function reset(): void;
|
||||
|
||||
/**
|
||||
* Block the current fiber for the given microseconds
|
||||
* @param micros number of micro-seconds to wait. eg: 4
|
||||
*/
|
||||
//% help=control/wait-micros weight=29 async
|
||||
//% blockId="control_wait_us" block="wait (µs)%micros" shim=control::waitMicros
|
||||
function waitMicros(micros: int32): void;
|
||||
|
||||
/**
|
||||
* Run other code in the parallel.
|
||||
*/
|
||||
//% help=control/run-in-parallel handlerStatement=1
|
||||
//% blockId="control_run_in_parallel" block="run in parallel" blockGap=8 shim=control::runInParallel
|
||||
function runInParallel(a: () => void): void;
|
||||
|
||||
/**
|
||||
* Blocks the calling thread until the specified event is raised.
|
||||
*/
|
||||
//% help=control/wait-for-event async
|
||||
//% blockId=control_wait_for_event block="wait for event|from %src|with value %value" shim=control::waitForEvent
|
||||
function waitForEvent(src: int32, value: int32): void;
|
||||
|
||||
/**
|
||||
* Derive a unique, consistent serial number of this device from internal data.
|
||||
*/
|
||||
//% blockId="control_device_serial_number" block="device serial number" weight=9
|
||||
//% help=control/device-serial-number shim=control::deviceSerialNumber
|
||||
function deviceSerialNumber(): int32;
|
||||
}
|
||||
declare namespace serial {
|
||||
|
||||
/**
|
||||
* Write some text to the serial port.
|
||||
*/
|
||||
//% help=serial/write-string
|
||||
//% weight=87 blockHidden=true
|
||||
//% blockId=serial_writestring block="serial|write string %text" shim=serial::writeString
|
||||
function writeString(text: string): void;
|
||||
|
||||
/**
|
||||
* Send a buffer across the serial connection.
|
||||
*/
|
||||
//% help=serial/write-buffer weight=6 blockHidden=true
|
||||
//% blockId=serial_writebuffer block="serial|write buffer %buffer" shim=serial::writeBuffer
|
||||
function writeBuffer(buffer: Buffer): void;
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
@ -1,3 +1,5 @@
|
||||
<xml xmlns="http://www.w3.org/1999/xhtml">
|
||||
<block type="forever"></block>
|
||||
<variables></variables>
|
||||
<block type="pxt-on-start" x="0" y="0"></block>
|
||||
<block type="forever" x="176" y="0"></block>
|
||||
</xml>
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"chassis.Chassis": "A differential drive robot",
|
||||
"chassis.Chassis.drive": "Makes a differential drive robot move with a given speed (cm/s) and rotation rate (deg/s)\nusing a unicycle model.",
|
||||
"chassis.Chassis.drive|param|rotationSpeed": "rotation of the robot around the center point, eg: 30",
|
||||
"chassis.Chassis.drive|param|speed": "speed of the center point between motors, eg: 10",
|
||||
"chassis.Chassis.drive|param|value": "the amount of movement, eg: 2",
|
||||
"chassis.Chassis.setMotors": "Sets the motors used by the chassis, default is B+C",
|
||||
"chassis.Chassis.setProperty": "Sets a property of the robot",
|
||||
"chassis.Chassis.setProperty|param|property": "the property to set",
|
||||
"chassis.Chassis.setProperty|param|value": "the value to set"
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"ChassisProperty.BaseLength|block": "base length (cm)",
|
||||
"ChassisProperty.WheelRadius|block": "wheel radius (cm)",
|
||||
"chassis.Chassis.drive|block": "drive %chassis|at %speed|cm/s|turning %rotationSpeed|deg/s",
|
||||
"chassis.Chassis.setMotors|block": "set %chassis|motors to %motors",
|
||||
"chassis.Chassis.setProperty|block": "set %chassis|%property|to %value",
|
||||
"chassis|block": "chassis",
|
||||
"{id:category}Chassis": "Chassis"
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
enum ChassisProperty {
|
||||
//% block="wheel radius (cm)"
|
||||
WheelRadius,
|
||||
//% block="base length (cm)"
|
||||
BaseLength
|
||||
}
|
||||
|
||||
/**
|
||||
* A differential drive robot
|
||||
*/
|
||||
//% weight=50 color=#cf00cf
|
||||
namespace chassis {
|
||||
/**
|
||||
* A differential drive robot
|
||||
@ -29,13 +26,17 @@ namespace chassis {
|
||||
* using a unicycle model.
|
||||
* @param speed speed of the center point between motors, eg: 10
|
||||
* @param rotationSpeed rotation of the robot around the center point, eg: 30
|
||||
* @param value the amount of movement, eg: 2
|
||||
* @param unit
|
||||
*/
|
||||
* @param distance
|
||||
**/
|
||||
//% blockId=motorDrive block="drive %chassis|at %speed|cm/s|turning %rotationSpeed|deg/s"
|
||||
//% inlineInputMode=inline
|
||||
//% weight=95 blockGap=8
|
||||
drive(speed: number, rotationSpeed: number, value: number = 0, unit: MoveUnit = MoveUnit.MilliSeconds) {
|
||||
drive(speed: number, rotationSpeed: number, distance: number = 0) {
|
||||
if (!speed) {
|
||||
this.motors.stop();
|
||||
return;
|
||||
}
|
||||
|
||||
// speed is expressed in %
|
||||
const R = this.wheelRadius; // cm
|
||||
const L = this.baseLength; // cm
|
||||
@ -52,24 +53,28 @@ namespace chassis {
|
||||
const sr = vr / maxw * 100; // %
|
||||
const sl = vl / maxw * 100; // %
|
||||
|
||||
this.motors.tank(sr, sl, value, unit)
|
||||
// cm / (cm/s) = s
|
||||
const seconds = distance / speed;
|
||||
|
||||
this.motors.tank(sr, sl, seconds, MoveUnit.Seconds)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a property of the robot
|
||||
* @param property the property to set
|
||||
* @param value the value to set
|
||||
* Sets the wheel radius in centimeters
|
||||
* @param cm
|
||||
*/
|
||||
//% blockId=chassisSetProperty block="set %chassis|%property|to %value"
|
||||
//% blockGap=8
|
||||
//% weight=10
|
||||
setProperty(property: ChassisProperty, value: number) {
|
||||
switch (property) {
|
||||
case ChassisProperty.WheelRadius:
|
||||
this.wheelRadius = Math.max(0.1, value); break;
|
||||
case ChassisProperty.BaseLength:
|
||||
this.baseLength = Math.max(0.1, value); break;
|
||||
}
|
||||
//% blockId=chassisSetWheelRadius block="set %chassis|wheel radius to %cm|(cm)"
|
||||
setWheelRadius(cm: number) {
|
||||
this.wheelRadius = cm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the base length in centimeters
|
||||
* @param cm
|
||||
*/
|
||||
//% blockId=chassisSetBaseLength block="set %chassis|base length to %cm|(cm)"
|
||||
setBaseLength(cm: number) {
|
||||
this.baseLength = cm;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,6 +86,10 @@ namespace chassis {
|
||||
setMotors(motors: motors.SynchedMotorPair) {
|
||||
this.motors = motors;
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return `chassis base ${this.baseLength}, wheel ${this.wheelRadius}`;
|
||||
}
|
||||
}
|
||||
|
||||
//% fixedInstance whenUsed
|
||||
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"sensors.ColorSensor": "The color sensor is a digital sensor that can detect the color or intensity\nof light that enters the small window on the face of the sensor.",
|
||||
"sensors.ColorSensor.calibrateLight": "Collects measurement of the light condition and adjusts the threshold to 10% / 90%.",
|
||||
"sensors.ColorSensor.color": "Get the current color from the color sensor.",
|
||||
"sensors.ColorSensor.colorMode": "Gets the current color mode",
|
||||
"sensors.ColorSensor.light": "Measures the ambient or reflected light value from 0 (darkest) to 100 (brightest).",
|
||||
"sensors.ColorSensor.onColorDetected": "Registers code to run when the given color is detected.",
|
||||
"sensors.ColorSensor.onColorDetected|param|color": "the color to detect, eg: ColorSensorColor.Blue",
|
||||
"sensors.ColorSensor.onColorDetected|param|handler": "the code to run when detected",
|
||||
"sensors.ColorSensor.onLightChanged": "Registers code to run when the ambient light changes.",
|
||||
"sensors.ColorSensor.onLightChanged|param|condition": "the light condition",
|
||||
"sensors.ColorSensor.onLightChanged|param|handler": "the code to run when detected",
|
||||
"sensors.ColorSensor.pauseForColor": "Waits for the given color to be detected",
|
||||
"sensors.ColorSensor.pauseForColor|param|color": "the color to detect",
|
||||
"sensors.ColorSensor.pauseForLight": "Waits for the given color to be detected",
|
||||
"sensors.ColorSensor.setThreshold": "Sets a threshold value",
|
||||
"sensors.ColorSensor.setThreshold|param|condition": "the dark or bright light condition",
|
||||
"sensors.ColorSensor.setThreshold|param|value": "the value threshold"
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
"ColorSensorColor.Black|block": "black",
|
||||
"ColorSensorColor.Blue|block": "blue",
|
||||
"ColorSensorColor.Brown|block": "brown",
|
||||
"ColorSensorColor.Green|block": "green",
|
||||
"ColorSensorColor.None|block": "none",
|
||||
"ColorSensorColor.Red|block": "red",
|
||||
"ColorSensorColor.White|block": "white",
|
||||
"ColorSensorColor.Yellow|block": "yellow",
|
||||
"ColorSensorMode.AmbientLightIntensity|block": "ambient light intensity",
|
||||
"ColorSensorMode.Color|block": "color",
|
||||
"ColorSensorMode.ReflectedLightIntensity|block": "reflected light intensity",
|
||||
"LightCondition.Dark|block": "dark",
|
||||
"LightIntensityMode.Ambient|block": "ambient light",
|
||||
"LightIntensityMode.Reflected|block": "reflected light",
|
||||
"sensors.ColorSensor.calibrateLight|block": "calibrate|%sensor|for %mode|light",
|
||||
"sensors.ColorSensor.color|block": "%sensor| color",
|
||||
"sensors.ColorSensor.light|block": "%sensor|%mode",
|
||||
"sensors.ColorSensor.onColorDetected|block": "on %sensor|detected color %color",
|
||||
"sensors.ColorSensor.onLightChanged|block": "on %sensor|%mode|%condition",
|
||||
"sensors.ColorSensor.pauseForColor|block": "pause %sensor|for color %color",
|
||||
"sensors.ColorSensor.pauseForLight|block": "pause %sensor|for %mode|%condition",
|
||||
"sensors.ColorSensor.setThreshold|block": "set %sensor|%condition|to %value",
|
||||
"sensors.color1|block": "color 1",
|
||||
"sensors.color2|block": "color 2",
|
||||
"sensors.color3|block": "color 3",
|
||||
"sensors.color4|block": "color 4",
|
||||
"sensors|block": "sensors",
|
||||
"{id:category}Sensors": "Sensors",
|
||||
"{id:group}Color Sensor": "Color Sensor",
|
||||
"{id:group}Threshold": "Threshold"
|
||||
}
|
@ -19,21 +19,21 @@ enum LightIntensityMode {
|
||||
}
|
||||
|
||||
const enum ColorSensorColor {
|
||||
//% block="none"
|
||||
//% block="none" blockIdentity=sensors.color
|
||||
None,
|
||||
//% block="black"
|
||||
//% block="black" blockIdentity=sensors.color
|
||||
Black,
|
||||
//% block="blue"
|
||||
//% block="blue" blockIdentity=sensors.color
|
||||
Blue,
|
||||
//% block="green"
|
||||
//% block="green" blockIdentity=sensors.color
|
||||
Green,
|
||||
//% block="yellow"
|
||||
//% block="yellow" blockIdentity=sensors.color
|
||||
Yellow,
|
||||
//% block="red"
|
||||
//% block="red" blockIdentity=sensors.color
|
||||
Red,
|
||||
//% block="white"
|
||||
//% block="white" blockIdentity=sensors.color
|
||||
White,
|
||||
//% block="brown"
|
||||
//% block="brown" blockIdentity=sensors.color
|
||||
Brown,
|
||||
}
|
||||
|
||||
@ -157,6 +157,7 @@ namespace sensors {
|
||||
//% sensor.fieldEditor="ports"
|
||||
//% weight=98
|
||||
//% group="Color Sensor"
|
||||
//% blockGap=8
|
||||
color(): ColorSensorColor {
|
||||
this.setMode(ColorSensorMode.Color)
|
||||
return this.getNumber(NumberFormat.UInt8LE, 0)
|
||||
@ -241,6 +242,17 @@ namespace sensors {
|
||||
this.thresholdDetector.setHighThreshold(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the threshold value
|
||||
* @param condition the light condition
|
||||
*/
|
||||
//% blockId=colorGetThreshold block="%sensor|%condition"
|
||||
//% group="Threshold" blockGap=8 weight=89
|
||||
//% sensor.fieldEditor="ports"
|
||||
threshold(condition: LightCondition): number {
|
||||
return this.thresholdDetector.threshold(<ThresholdState><number>LightCondition.Dark);
|
||||
}
|
||||
|
||||
/**
|
||||
* Collects measurement of the light condition and adjusts the threshold to 10% / 90%.
|
||||
*/
|
||||
@ -259,13 +271,13 @@ namespace sensors {
|
||||
let min = 200;
|
||||
let max = -200;
|
||||
let k = 0;
|
||||
while(k++ < 1000 && vcount < 50) {
|
||||
while (k++ < 1000 && vcount < 50) {
|
||||
let v = this.light(mode);
|
||||
min = Math.min(min, v);
|
||||
max = Math.max(max, v);
|
||||
// detect if nothing has changed and stop calibration
|
||||
if (Math.abs(v - vold) <= 2)
|
||||
vcount ++;
|
||||
vcount++;
|
||||
else {
|
||||
vold = v;
|
||||
vcount = 1;
|
||||
@ -286,6 +298,18 @@ namespace sensors {
|
||||
|
||||
this.calibrating = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a color that the sensor can detect
|
||||
*/
|
||||
//% shim=TD_ID
|
||||
//% blockId=colorSensorColor block="color %color"
|
||||
//% group="Color Sensor"
|
||||
//% weight=97
|
||||
export function color(color: ColorSensorColor): ColorSensorColor {
|
||||
return color;
|
||||
}
|
||||
|
||||
//% whenUsed block="color 3" weight=95 fixedInstance jres=icons.port3
|
||||
|
@ -1,115 +0,0 @@
|
||||
{
|
||||
"BrickLight": "Patterns for lights under the buttons.",
|
||||
"ButtonEvent": "User interaction on buttons",
|
||||
"Draw": "Drawing modes",
|
||||
"Image.buffer": "Returns the underlaying Buffer object.",
|
||||
"Image.doubled": "Double size of an image.",
|
||||
"Image.draw": "Draw an image on the screen.",
|
||||
"Image.height": "Returns the height of an image.",
|
||||
"Image.width": "Returns the width of an image.",
|
||||
"MMap.getNumber": "Read a number in specified format from the buffer.",
|
||||
"MMap.ioctl": "Perform ioctl(2) on the underlaying file",
|
||||
"MMap.length": "Returns the length of a Buffer object.",
|
||||
"MMap.lseek": "Set pointer on the underlaying file.",
|
||||
"MMap.read": "Perform read(2) on the underlaying file",
|
||||
"MMap.setNumber": "Write a number in specified format in the buffer.",
|
||||
"MMap.slice": "Read a range of bytes into a buffer.",
|
||||
"MMap.write": "Perform write(2) on the underlaying file",
|
||||
"SeekWhence": "Mode for lseek()",
|
||||
"brick.Button": "Generic button class, for device buttons and sensors.",
|
||||
"brick.Button.isPressed": "Check if button is currently pressed or not.",
|
||||
"brick.Button.onEvent": "Do something when a button or sensor is clicked, up or down.",
|
||||
"brick.Button.onEvent|param|body": "code to run when the event is raised",
|
||||
"brick.Button.pauseUntil": "Waits until the event is raised",
|
||||
"brick.Button.pauseUntil|param|ev": "the event to wait for",
|
||||
"brick.Button.wasPressed": "See if the button was pressed again since the last time you checked.",
|
||||
"brick.batteryLevel": "Returns the current battery level",
|
||||
"brick.buttonDown": "Down button on the EV3 Brick.",
|
||||
"brick.buttonEnter": "Enter button on the EV3 Brick.",
|
||||
"brick.buttonLeft": "Left button on the EV3 Brick.",
|
||||
"brick.buttonRight": "Right button on the EV3 Brick.",
|
||||
"brick.buttonUp": "Up button on the EV3 Brick.",
|
||||
"brick.clearScreen": "Clears the screen",
|
||||
"brick.printPorts": "Prints the port states on the screen",
|
||||
"brick.setLight": "Set lights.",
|
||||
"brick.setLight|param|pattern": "the lights pattern to use. eg: BrickLight.Orange",
|
||||
"brick.showImage": "Shows an image on screen",
|
||||
"brick.showImage|param|image": "image to draw",
|
||||
"brick.showNumber": "Shows a number on the screen",
|
||||
"brick.showNumber|param|line": "the line number to print the text at, eg: 1",
|
||||
"brick.showNumber|param|value": "the numeric value",
|
||||
"brick.showString": "Show text on the screen at a specific line.",
|
||||
"brick.showString|param|line": "the line number to print the text at, eg: 1",
|
||||
"brick.showString|param|text": "the text to print on the screen, eg: \"Hello world\"",
|
||||
"brick.showValue": "Shows a name, value pair on the screen",
|
||||
"brick.showValue|param|line": "the line number to print the text at, eg: 1",
|
||||
"brick.showValue|param|value": "the numeric value",
|
||||
"console": "Reading and writing data to the console output.\n\nReading and writing data to the console output.",
|
||||
"console.addListener": "Adds a listener for the log messages",
|
||||
"console.log": "Write a line of text to the console output.",
|
||||
"console.logValue": "Write a name:value pair as a line of text to the console output.",
|
||||
"console.logValue|param|name": "name of the value stream, eg: \"x\"",
|
||||
"console.logValue|param|value": "to write",
|
||||
"console.sendToScreen": "Sends the log messages to the brick screen and uses the brick up and down buttons to scroll.",
|
||||
"control": "Program controls and events.",
|
||||
"control.Timer": "A timer",
|
||||
"control.Timer.millis": "Gets the elapsed time in millis since the last reset",
|
||||
"control.Timer.pauseUntil": "Pauses until the timer reaches the given amount of milliseconds",
|
||||
"control.Timer.pauseUntil|param|ms": "how long to pause for, eg: 5, 100, 200, 500, 1000, 2000",
|
||||
"control.Timer.reset": "Resets the timer",
|
||||
"control.Timer.seconds": "Gets the elapsed time in seconds since the last reset",
|
||||
"control.allocateNotifyEvent": "Allocates the next user notification event",
|
||||
"control.deviceFirmwareVersion": "Determine the version of system software currently running.",
|
||||
"control.dmesg": "Write data to DMESG debugging buffer.",
|
||||
"control.mmap": "Create new file mapping in memory",
|
||||
"control.raiseEvent": "Announce that an event happened to registered handlers.",
|
||||
"control.raiseEvent|param|src": "ID of the Component that generated the event",
|
||||
"control.raiseEvent|param|value": "Component specific code indicating the cause of the event.",
|
||||
"motors.Motor.angle": "Gets motor angle.",
|
||||
"motors.Motor.clearCounts": "Clears the motor count",
|
||||
"motors.Motor.setRegulated": "Indicates if the motor speed should be regulated. Default is true.",
|
||||
"motors.Motor.setRegulated|param|value": "true for regulated motor",
|
||||
"motors.Motor.speed": "Gets motor actual speed.",
|
||||
"motors.Motor.tacho": "Gets motor tachometer count.",
|
||||
"motors.Motor.toString": "Returns the status of the motor",
|
||||
"motors.MotorBase.isReady": "Returns a value indicating if the motor is still running a previous command.",
|
||||
"motors.MotorBase.pauseUntilReady": "Pauses the execution until the previous command finished.",
|
||||
"motors.MotorBase.pauseUntilReady|param|timeOut": "optional maximum pausing time in milliseconds",
|
||||
"motors.MotorBase.reset": "Resets the motor(s).",
|
||||
"motors.MotorBase.setBrake": "Sets the automatic brake on or off when the motor is off",
|
||||
"motors.MotorBase.setBrake|param|brake": "a value indicating if the motor should break when off",
|
||||
"motors.MotorBase.setReversed": "Reverses the motor polarity",
|
||||
"motors.MotorBase.setSpeed": "Sets the motor speed for limited time or distance.",
|
||||
"motors.MotorBase.setSpeed|param|speed": "the speed from ``100`` full forward to ``-100`` full backward, eg: 50",
|
||||
"motors.MotorBase.setSpeed|param|unit": "(optional) unit of the value",
|
||||
"motors.MotorBase.setSpeed|param|value": "(optional) measured distance or rotation",
|
||||
"motors.MotorBase.stop": "Stops the motor(s).",
|
||||
"motors.SynchedMotorPair.steer": "Turns the motor and the follower motor by a number of rotations",
|
||||
"motors.SynchedMotorPair.steer|param|speed": "the speed from ``100`` full forward to ``-100`` full backward, eg: 50",
|
||||
"motors.SynchedMotorPair.steer|param|turnRatio": "the ratio of power sent to the follower motor, from ``-200`` to ``200``, eg: 0",
|
||||
"motors.SynchedMotorPair.steer|param|unit": "(optional) unit of the value",
|
||||
"motors.SynchedMotorPair.steer|param|value": "(optional) move duration or rotation",
|
||||
"motors.SynchedMotorPair.tank": "The Move Tank block can make a robot drive forward, backward, turn, or stop. \nUse the Move Tank block for robot vehicles that have two Large Motors, \nwith one motor driving the left side of the vehicle and the other the right side. \nYou can make the two motors go at different speeds or in different directions \nto make your robot turn.",
|
||||
"motors.SynchedMotorPair.tank|param|speedLeft": "the speed on the left motor, eg: 50",
|
||||
"motors.SynchedMotorPair.tank|param|speedRight": "the speed on the right motor, eg: 50",
|
||||
"motors.SynchedMotorPair.tank|param|unit": "(optional) unit of the value",
|
||||
"motors.SynchedMotorPair.tank|param|value": "(optional) move duration or rotation",
|
||||
"motors.SynchedMotorPair.toString": "Returns the name(s) of the motor",
|
||||
"motors.mkCmd": "Allocates a message buffer",
|
||||
"motors.mkCmd|param|addSize": "required additional bytes",
|
||||
"motors.mkCmd|param|cmd": "command id",
|
||||
"motors.mkCmd|param|out": "ports",
|
||||
"motors.readPWM": "Sends and receives a message from the motors device",
|
||||
"motors.readPWM|param|buf": "message buffer",
|
||||
"motors.resetAllMotors": "Resets all motors",
|
||||
"motors.stopAllMotors": "Stops all motors",
|
||||
"motors.writePWM": "Sends a command to the motors device",
|
||||
"motors.writePWM|param|buf": "the command buffer",
|
||||
"output.createBuffer": "Create a new zero-initialized buffer.",
|
||||
"output.createBuffer|param|size": "number of bytes in the buffer",
|
||||
"screen.clear": "Clear screen and reset font to normal.",
|
||||
"screen.imageOf": "Makes an image bound to a buffer.",
|
||||
"screen.unpackPNG": "Decompresses a 1-bit gray scale PNG image to image format.",
|
||||
"serial": "Reading and writing data over a serial connection.",
|
||||
"serial.writeDmesg": "Send DMESG debug buffer over serial."
|
||||
}
|
@ -1,112 +0,0 @@
|
||||
{
|
||||
"BrickLight.GreenFlash|block": "green flash",
|
||||
"BrickLight.GreenPulse|block": "green pulse",
|
||||
"BrickLight.Green|block": "green",
|
||||
"BrickLight.Off|block": "off",
|
||||
"BrickLight.OrangeFlash|block": "orange flash",
|
||||
"BrickLight.OrangePulse|block": "orange pulse",
|
||||
"BrickLight.Orange|block": "orange",
|
||||
"BrickLight.RedFlash|block": "red flash",
|
||||
"BrickLight.RedPulse|block": "red pulse",
|
||||
"BrickLight.Red|block": "red",
|
||||
"ButtonEvent.Click|block": "click",
|
||||
"ButtonEvent.Down|block": "down",
|
||||
"ButtonEvent.Up|block": "up",
|
||||
"MoveUnit.Degrees|block": "degrees",
|
||||
"MoveUnit.MilliSeconds|block": "milliseconds",
|
||||
"MoveUnit.Rotations|block": "rotations",
|
||||
"MoveUnit.Seconds|block": "seconds",
|
||||
"Output.AB|block": "A+B",
|
||||
"Output.AD|block": "A+D",
|
||||
"Output.ALL|block": "All",
|
||||
"Output.A|block": "A",
|
||||
"Output.BC|block": "B+C",
|
||||
"Output.B|block": "B",
|
||||
"Output.CD|block": "C+D",
|
||||
"Output.C|block": "C",
|
||||
"Output.D|block": "D",
|
||||
"brick.Button.isPressed|block": "%button|is pressed",
|
||||
"brick.Button.onEvent|block": "on %button|%event",
|
||||
"brick.Button.pauseUntil|block": "pause until %button|%event",
|
||||
"brick.Button.wasPressed|block": "%button|was pressed",
|
||||
"brick.batteryLevel|block": "battery level",
|
||||
"brick.buttonDown|block": "button down",
|
||||
"brick.buttonEnter|block": "button enter",
|
||||
"brick.buttonLeft|block": "button left",
|
||||
"brick.buttonRight|block": "button right",
|
||||
"brick.buttonUp|block": "button up",
|
||||
"brick.clearScreen|block": "clear screen",
|
||||
"brick.printPorts|block": "print ports",
|
||||
"brick.setLight|block": "set light to %pattern",
|
||||
"brick.showImage|block": "show image %image=screen_image_picker",
|
||||
"brick.showNumber|block": "show number %name|at line %line",
|
||||
"brick.showString|block": "show string %text|at line %line",
|
||||
"brick.showValue|block": "show value %name|= %text|at line %line",
|
||||
"brick|block": "brick",
|
||||
"console.logValue|block": "console|log value %name|= %value",
|
||||
"console.log|block": "console|log %text",
|
||||
"console.sendToScreen|block": "send console to screen",
|
||||
"console|block": "console",
|
||||
"control.Timer.millis|block": "%timer|millis",
|
||||
"control.Timer.pauseUntil|block": "%timer|pause until (ms) %ms",
|
||||
"control.Timer.reset|block": "%timer|reset",
|
||||
"control.Timer.seconds|block": "%timer|seconds",
|
||||
"control.raiseEvent|block": "raise event|from %src|with value %value",
|
||||
"control.timer1|block": "timer 1",
|
||||
"control.timer2|block": "timer 2",
|
||||
"control.timer3|block": "timer 3",
|
||||
"control.timer4|block": "timer 4",
|
||||
"control.timer5|block": "timer 5",
|
||||
"control.timer6|block": "timer 6",
|
||||
"control.timer7|block": "timer 7",
|
||||
"control.timer8|block": "timer 8",
|
||||
"control|block": "control",
|
||||
"motors.Motor.angle|block": "%motor|angle",
|
||||
"motors.Motor.clearCounts|block": "%motor|clear counts",
|
||||
"motors.Motor.setRegulated|block": "set %motor|regulated %value=toggleOnOff",
|
||||
"motors.Motor.speed|block": "%motor|speed",
|
||||
"motors.Motor.tacho|block": "%motor|tacho",
|
||||
"motors.MotorBase.pauseUntilReady|block": "%motor|pause until ready",
|
||||
"motors.MotorBase.reset|block": "%motors|reset",
|
||||
"motors.MotorBase.setBrake|block": "set %motor|brake %brake=toggleOnOff",
|
||||
"motors.MotorBase.setReversed|block": "set %motor|reversed %reversed=toggleOnOff",
|
||||
"motors.MotorBase.setSpeed|block": "set %motor|speed to %speed=motorSpeedPicker|%",
|
||||
"motors.MotorBase.stop|block": "%motors|stop",
|
||||
"motors.SynchedMotorPair.steer|block": "steer %chassis|turn ratio %turnRatio=motorTurnRatioPicker|speed %speed=motorSpeedPicker|%",
|
||||
"motors.SynchedMotorPair.tank|block": "tank %motors|%speedLeft=motorSpeedPicker|%|%speedRight=motorSpeedPicker|%",
|
||||
"motors.largeAB|block": "large A+B",
|
||||
"motors.largeAD|block": "large A+D",
|
||||
"motors.largeA|block": "large A",
|
||||
"motors.largeBC|block": "large B+C",
|
||||
"motors.largeB|block": "large B",
|
||||
"motors.largeCD|block": "large C+D",
|
||||
"motors.largeC|block": "large C",
|
||||
"motors.largeD|block": "large D",
|
||||
"motors.mediumA|block": "medium A",
|
||||
"motors.mediumB|block": "medium B",
|
||||
"motors.mediumC|block": "medium C",
|
||||
"motors.mediumD|block": "medium D",
|
||||
"motors.stopAllMotors|block": "stop all motors",
|
||||
"motors|block": "motors",
|
||||
"output|block": "output",
|
||||
"screen|block": "screen",
|
||||
"sensors|block": "sensors",
|
||||
"serial|block": "serial",
|
||||
"{id:category}Brick": "Brick",
|
||||
"{id:category}Console": "Console",
|
||||
"{id:category}Control": "Control",
|
||||
"{id:category}Image": "Image",
|
||||
"{id:category}Images": "Images",
|
||||
"{id:category}MMap": "MMap",
|
||||
"{id:category}Motors": "Motors",
|
||||
"{id:category}Output": "Output",
|
||||
"{id:category}Screen": "Screen",
|
||||
"{id:category}Sensors": "Sensors",
|
||||
"{id:category}Serial": "Serial",
|
||||
"{id:group}Buttons": "Buttons",
|
||||
"{id:group}Counters": "Counters",
|
||||
"{id:group}More": "More",
|
||||
"{id:group}Move": "Move",
|
||||
"{id:group}Screen": "Screen",
|
||||
"{id:group}Sensors": "Sensors"
|
||||
}
|
@ -5,6 +5,7 @@ namespace brick {
|
||||
*/
|
||||
//% blockId=brickBatteryLevel block="battery level"
|
||||
//% group="More"
|
||||
//% help=brick/battery-level
|
||||
export function batteryLevel(): number {
|
||||
const info = sensors.internal.getBatteryInfo();
|
||||
return info.current;
|
||||
|
@ -29,14 +29,15 @@ const enum BrickLight {
|
||||
* User interaction on buttons
|
||||
*/
|
||||
const enum ButtonEvent {
|
||||
//% block="click"
|
||||
Click = 1,
|
||||
//% block="up"
|
||||
Up = 3,
|
||||
//% block="down"
|
||||
Down = 4,
|
||||
//% block="pressed"
|
||||
Pressed = 4,
|
||||
//% block="bumped"
|
||||
Bumped = 1,
|
||||
//% block="released"
|
||||
Released = 3,
|
||||
}
|
||||
|
||||
|
||||
namespace brick {
|
||||
/**
|
||||
* Generic button class, for device buttons and sensors.
|
||||
@ -62,12 +63,12 @@ namespace brick {
|
||||
if (curr) {
|
||||
this._wasPressed = true;
|
||||
this.downTime = control.millis()
|
||||
control.raiseEvent(this._id, ButtonEvent.Down)
|
||||
control.raiseEvent(this._id, ButtonEvent.Pressed)
|
||||
} else {
|
||||
control.raiseEvent(this._id, ButtonEvent.Up)
|
||||
control.raiseEvent(this._id, ButtonEvent.Released)
|
||||
const delta = control.millis() - this.downTime;
|
||||
if (delta < 500)
|
||||
control.raiseEvent(this._id, ButtonEvent.Click)
|
||||
control.raiseEvent(this._id, ButtonEvent.Bumped)
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ namespace brick {
|
||||
* Check if button is currently pressed or not.
|
||||
* @param button the button to query the request
|
||||
*/
|
||||
//% help=input/button/is-pressed
|
||||
//% help=brick/button/is-pressed
|
||||
//% block="%button|is pressed"
|
||||
//% blockId=buttonIsPressed
|
||||
//% parts="brick"
|
||||
@ -91,7 +92,7 @@ namespace brick {
|
||||
* See if the button was pressed again since the last time you checked.
|
||||
* @param button the button to query the request
|
||||
*/
|
||||
//% help=input/button/was-pressed
|
||||
//% help=brick/button/was-pressed
|
||||
//% block="%button|was pressed"
|
||||
//% blockId=buttonWasPressed
|
||||
//% parts="brick"
|
||||
@ -111,7 +112,7 @@ namespace brick {
|
||||
* @param event the kind of button gesture that needs to be detected
|
||||
* @param body code to run when the event is raised
|
||||
*/
|
||||
//% help=input/button/on-event
|
||||
//% help=brick/button/on-event
|
||||
//% blockId=buttonEvent block="on %button|%event"
|
||||
//% parts="brick"
|
||||
//% blockNamespace=brick
|
||||
@ -126,7 +127,7 @@ namespace brick {
|
||||
* Waits until the event is raised
|
||||
* @param ev the event to wait for
|
||||
*/
|
||||
//% help=input/button/pause-until
|
||||
//% help=brick/button/pause-until
|
||||
//% blockId=buttonWaitUntil block="pause until %button|%event"
|
||||
//% parts="brick"
|
||||
//% blockNamespace=brick
|
||||
@ -251,6 +252,7 @@ namespace brick {
|
||||
*/
|
||||
//% blockId=setLights block="set light to %pattern"
|
||||
//% weight=100 group="Buttons"
|
||||
//% help=brick/set-light
|
||||
export function setLight(pattern: BrickLight): void {
|
||||
if (currPattern === pattern)
|
||||
return
|
||||
|
@ -66,8 +66,8 @@ namespace console.screen {
|
||||
if (!lines) {
|
||||
lines = [];
|
||||
console.addListener(log);
|
||||
brick.buttonUp.onEvent(ButtonEvent.Click, () => scroll(-3))
|
||||
brick.buttonDown.onEvent(ButtonEvent.Click, () => scroll(3))
|
||||
brick.buttonUp.onEvent(ButtonEvent.Bumped, () => scroll(-3))
|
||||
brick.buttonDown.onEvent(ButtonEvent.Bumped, () => scroll(3))
|
||||
}
|
||||
}
|
||||
|
||||
|
29
libs/core/enums.d.ts
vendored
@ -1,29 +0,0 @@
|
||||
// Auto-generated. Do not edit.
|
||||
|
||||
|
||||
/**
|
||||
* Mode for lseek()
|
||||
*/
|
||||
|
||||
declare const enum SeekWhence {
|
||||
Set = 0,
|
||||
Current = 1,
|
||||
End = 2,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Drawing modes
|
||||
*/
|
||||
|
||||
declare const enum Draw {
|
||||
Normal = 0x00,
|
||||
Clear = 0x01,
|
||||
Xor = 0x02,
|
||||
Fill = 0x04,
|
||||
Transparent = 0x08,
|
||||
Double = 0x10,
|
||||
Quad = 0x20,
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
@ -432,11 +432,11 @@ namespace sensors {
|
||||
|
||||
export class ThresholdDetector {
|
||||
public id: number;
|
||||
private min: number;
|
||||
private max: number;
|
||||
private lowThreshold: number;
|
||||
private highThreshold: number;
|
||||
private level: number;
|
||||
public min: number;
|
||||
public max: number;
|
||||
public lowThreshold: number;
|
||||
public highThreshold: number;
|
||||
public level: number;
|
||||
public state: ThresholdState;
|
||||
|
||||
constructor(id: number, min = 0, max = 100, lowThreshold = 20, highThreshold = 80) {
|
||||
@ -467,6 +467,14 @@ namespace sensors {
|
||||
}
|
||||
}
|
||||
|
||||
public threshold(t: ThresholdState): number {
|
||||
switch(t) {
|
||||
case ThresholdState.High: return this.highThreshold;
|
||||
case ThresholdState.Low: return this.lowThreshold;
|
||||
default: return (this.max - this.min) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
public setLowThreshold(value: number) {
|
||||
this.lowThreshold = this.clampValue(value);
|
||||
this.highThreshold = Math.max(this.lowThreshold + 1, this.highThreshold);
|
||||
|
@ -72,6 +72,7 @@ namespace brick {
|
||||
*/
|
||||
//% blockId=screen_print block="show string %text|at line %line"
|
||||
//% weight=98 group="Screen" inlineInputMode="inline" blockGap=8
|
||||
//% help=brick/show-string
|
||||
//% line.min=1 line.max=10
|
||||
export function showString(text: string, line: number) {
|
||||
const NUM_LINES = 9;
|
||||
@ -87,6 +88,7 @@ namespace brick {
|
||||
*/
|
||||
//% blockId=screenShowNumber block="show number %name|at line %line"
|
||||
//% weight=96 group="Screen" inlineInputMode="inline" blockGap=8
|
||||
//% help=brick/show-number
|
||||
//% line.min=1 line.max=10
|
||||
export function showNumber(value: number, line: number) {
|
||||
showString("" + value, line);
|
||||
@ -99,6 +101,7 @@ namespace brick {
|
||||
*/
|
||||
//% blockId=screenShowValue block="show value %name|= %text|at line %line"
|
||||
//% weight=96 group="Screen" inlineInputMode="inline" blockGap=8
|
||||
//% help=brick/show-value
|
||||
//% line.min=1 line.max=10
|
||||
export function showValue(name: string, value: number, line: number) {
|
||||
value = Math.round(value * 1000) / 1000;
|
||||
@ -136,11 +139,12 @@ namespace brick {
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows an image on screen
|
||||
* Show an image on the screen
|
||||
* @param image image to draw
|
||||
*/
|
||||
//% blockId=screen_show_image block="show image %image=screen_image_picker"
|
||||
//% weight=100 group="Screen" blockGap=8
|
||||
//% help=brick/show-image
|
||||
export function showImage(image: Image) {
|
||||
if (!image) return;
|
||||
image.draw(0, 0, Draw.Normal);
|
||||
@ -160,10 +164,11 @@ namespace brick {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the screen
|
||||
* Clear the screen
|
||||
*/
|
||||
//% blockId=screen_clear_screen block="clear screen"
|
||||
//% weight=90 group="Screen"
|
||||
//% help=brick/clear-screen
|
||||
export function clearScreen() {
|
||||
screen.clear();
|
||||
}
|
||||
@ -206,39 +211,4 @@ namespace brick {
|
||||
if (y < y1)
|
||||
setLineCore(x, x1, y, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the port states on the screen
|
||||
*/
|
||||
//% blockId=brickPrintPorts block="print ports"
|
||||
//% weight=1 group="Screen"
|
||||
export function printPorts() {
|
||||
const col = 44;
|
||||
clearScreen();
|
||||
|
||||
function scale(x: number) {
|
||||
if (Math.abs(x) > 1000) return Math.round(x / 100) / 10 + "k";
|
||||
return ("" + (x >> 0));
|
||||
}
|
||||
|
||||
// motors
|
||||
const datas = motors.getAllMotorData();
|
||||
for(let i = 0; i < datas.length; ++i) {
|
||||
const data = datas[i];
|
||||
if (!data.actualSpeed && !data.count) continue;
|
||||
const x = i * col;
|
||||
print(`${scale(data.actualSpeed)}%`, x, brick.LINE_HEIGHT)
|
||||
print(`${scale(data.count)}>`, x, 2 * brick.LINE_HEIGHT)
|
||||
print(`${scale(data.tachoCount)}|`, x, 3 * brick.LINE_HEIGHT)
|
||||
}
|
||||
|
||||
// sensors
|
||||
const sis = sensors.internal.getActiveSensors();
|
||||
for(let i =0; i < sis.length; ++i) {
|
||||
const si = sis[i];
|
||||
const x = (si.port() - 1) * col;
|
||||
const v = si._query();
|
||||
print(`${scale(v)}`, x, 9 * brick.LINE_HEIGHT)
|
||||
}
|
||||
}
|
||||
}
|
144
libs/core/shims.d.ts
vendored
@ -1,144 +0,0 @@
|
||||
// Auto-generated. Do not edit.
|
||||
declare namespace control {
|
||||
|
||||
/** Create new file mapping in memory */
|
||||
//% shim=control::mmap
|
||||
function mmap(filename: string, size: int32, offset: int32): MMap;
|
||||
}
|
||||
|
||||
|
||||
declare interface MMap {
|
||||
/**
|
||||
* Write a number in specified format in the buffer.
|
||||
*/
|
||||
//% shim=MMapMethods::setNumber
|
||||
setNumber(format: NumberFormat, offset: int32, value: number): void;
|
||||
|
||||
/**
|
||||
* Read a number in specified format from the buffer.
|
||||
*/
|
||||
//% shim=MMapMethods::getNumber
|
||||
getNumber(format: NumberFormat, offset: int32): number;
|
||||
|
||||
/**
|
||||
* Read a range of bytes into a buffer.
|
||||
*/
|
||||
//% offset.defl=0 length.defl=-1 shim=MMapMethods::slice
|
||||
slice(offset?: int32, length?: int32): Buffer;
|
||||
|
||||
/** Returns the length of a Buffer object. */
|
||||
//% property shim=MMapMethods::length
|
||||
length: int32;
|
||||
|
||||
/** Perform ioctl(2) on the underlaying file */
|
||||
//% shim=MMapMethods::ioctl
|
||||
ioctl(id: uint32, data: Buffer): int32;
|
||||
|
||||
/** Perform write(2) on the underlaying file */
|
||||
//% shim=MMapMethods::write
|
||||
write(data: Buffer): int32;
|
||||
|
||||
/** Perform read(2) on the underlaying file */
|
||||
//% shim=MMapMethods::read
|
||||
read(data: Buffer): int32;
|
||||
|
||||
/** Set pointer on the underlaying file. */
|
||||
//% shim=MMapMethods::lseek
|
||||
lseek(offset: int32, whence: SeekWhence): int32;
|
||||
}
|
||||
declare namespace control {
|
||||
|
||||
/**
|
||||
* Announce that an event happened to registered handlers.
|
||||
* @param src ID of the Component that generated the event
|
||||
* @param value Component specific code indicating the cause of the event.
|
||||
* @param mode optional definition of how the event should be processed after construction.
|
||||
*/
|
||||
//% weight=21 blockGap=12 blockId="control_raise_event"
|
||||
//% block="raise event|from %src|with value %value" blockExternalInputs=1 shim=control::raiseEvent
|
||||
function raiseEvent(src: int32, value: int32): void;
|
||||
|
||||
/**
|
||||
* Allocates the next user notification event
|
||||
*/
|
||||
//% help=control/allocate-notify-event shim=control::allocateNotifyEvent
|
||||
function allocateNotifyEvent(): int32;
|
||||
|
||||
/** Write data to DMESG debugging buffer. */
|
||||
//% shim=control::dmesg
|
||||
function dmesg(s: string): void;
|
||||
}
|
||||
declare namespace serial {
|
||||
|
||||
/** Send DMESG debug buffer over serial. */
|
||||
//% shim=serial::writeDmesg
|
||||
function writeDmesg(): void;
|
||||
}
|
||||
declare namespace screen {
|
||||
|
||||
/** Decompresses a 1-bit gray scale PNG image to image format. */
|
||||
//% shim=screen::unpackPNG
|
||||
function unpackPNG(png: Buffer): Image;
|
||||
}
|
||||
declare namespace screen {
|
||||
|
||||
/** Clear screen and reset font to normal. */
|
||||
//% shim=screen::clear
|
||||
function clear(): void;
|
||||
|
||||
/** Makes an image bound to a buffer. */
|
||||
//% shim=screen::imageOf
|
||||
function imageOf(buf: Buffer): Image;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//% fixedInstances
|
||||
declare interface Image {
|
||||
/** Returns the underlaying Buffer object. */
|
||||
//% property shim=ImageMethods::buffer
|
||||
buffer: Buffer;
|
||||
|
||||
/** Returns the width of an image. */
|
||||
//% property shim=ImageMethods::width
|
||||
width: int32;
|
||||
|
||||
/** Returns the height of an image. */
|
||||
//% property shim=ImageMethods::height
|
||||
height: int32;
|
||||
|
||||
/** Double size of an image. */
|
||||
//% shim=ImageMethods::doubled
|
||||
doubled(): Image;
|
||||
|
||||
/** Draw an image on the screen. */
|
||||
//% shim=ImageMethods::draw
|
||||
draw(x: int32, y: int32, mode: Draw): void;
|
||||
}
|
||||
declare namespace output {
|
||||
|
||||
/**
|
||||
* Create a new zero-initialized buffer.
|
||||
* @param size number of bytes in the buffer
|
||||
*/
|
||||
//% shim=output::createBuffer
|
||||
function createBuffer(size: int32): Buffer;
|
||||
}
|
||||
declare namespace motors {
|
||||
|
||||
/**
|
||||
* Mark a motor as used
|
||||
*/
|
||||
//% shim=motors::__motorUsed
|
||||
function __motorUsed(port: int32, large: boolean): void;
|
||||
}
|
||||
declare namespace sensors {
|
||||
|
||||
/**
|
||||
* Mark a sensor as used
|
||||
*/
|
||||
//% shim=sensors::__sensorUsed
|
||||
function __sensorUsed(port: int32, type: int32): void;
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
@ -6,25 +6,25 @@ brick.setLight(BrickLight.Orange)
|
||||
|
||||
brick.heart.doubled().draw(100, 50, Draw.Double | Draw.Transparent)
|
||||
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
|
||||
screen.clear()
|
||||
})
|
||||
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonLeft.onEvent(ButtonEvent.Bumped, () => {
|
||||
brick.drawRect(10, 70, 20, 10, Draw.Fill)
|
||||
brick.setLight(BrickLight.Red)
|
||||
brick.setFont(brick.microbitFont())
|
||||
})
|
||||
|
||||
brick.buttonRight.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonRight.onEvent(ButtonEvent.Bumped, () => {
|
||||
brick.print("Right!", 10, 60)
|
||||
})
|
||||
|
||||
brick.buttonDown.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonDown.onEvent(ButtonEvent.Bumped, () => {
|
||||
brick.print("Down! ", 10, 60)
|
||||
})
|
||||
|
||||
brick.buttonUp.onEvent(ButtonEvent.Click, () => {
|
||||
brick.buttonUp.onEvent(ButtonEvent.Bumped, () => {
|
||||
brick.print("Up! ", 10, 60)
|
||||
})
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Datalog
|
||||
|
||||
A tiny libraty to create CSV datalog files.
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"datalog.addRow": "Starts a row of data",
|
||||
"datalog.addValue": "Adds a cell to the row of data",
|
||||
"datalog.addValue|param|name": "name of the cell, eg: \"x\"",
|
||||
"datalog.addValue|param|value": "value of the cell, eg: 0",
|
||||
"datalog.flush": "Commits any buffered row to disk",
|
||||
"datalog.setEnabled": "Turns on or off datalogging",
|
||||
"datalog.setFile": "Starts a new data logger for the given file",
|
||||
"datalog.setFile|param|filename": "the filename, eg: \"datalog.csv\"",
|
||||
"datalog.setStorage": "* @param storage custom storage solution"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"datalog.addRow|block": "datalog add row",
|
||||
"datalog.addValue|block": "datalog add %name|=%value",
|
||||
"datalog.setEnabled|block": "datalog %enabled",
|
||||
"datalog|block": "datalog",
|
||||
"{id:category}Datalog": "Datalog"
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
//% weight=100 color=#0fbc11 icon=""
|
||||
namespace datalog {
|
||||
let _headers: string[] = undefined;
|
||||
let _headersLength: number;
|
||||
let _values: number[];
|
||||
let _buffer: string = "";
|
||||
let _start: number;
|
||||
let _filename = "datalog.csv";
|
||||
let _storage: storage.Storage = storage.temporary;
|
||||
let _enabled = true;
|
||||
|
||||
function clear() {
|
||||
_headers = undefined;
|
||||
_values = undefined;
|
||||
_buffer = "";
|
||||
}
|
||||
|
||||
function init() {
|
||||
if (!_headers) {
|
||||
_headers = [];
|
||||
_headersLength = 0;
|
||||
_start = control.millis();
|
||||
_storage.remove(_filename);
|
||||
}
|
||||
_values = [];
|
||||
}
|
||||
|
||||
function commit() {
|
||||
// write row if any data
|
||||
if (_values && _values.length > 0) {
|
||||
// write headers for the first row
|
||||
if (!_headersLength) {
|
||||
_storage.appendCSVHeaders(_filename, _headers);
|
||||
_headersLength = _storage.size(_filename);
|
||||
}
|
||||
// commit row data
|
||||
_buffer += storage.toCSV(_values, _storage.csvSeparator);
|
||||
// buffered writes
|
||||
if (_buffer.length > 1024)
|
||||
flush();
|
||||
}
|
||||
|
||||
// clear values
|
||||
_values = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts a row of data
|
||||
*/
|
||||
//% weight=100
|
||||
//% blockId=datalogAddRow block="datalog add row"
|
||||
export function addRow(): void {
|
||||
if (!_enabled) return;
|
||||
|
||||
commit();
|
||||
init();
|
||||
const s = (control.millis() - _start) / 1000;
|
||||
addValue("time (s)", s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a cell to the row of data
|
||||
* @param name name of the cell, eg: "x"
|
||||
* @param value value of the cell, eg: 0
|
||||
*/
|
||||
//% weight=99
|
||||
//% blockId=datalogAddValue block="datalog add %name|=%value"
|
||||
export function addValue(name: string, value: number) {
|
||||
if (!_values) return;
|
||||
let i = _headers.indexOf(name);
|
||||
if (i < 0) {
|
||||
_headers.push(name);
|
||||
i = _headers.length - 1;
|
||||
}
|
||||
_values[i] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts a new data logger for the given file
|
||||
* @param filename the filename, eg: "datalog.csv"
|
||||
*/
|
||||
//%
|
||||
export function setFile(filename: string) {
|
||||
flush();
|
||||
_filename = filename;
|
||||
clear();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param storage custom storage solution
|
||||
*/
|
||||
//%
|
||||
export function setStorage(storage: storage.Storage) {
|
||||
flush();
|
||||
_storage = storage;
|
||||
clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Commits any buffered row to disk
|
||||
*/
|
||||
//%
|
||||
export function flush() {
|
||||
if (_buffer) {
|
||||
const b = _buffer;
|
||||
_buffer = "";
|
||||
_storage.append(_filename, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on or off datalogging
|
||||
* @param enabled
|
||||
*/
|
||||
//% blockId=datalogEnabled block="datalog %enabled"
|
||||
//% enabled.fieldEditor=fieldonoff
|
||||
export function setEnabled(enabled: boolean) {
|
||||
flush();
|
||||
_enabled = enabled;
|
||||
}
|
||||
}
|
@ -1,16 +1,7 @@
|
||||
{
|
||||
"name": "datalog",
|
||||
"description": "Tiny data logging framework",
|
||||
"files": [
|
||||
"README.md",
|
||||
"datalog.ts"
|
||||
],
|
||||
"testFiles": [
|
||||
"test.ts"
|
||||
],
|
||||
"public": true,
|
||||
"additionalFilePath": "../../node_modules/pxt-common-packages/libs/datalog",
|
||||
"dependencies": {
|
||||
"core": "file:../core",
|
||||
"storage": "file:../storage"
|
||||
"core": "file:../core",
|
||||
"storage": "file:../storage"
|
||||
}
|
||||
}
|
57
libs/datalog/targetoverrides.ts
Normal file
@ -0,0 +1,57 @@
|
||||
namespace datalog.ev3 {
|
||||
/**
|
||||
* A datalog storage for the EV3
|
||||
*/
|
||||
export class EV3DatalogStorage extends DatalogStorage {
|
||||
private _filename: string;
|
||||
private _buffer: string;
|
||||
private _storage: storage.Storage;
|
||||
|
||||
/**
|
||||
* Creates a new storage for the datalog
|
||||
* @param storage
|
||||
* @param filename
|
||||
*/
|
||||
constructor(storage: storage.Storage, filename: string) {
|
||||
super();
|
||||
this._filename = filename;
|
||||
this._storage = storage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the storage
|
||||
*/
|
||||
init(): void {
|
||||
this._storage.remove(this._filename);
|
||||
this._buffer = "";
|
||||
}
|
||||
/**
|
||||
* Appends the headers in datalog
|
||||
*/
|
||||
appendHeaders(headers: string[]): void {
|
||||
this._storage.appendCSVHeaders(this._filename, headers);
|
||||
}
|
||||
/**
|
||||
* Appends a row of data
|
||||
*/
|
||||
appendRow(values: number[]): void {
|
||||
// commit row data
|
||||
this._buffer += storage.toCSV(values, this._storage.csvSeparator);
|
||||
// buffered writes
|
||||
if (this._buffer.length > 512)
|
||||
this.flush();
|
||||
}
|
||||
/**
|
||||
* Flushes any buffered data
|
||||
*/
|
||||
flush(): void {
|
||||
if (this._buffer) {
|
||||
const b = this._buffer;
|
||||
this._buffer = "";
|
||||
this._storage.append(this._filename, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
// automatic hook up
|
||||
datalog.setStorage(new datalog.ev3.EV3DatalogStorage(storage.temporary, "datalog.csv"));
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
|
||||
loops.forever(function () {
|
||||
datalog.addRow()
|
||||
datalog.addValue("x", Math.random())
|
||||
datalog.addValue("y", Math.random())
|
||||
})
|
@ -1 +0,0 @@
|
||||
{}
|
@ -1 +0,0 @@
|
||||
{}
|
@ -9,7 +9,6 @@ namespace brick {
|
||||
//% color="#C8509B" weight=95 icon="\uf10f"
|
||||
//% labelLineWidth=0
|
||||
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Threshold"]'
|
||||
//% groupIcons='["\uf101","\uf103","\uf102","","","\uf104"]'
|
||||
namespace sensors {
|
||||
}
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"sensors.GyroSensor.angle": "Get the current angle from the gyroscope.",
|
||||
"sensors.GyroSensor.drift": "Gets the computed rate drift",
|
||||
"sensors.GyroSensor.rate": "Get the current rotation rate from the gyroscope.",
|
||||
"sensors.GyroSensor.reset": "Forces a calibration of the gyro. Must be called when the sensor is completely still.",
|
||||
"sensors.GyroSensor.setDriftCorrection": "Enables or disable drift correction"
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"sensors.GyroSensor.angle|block": "%sensor|angle",
|
||||
"sensors.GyroSensor.rate|block": "%sensor|rate",
|
||||
"sensors.GyroSensor.reset|block": "%sensor|reset",
|
||||
"sensors.gyro1|block": "gyro 1",
|
||||
"sensors.gyro2|block": "gyro 2",
|
||||
"sensors.gyro3|block": "gyro 3",
|
||||
"sensors.gyro4|block": "gyro 4",
|
||||
"{id:category}Sensors": "Sensors",
|
||||
"{id:group}Gyro Sensor": "Gyro Sensor"
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"sensors.InfraredSensor.onEvent": "Registers code to run when an object is getting near.",
|
||||
"sensors.InfraredSensor.onEvent|param|handler": "the code to run when detected",
|
||||
"sensors.InfraredSensor.pauseUntil": "Waits for the event to occur",
|
||||
"sensors.InfraredSensor.proximity": "Get the promixity measured by the infrared sensor, from ``0`` (close) to ``100`` (far)",
|
||||
"sensors.InfraredSensor.remoteCommand": "Get the remote commandreceived the infrared sensor.",
|
||||
"sensors.InfraredSensor.setThreshold": "Sets a threshold value",
|
||||
"sensors.InfraredSensor.setThreshold|param|condition": "the dark or bright light condition",
|
||||
"sensors.InfraredSensor.setThreshold|param|value": "the value threshold",
|
||||
"sensors.RemoteInfraredBeaconButton.isPressed": "Check if a remote button is currently pressed or not.",
|
||||
"sensors.RemoteInfraredBeaconButton.onEvent": "Do something when a button or sensor is clicked, up or down",
|
||||
"sensors.RemoteInfraredBeaconButton.onEvent|param|body": "code to run when the event is raised",
|
||||
"sensors.RemoteInfraredBeaconButton.wasPressed": "See if the remote button was pressed again since the last time you checked.",
|
||||
"sensors.remoteButtonBottomLeft": "Remote bottom-left button.",
|
||||
"sensors.remoteButtonBottomRight": "Remote bottom-right button.",
|
||||
"sensors.remoteButtonCenter": "Remote beacon (center) button.",
|
||||
"sensors.remoteButtonTopLeft": "Remote top-left button.",
|
||||
"sensors.remoteButtonTopRight": "Remote top-right button."
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
"InfraredSensorEvent.ObjectDetected|block": "object detected",
|
||||
"InfraredSensorEvent.ObjectNear|block": "object near",
|
||||
"sensors.InfraredSensor.onEvent|block": "on %sensor|%event",
|
||||
"sensors.InfraredSensor.pauseUntil|block": "pause until %sensor| %event",
|
||||
"sensors.InfraredSensor.proximity|block": "%sensor|proximity",
|
||||
"sensors.InfraredSensor.remoteCommand|block": "%sensor|remote command",
|
||||
"sensors.InfraredSensor.setThreshold|block": "set %sensor|%condition|to %value",
|
||||
"sensors.RemoteInfraredBeaconButton.isPressed|block": "%button|is pressed",
|
||||
"sensors.RemoteInfraredBeaconButton.onEvent|block": "on %button|%event",
|
||||
"sensors.RemoteInfraredBeaconButton.wasPressed|block": "%button|was pressed",
|
||||
"sensors.infraredSensor1|block": "infrared 1",
|
||||
"sensors.infraredSensor2|block": "infrared 2",
|
||||
"sensors.infraredSensor3|block": "infrared 3",
|
||||
"sensors.infraredSensor4|block": "infrared 4",
|
||||
"sensors.remoteButtonBottomLeft|block": "bottom-left",
|
||||
"sensors.remoteButtonBottomRight|block": "bottom-right",
|
||||
"sensors.remoteButtonCenter|block": "center",
|
||||
"sensors.remoteButtonTopLeft|block": "top-left",
|
||||
"sensors.remoteButtonTopRight|block": "top-right",
|
||||
"sensors|block": "sensors",
|
||||
"{id:category}Sensors": "Sensors",
|
||||
"{id:group}Infrared Sensor": "Infrared Sensor",
|
||||
"{id:group}Remote Infrared Beacon": "Remote Infrared Beacon",
|
||||
"{id:group}Threshold": "Threshold"
|
||||
}
|
@ -258,7 +258,7 @@ namespace sensors {
|
||||
* @param value the value threshold
|
||||
*/
|
||||
//% blockId=irSetThreshold block="set %sensor|%condition|to %value"
|
||||
//% group="Threshold" blockGap=8
|
||||
//% group="Threshold" blockGap=8 weight=49
|
||||
//% value.min=0 value.max=100
|
||||
setThreshold(condition: InfraredSensorEvent, value: number) {
|
||||
if (condition == InfraredSensorEvent.ObjectNear)
|
||||
@ -266,6 +266,17 @@ namespace sensors {
|
||||
else
|
||||
this.proximityThreshold.setHighThreshold(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the threshold value
|
||||
* @param condition the proximity condition
|
||||
*/
|
||||
//% blockId=irGetThreshold block="%sensor|%condition"
|
||||
//% group="Threshold" blockGap=8 weight=49
|
||||
//% sensor.fieldEditor="ports"
|
||||
threshold(condition: InfraredSensorEvent): number {
|
||||
return this.proximityThreshold.threshold(<ThresholdState><number>LightCondition.Dark);
|
||||
}
|
||||
}
|
||||
|
||||
//% fixedInstance whenUsed block="infrared 1" jres=icons.port1
|
||||
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"brick.Mood": "A mood",
|
||||
"brick.Mood.show": "Shows the mood on the EV3",
|
||||
"brick.showMood": "Shows a mood",
|
||||
"moods.angry": "An angry mood",
|
||||
"moods.awake": "A awake mood",
|
||||
"moods.dizzy": "A dizzy mood",
|
||||
"moods.knockedOut": "A knocked out mood",
|
||||
"moods.love": "In love mood",
|
||||
"moods.middleLeft": "Looking around left",
|
||||
"moods.middleRight": "Looking around right",
|
||||
"moods.neutral": "In a neutral mood",
|
||||
"moods.sad": "A sad mood",
|
||||
"moods.sleeping": "A sleeping mood",
|
||||
"moods.tired": "A tired mood",
|
||||
"moods.winking": "In laughing mood"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"brick.showMood|block": "show mood %mood=mood_image_picker",
|
||||
"brick|block": "brick",
|
||||
"moods|block": "moods",
|
||||
"{id:category}Brick": "Brick",
|
||||
"{id:category}Moods": "Moods",
|
||||
"{id:group}Screen": "Screen"
|
||||
}
|
37
libs/mood/docs/reference/brick/show-mood.md
Normal file
@ -0,0 +1,37 @@
|
||||
# show Mood
|
||||
|
||||
Show a mood on the brick. A mood will have a image on the display along with a sound and solid or flashing light.
|
||||
|
||||
```sig
|
||||
brick.showMood(moods.sleeping)
|
||||
```
|
||||
You can choose one of several moods to show on the display. Use a mood to help show what your @boardname@ is doing at the moment.
|
||||
|
||||
## Parameters
|
||||
|
||||
**mood**: A mood to show on the brick. Choose one of these moods:
|
||||
>* ``sleeping``
|
||||
* ``awake``
|
||||
* ``tired``
|
||||
* ``angry``
|
||||
* ``sad``
|
||||
* ``dizzy``
|
||||
* ``knockedOut``
|
||||
* ``middleLeft``
|
||||
* ``middleRight``
|
||||
* ``love``
|
||||
* ``winking``
|
||||
* ``neutral``
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
Show a ``winking`` mood on the brick.
|
||||
|
||||
```blocks
|
||||
brick.showMood(moods.winking)
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[show image](/reference/brick/show-image)
|
@ -1,9 +1,10 @@
|
||||
namespace brick {
|
||||
/**
|
||||
* Shows a mood
|
||||
* Show a mood on the brick's screen
|
||||
*/
|
||||
//% weight=90
|
||||
//% blockId=moodShow block="show mood %mood=mood_image_picker"
|
||||
//% help=brick/show-mood
|
||||
//% weight=101 group="Screen" blockGap=8
|
||||
export function showMood(mood: Mood) {
|
||||
if(mood)
|
||||
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"Sound.buffer": "Returns the underlaying Buffer object.",
|
||||
"Sound.play": "Play sound.",
|
||||
"music": "Generation of music tones.",
|
||||
"music.beat": "Return the duration of a beat in milliseconds (the beat fraction).",
|
||||
"music.beat|param|fraction": "the fraction of the current whole note, eg: BeatFraction.Half",
|
||||
"music.changeTempoBy": "Change the tempo up or down by some amount of beats per minute (bpm).",
|
||||
"music.changeTempoBy|param|bpm": "The change in beats per minute to the tempo, eg: 20",
|
||||
"music.fromWAV": "Makes a sound bound to a buffer in WAV format.",
|
||||
"music.noteFrequency": "Get the frequency of a note.",
|
||||
"music.noteFrequency|param|name": "the note name, eg: Note.C",
|
||||
"music.playSoundEffect": "Start playing a sound and don't wait for it to finish.",
|
||||
"music.playSoundEffectUntilDone": "Plays a sound",
|
||||
"music.playSoundEffectUntilDone|param|sound": "the sound to play",
|
||||
"music.playSoundEffect|param|sound": "the sound to play",
|
||||
"music.playTone": "Play a tone through the speaker for some amount of time.",
|
||||
"music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
|
||||
"music.playTone|param|ms": "tone duration in milliseconds (ms)",
|
||||
"music.rest": "Rest, or play silence, for some time (in milleseconds).",
|
||||
"music.rest|param|ms": "rest duration in milliseconds (ms), eg: 100",
|
||||
"music.ringTone": "Play a tone.",
|
||||
"music.ringTone|param|frequency": "pitch of the tone to play in Hertz (Hz), eg: Note.C",
|
||||
"music.setTempo": "Set the tempo a number of beats per minute (bpm).",
|
||||
"music.setTempo|param|bpm": "The new tempo in beats per minute, eg: 120",
|
||||
"music.setVolume": "Set the output volume of the sound synthesizer.",
|
||||
"music.setVolume|param|volume": "the volume 0...100, eg: 50",
|
||||
"music.stopAllSounds": "Play a tone through the speaker for some amount of time.",
|
||||
"music.tempo": "Return the tempo in beats per minute (bpm).\nTempo is the speed (bpm = beats per minute) at which notes play. The larger the tempo value, the faster the notes will play."
|
||||
}
|
@ -1,166 +0,0 @@
|
||||
{
|
||||
"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",
|
||||
"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#",
|
||||
"SoundOutputDestination.Pin|block": "pin",
|
||||
"SoundOutputDestination.Speaker|block": "speaker",
|
||||
"music.beat|block": "%fraction|beat",
|
||||
"music.changeTempoBy|block": "change tempo by %value|(bpm)",
|
||||
"music.noteFrequency|block": "%note",
|
||||
"music.playSoundEffectUntilDone|block": "play sound effect %sound|until done",
|
||||
"music.playSoundEffect|block": "play sound effect %sound",
|
||||
"music.playTone|block": "play tone|at %note=device_note|for %duration=device_beat",
|
||||
"music.rest|block": "rest|for %duration=device_beat",
|
||||
"music.ringTone|block": "ring tone|at %note=device_note",
|
||||
"music.setTempo|block": "set tempo to %value|(bpm)",
|
||||
"music.setVolume|block": "set volume %volume",
|
||||
"music.stopAllSounds|block": "stop all sounds",
|
||||
"music.tempo|block": "tempo (bpm)",
|
||||
"music|block": "music",
|
||||
"sounds.animalsCatPurr|block": "animals cat purr",
|
||||
"sounds.animalsDogBark1|block": "animals dog bark 1",
|
||||
"sounds.animalsDogBark2|block": "animals dog bark 2",
|
||||
"sounds.animalsDogGrowl|block": "animals dog growl",
|
||||
"sounds.animalsDogSniff|block": "animals dog sniff",
|
||||
"sounds.animalsDogWhine|block": "animals dog whine",
|
||||
"sounds.animalsElephantCall|block": "animals elephant call",
|
||||
"sounds.animalsInsectBuzz1|block": "animals insect buzz1",
|
||||
"sounds.animalsInsectBuzz2|block": "animals insect buzz2",
|
||||
"sounds.animalsInsectChirp|block": "animals insect chirp",
|
||||
"sounds.animalsSnakeHiss|block": "animals snake hiss",
|
||||
"sounds.animalsSnakeRattle|block": "animals snake rattle",
|
||||
"sounds.animalsTRexRoar|block": "animals trex roar",
|
||||
"sounds.colorsBlack|block": "colors black",
|
||||
"sounds.colorsBlue|block": "colors blue",
|
||||
"sounds.colorsBrown|block": "colors brown",
|
||||
"sounds.colorsGreen|block": "colors green",
|
||||
"sounds.colorsRed|block": "colors red",
|
||||
"sounds.colorsWhite|block": "colors white",
|
||||
"sounds.colorsYellow|block": "colors yellow",
|
||||
"sounds.communicationBravo|block": "communication bravo",
|
||||
"sounds.communicationEv3|block": "communication ev3",
|
||||
"sounds.communicationFantastic|block": "communication fantastic",
|
||||
"sounds.communicationGameOver|block": "communication game over",
|
||||
"sounds.communicationGoodJob|block": "communicationGoodJob",
|
||||
"sounds.communicationGoodbye|block": "communication goodbye",
|
||||
"sounds.communicationGood|block": "communication good",
|
||||
"sounds.communicationGo|block": "communication go",
|
||||
"sounds.communicationHello|block": "communication hello",
|
||||
"sounds.communicationHi|block": "communication hi",
|
||||
"sounds.communicationLego|block": "communication lego",
|
||||
"sounds.communicationMindstorms|block": "communication mindstorms",
|
||||
"sounds.communicationMorning|block": "communication morning",
|
||||
"sounds.communicationNo|block": "communication no",
|
||||
"sounds.communicationOkay|block": "communication okay",
|
||||
"sounds.communicationOkeyDokey|block": "communication okey dokey",
|
||||
"sounds.communicationSorry|block": "communication sorry",
|
||||
"sounds.communicationThankYou|block": "communication thank you",
|
||||
"sounds.communicationYes|block": "communication yes",
|
||||
"sounds.expressionsBoing|block": "expressions boing",
|
||||
"sounds.expressionsBoo|block": "expressions boo",
|
||||
"sounds.expressionsCheering|block": "expressions cheering",
|
||||
"sounds.expressionsCrunching|block": "expressions crunching",
|
||||
"sounds.expressionsCrying|block": "expressions crying",
|
||||
"sounds.expressionsFanfare|block": "expressions fanfare",
|
||||
"sounds.expressionsKungFu|block": "expressions kung fu",
|
||||
"sounds.expressionsLaughing1|block": "expressions laughing1",
|
||||
"sounds.expressionsLaughing2|block": "expressions laughing2",
|
||||
"sounds.expressionsMagicWand|block": "expressions magic wand",
|
||||
"sounds.expressionsOuch|block": "expressions ouch",
|
||||
"sounds.expressionsShouting|block": "expressions shouting",
|
||||
"sounds.expressionsSmack|block": "expressions smack",
|
||||
"sounds.expressionsSneezing|block": "expressions sneezing",
|
||||
"sounds.expressionsSnoring|block": "expressions snoring",
|
||||
"sounds.expressionsUhOh|block": "expressions uh oh",
|
||||
"sounds.informationActivate|block": "information activate",
|
||||
"sounds.informationAnalyze|block": "information analyze",
|
||||
"sounds.informationBackwards|block": "information backwards",
|
||||
"sounds.informationColor|block": "information color",
|
||||
"sounds.informationDetected|block": "information detected",
|
||||
"sounds.informationDown|block": "information down",
|
||||
"sounds.informationErrorAlarm|block": "information error alarm",
|
||||
"sounds.informationError|block": "information error",
|
||||
"sounds.informationFlashing|block": "information flashing",
|
||||
"sounds.informationForward|block": "information forward",
|
||||
"sounds.informationLeft|block": "information left",
|
||||
"sounds.informationObject|block": "information object",
|
||||
"sounds.informationRight|block": "information right",
|
||||
"sounds.informationSearching|block": "information searching",
|
||||
"sounds.informationStart|block": "information start",
|
||||
"sounds.informationStop|block": "information stop",
|
||||
"sounds.informationTouch|block": "information touch",
|
||||
"sounds.informationTurn|block": "information turn",
|
||||
"sounds.informationUp|block": "information up",
|
||||
"sounds.mechanicalAirRelease|block": "mechanical air release",
|
||||
"sounds.mechanicalAirbrake|block": "mechanical airbrake",
|
||||
"sounds.mechanicalBackingAlert|block": "mechanical backing alert",
|
||||
"sounds.mechanicalBlip1|block": "mechanical blip1",
|
||||
"sounds.mechanicalBlip2|block": "mechanical blip2",
|
||||
"sounds.mechanicalBlip3|block": "mechanical blip3",
|
||||
"sounds.mechanicalBlip4|block": "mechanical blip4",
|
||||
"sounds.mechanicalHorn1|block": "mechanical horn1",
|
||||
"sounds.mechanicalHorn2|block": "mechanical horn2",
|
||||
"sounds.mechanicalLaser|block": "mechanical laser",
|
||||
"sounds.mechanicalMotorIdle|block": "mechanical motor idle",
|
||||
"sounds.mechanicalMotorStart|block": "mechanical motor start",
|
||||
"sounds.mechanicalMotorStop|block": "mechanical motor stop",
|
||||
"sounds.mechanicalRatchet|block": "mechanical ratchet",
|
||||
"sounds.mechanicalSonar|block": "mechanical sonar",
|
||||
"sounds.mechanicalTickTack|block": "mechanical tick tack",
|
||||
"sounds.mechanicalWalk|block": "mechanical walk",
|
||||
"sounds.movementsArm1|block": "movements arm1",
|
||||
"sounds.movementsArm2|block": "movements arm2",
|
||||
"sounds.movementsArm3|block": "movements arm3",
|
||||
"sounds.movementsArm4|block": "movements arm4",
|
||||
"sounds.movementsDropLoad|block": "movements drop load",
|
||||
"sounds.movementsLiftLoad|block": "movements lift load",
|
||||
"sounds.movementsServo1|block": "movements servo1",
|
||||
"sounds.movementsServo2|block": "movements servo2",
|
||||
"sounds.movementsServo3|block": "movements servo3",
|
||||
"sounds.movementsServo4|block": "movements servo4",
|
||||
"sounds.movementsSlideLoad|block": "movements slide load",
|
||||
"sounds.movementsSnap|block": "movements snap",
|
||||
"sounds.movementsSpeedDown|block": "movements speed down",
|
||||
"sounds.movementsSpeedIdle|block": "movements speed idle",
|
||||
"sounds.movementsSpeedUp|block": "movements speed up",
|
||||
"sounds.movementsSpeeding|block": "movements speeding",
|
||||
"sounds.numbersEight|block": "numbers eight",
|
||||
"sounds.numbersFive|block": "numbers five",
|
||||
"sounds.numbersFour|block": "numbers four",
|
||||
"sounds.numbersNine|block": "numbers nine",
|
||||
"sounds.numbersOne|block": "numbers one",
|
||||
"sounds.numbersSeven|block": "numbers seven",
|
||||
"sounds.numbersSix|block": "numbers six",
|
||||
"sounds.numbersTen|block": "numbers ten",
|
||||
"sounds.numbersThree|block": "numbers three",
|
||||
"sounds.numbersTwo|block": "numbers two",
|
||||
"sounds.numbersZero|block": "numbers zero",
|
||||
"sounds.systemClick|block": "system click",
|
||||
"sounds.systemConfirm|block": "system confirm",
|
||||
"sounds.systemConnect|block": "system connect",
|
||||
"sounds.systemDownload|block": "system download",
|
||||
"sounds.systemGeneralAlert|block": "system general alert",
|
||||
"sounds.systemOverpower|block": "system overpower",
|
||||
"sounds.systemPowerDown|block": "system power down",
|
||||
"sounds.systemReady|block": "system ready",
|
||||
"sounds.systemStartUp|block": "system start up",
|
||||
"{id:category}Music": "Music",
|
||||
"{id:category}Sound": "Sound",
|
||||
"{id:category}Sounds": "Sounds"
|
||||
}
|
56
libs/music/shims.d.ts
vendored
@ -1,56 +0,0 @@
|
||||
// Auto-generated. Do not edit.
|
||||
declare namespace music {
|
||||
|
||||
/**
|
||||
* Set the output volume of the sound synthesizer.
|
||||
* @param volume the volume 0...100, eg: 50
|
||||
*/
|
||||
//% weight=96
|
||||
//% blockId=synth_set_volume block="set volume %volume"
|
||||
//% parts="speaker" blockGap=8
|
||||
//% volume.min=0 volume.max=100
|
||||
//% help=music/set-volume
|
||||
//% weight=1 shim=music::setVolume
|
||||
function setVolume(volume: int32): void;
|
||||
|
||||
/**
|
||||
* Play a tone through the speaker for some amount of time.
|
||||
* @param frequency pitch of the tone to play in Hertz (Hz)
|
||||
* @param ms tone duration in milliseconds (ms)
|
||||
*/
|
||||
//% help=music/play-tone
|
||||
//% blockId=music_play_note block="play tone|at %note=device_note|for %duration=device_beat"
|
||||
//% parts="headphone" async
|
||||
//% blockNamespace=music
|
||||
//% weight=76 blockGap=8 shim=music::playTone
|
||||
function playTone(frequency: int32, ms: int32): void;
|
||||
|
||||
/**
|
||||
* Play a tone through the speaker for some amount of time.
|
||||
*/
|
||||
//% help=music/stop-all-sounds
|
||||
//% blockId=music_stop_all_sounds block="stop all sounds"
|
||||
//% parts="headphone"
|
||||
//% blockNamespace=music
|
||||
//% weight=97 shim=music::stopAllSounds
|
||||
function stopAllSounds(): void;
|
||||
|
||||
/** Makes a sound bound to a buffer in WAV format. */
|
||||
//% shim=music::fromWAV
|
||||
function fromWAV(buf: Buffer): Sound;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//% fixedInstances
|
||||
declare interface Sound {
|
||||
/** Returns the underlaying Buffer object. */
|
||||
//% property shim=SoundMethods::buffer
|
||||
buffer: Buffer;
|
||||
|
||||
/** Play sound. */
|
||||
//% promise shim=SoundMethods::play
|
||||
play(): void;
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|