Compare commits
59 Commits
Author | SHA1 | Date | |
---|---|---|---|
3f626105cd | |||
d9ff9c4800 | |||
31998fec05 | |||
342aa3ca32 | |||
9b599b6242 | |||
e5e63c548f | |||
f3eb9a988f | |||
e7e2ff7752 | |||
f10ac93268 | |||
47f46553e0 | |||
3158e95cde | |||
854029fe33 | |||
1b379bddd0 | |||
9495da9a53 | |||
128b3f2f51 | |||
a331a017b8 | |||
790b9f557a | |||
0b469f69b6 | |||
5cce86ec7e | |||
65e01dc0df | |||
1a3c31c9f3 | |||
7aeb216462 | |||
543659b0e8 | |||
a2b5ff68af | |||
b968d3b1de | |||
4dbebe3e15 | |||
3b95fede48 | |||
5d4bd77bf4 | |||
c83d7e9f07 | |||
971faed80a | |||
02a58caf7a | |||
912e2e6159 | |||
efee05c7f5 | |||
cc9ab86181 | |||
e834ae0656 | |||
175923fcb9 | |||
42ebdde3df | |||
20c63359af | |||
841f3dc7d6 | |||
f7377f6a21 | |||
1104ab5b33 | |||
e2fe660012 | |||
7d4b800637 | |||
ef8d7185ee | |||
b0392da8b1 | |||
c817f9e3ff | |||
746728759d | |||
3d3b9e2718 | |||
0459cd693d | |||
9c43714126 | |||
9bf7459628 | |||
b52432e103 | |||
3ac0a060dd | |||
5f78f98f94 | |||
395b6184b9 | |||
3274964a11 | |||
f5e8b35df4 | |||
996073728c | |||
1e964ba1ea |
4
.gitignore
vendored
@ -24,3 +24,7 @@ clients/electron/projects
|
||||
*.db
|
||||
*.suo
|
||||
*.log
|
||||
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
|
22
cmds/cmds.ts
@ -13,20 +13,20 @@ export function deployCoreAsync(res: ts.pxtc.CompileResult) {
|
||||
return getBitDrivesAsync()
|
||||
.then(drives => {
|
||||
if (drives.length == 0) {
|
||||
let msg = "cannot find any drives to deploy to";
|
||||
console.log(msg);
|
||||
return Promise.reject(new Error(msg));
|
||||
console.log("cannot find any drives to deploy to");
|
||||
return Promise.resolve(0);
|
||||
}
|
||||
|
||||
console.log(`copy ${ts.pxtc.BINARY_HEX} to ` + drives.join(", "))
|
||||
console.log(`copy ${ts.pxtc.BINARY_HEX} to ` + drives.join(", "));
|
||||
|
||||
return Promise.map(drives, d =>
|
||||
writeFileAsync(d + ts.pxtc.BINARY_HEX, res.outfiles[ts.pxtc.BINARY_HEX])
|
||||
.then(() => {
|
||||
console.log("wrote hex file to " + d)
|
||||
}))
|
||||
})
|
||||
.then(() => { })
|
||||
let writeHexFile = (filename: string) => {
|
||||
return writeFileAsync(filename + ts.pxtc.BINARY_HEX, res.outfiles[ts.pxtc.BINARY_HEX])
|
||||
.then(() => console.log("wrote hex file to " + filename));
|
||||
};
|
||||
|
||||
return Promise.map(drives, d => writeHexFile(d))
|
||||
.then(() => drives.length);
|
||||
});
|
||||
}
|
||||
|
||||
function getBitDrivesAsync(): Promise<string[]> {
|
||||
|
@ -1,11 +1,40 @@
|
||||
# crocodile clips
|
||||
|
||||
The large holes at the bottom of the board are designed to attach alligator/crocodile clips.
|
||||
Register an event that will execute whenever the user attaches one side of the crocodile clip to the `GND` pin, then connects and disconnects the unattached side of the crocodile clip to pin `0`, `1`, or `2`.
|
||||
The large holes at the bottom of the board are designed to attach alligator/crocodile clips
|
||||
to create electrical circuit with other components.
|
||||
|
||||
### Example: on pin pressed with random numbers
|
||||
# ~hint
|
||||
|
||||
This example displays a random number every time the crocodile clip holds `GND` then connects and disconnects the `P0` pin. Each time the crocodile clip is firmly connected and disconnected from pin `P0`, the micro:bit will return a random Number between 0 and the parameter limit
|
||||
**No crocodile clips!?!?!** Use wires or Aluminium foil! [Read more...](/device/foil-circuits)
|
||||
|
||||
# ~
|
||||
|
||||
|
||||
## Connecting Crocodile Clips
|
||||
|
||||
The hole for ``P0`` and ``GND`` allow to grab the board on the side which makes for a great grip.
|
||||
|
||||

|
||||
|
||||
Pass one jaw in the hole and grab the side of the board with the other jaw.
|
||||
|
||||

|
||||
|
||||
For the center holes, ``P1`` and ``P2``, you can also grab the bottom of the board but they are a bit harder to grip.
|
||||
|
||||
You can also grip the board between the jaws. In which case, you will want to make sure to avoid overlapping the jaws
|
||||
with the other pins as it will create short-circuit in the board.
|
||||
|
||||

|
||||
|
||||
Adding a little tape helps keeping the crocodile clips in place.
|
||||
|
||||

|
||||
|
||||
## Example: on pin pressed with random numbers
|
||||
|
||||
This example displays a random number every time the crocodile clip holds `GND` then connects and disconnects the `P0` pin.
|
||||
Each time the crocodile clip is firmly connected and disconnected from pin `P0`, the micro:bit will return a random Number between 0 and the parameter limit.
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
@ -13,11 +42,6 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
})
|
||||
```
|
||||
|
||||
### Connecting Crocodile Clips
|
||||
|
||||

|
||||
|
||||
### See also
|
||||
|
||||
[micro:bit pins](/device/pins), [pin is pressed](/reference/input/pin-is-pressed), [analog read pin](/reference/pins/analog-read-pin), [analog write pin](/reference/pins/analog-write-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)
|
||||
## See also
|
||||
|
||||
[micro:bit pins](/device/pins)
|
||||
|
@ -1,7 +1,5 @@
|
||||
# Error codes
|
||||
|
||||
The micro:bit error codes
|
||||
|
||||
Your micro:bit may encounter a situation that prevents it from running your code. When this happens, a frowny face will appear on your micro:bit screen (see picture) followed by an error number.
|
||||
|
||||
Below is a list of error numbers and what they mean:
|
||||
|
52
docs/device/foil-circuits.md
Normal file
@ -0,0 +1,52 @@
|
||||
# foil circuits
|
||||
|
||||
The large holes at the bottom of the board are designed to attach alligator/crocodile clips
|
||||
to create electrical circuit with other components.
|
||||
|
||||
If you do not have crocodile clips at hand, dyou can use wires or even Aluminium foil to acheive the same result.
|
||||
We will show you how to connect the micro:bit to headphones using Alumunium foil and tape.
|
||||
|
||||
https://youtu.be/mhXYyPuvpz0
|
||||
|
||||
### Materials
|
||||
|
||||
* micro:bit and battery pack (you can also power it via USB)
|
||||
* a small piece of cardboard
|
||||
* Aluminium foil
|
||||
* tape
|
||||
|
||||
### Assembly instructions
|
||||
|
||||
Tape the micro:bit and battery pack to the card board. Make sure to remove the batteries while you are building your circuit.
|
||||
|
||||

|
||||
|
||||
Cut the thinest strip of foil possible and roll it into a cable. You can also try to fold, whatever works for you.
|
||||
Build two of those wires.
|
||||
|
||||

|
||||
|
||||
Place the foil wire on the ``GND`` pin and attach with a piece of tape. Press hard to get the best connection between
|
||||
the foil and the pin board. Make sure the foil is not overlapping with the other pins!
|
||||
|
||||

|
||||
|
||||
Place the second wire on the ``P0`` pin the same way. Make sure the wire does not overlap with the other pins!
|
||||
|
||||

|
||||
|
||||
Tape the headphone jack connector to the cardboard and roll the wire coming from ``GND`` around the metal base.
|
||||
Make sure the wire does not touch the other metal rings on the jack.
|
||||
|
||||

|
||||
|
||||
Tape the second wire on the head of the jack connector.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
## See also
|
||||
|
||||
[micro:bit pins](/device/pins)
|
@ -7,11 +7,12 @@
|
||||
```sim
|
||||
basic.forever(() => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`
|
||||
);
|
||||
basic.pause(500);
|
||||
basic.clearScreen();
|
||||
basic.pause(500);
|
||||
@ -29,11 +30,12 @@ Use [show leds](/reference/basic/show-leds) and make your code look like this:
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`
|
||||
);
|
||||
```
|
||||
|
||||
## Step 2
|
||||
@ -42,11 +44,11 @@ Add a [pause](/reference/basic/pause) to wait and [clear screen](/reference/basi
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
basic.pause(500);
|
||||
basic.clearScreen();
|
||||
```
|
||||
@ -58,11 +60,12 @@ Put a [forever loop](/reference/basic/forever) around it.
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`
|
||||
);
|
||||
basic.pause(500);
|
||||
basic.clearScreen();
|
||||
})
|
||||
@ -75,11 +78,12 @@ Add a [pause](/reference/basic/pause) to wait after clearing the screen.
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`
|
||||
);
|
||||
basic.pause(500);
|
||||
basic.clearScreen();
|
||||
basic.pause(500);
|
||||
@ -94,20 +98,22 @@ Add a second image of a broken heart.
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`
|
||||
);
|
||||
basic.pause(500);
|
||||
basic.clearScreen();
|
||||
basic.pause(500);
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# . # # #
|
||||
# . . . #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
. # . # .
|
||||
# . # # #
|
||||
# . . . #
|
||||
. # # # .
|
||||
. . # . .`
|
||||
);
|
||||
basic.pause(500);
|
||||
basic.clearScreen();
|
||||
basic.pause(500);
|
||||
|
@ -24,6 +24,12 @@ Build your own music player micro:bit from headphones.
|
||||
* [Connect your headphone](/projects/hack-your-headphone/making)
|
||||
* [Play sounds!]()
|
||||
|
||||
# ~hint
|
||||
|
||||
**No crocodile clips!?!?!** Use wires or Aluminium foil! [Read more...](/device/foil-circuits)
|
||||
|
||||
# ~
|
||||
|
||||
### ~button /projects/hack-your-headphones/making
|
||||
|
||||
Let's get started!
|
||||
|
@ -6,6 +6,12 @@ Did you know you could attach your headhpones to the micro:bit to generate sound
|
||||
|
||||
### ~
|
||||
|
||||
# ~hint
|
||||
|
||||
**No crocodile clips!?!?!** Use wires or Aluminium foil! [Read more...](/device/foil-circuits)
|
||||
|
||||
# ~
|
||||
|
||||
### Step 1
|
||||
|
||||

|
||||
|
@ -10,11 +10,12 @@ Use [show leds](/reference/basic/show-leds) to make a smiley face:
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`);
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`
|
||||
);
|
||||
```
|
||||
|
||||
## Step 2
|
||||
@ -24,18 +25,20 @@ frowny face inside it:
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`);
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
. # # # .
|
||||
# . . . #`);
|
||||
# . . . #
|
||||
. # # # .`
|
||||
);
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
. # # # .
|
||||
# . . . #`
|
||||
);
|
||||
});
|
||||
```
|
||||
|
||||
@ -45,25 +48,28 @@ Now add blocks so that when [button B is pressed](/reference/input/button-is-pre
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`);
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
. # # # .
|
||||
# . . . #`);
|
||||
});
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`);
|
||||
. # # # .`
|
||||
);
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
. # # # .
|
||||
# . . . #`
|
||||
);
|
||||
});
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`
|
||||
);
|
||||
});
|
||||
```
|
||||
|
17
docs/static/Calliopeminieditor.svg
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="179.9" height="32.4" viewBox="0 0 179.9 32.4">
|
||||
<path fill="#495260" d="M33.1 11.2h-8.5V5.8c0-2.3 1.9-4.2 4.2-4.2 2.3 0 4.2 1.9 4.2 4.2v5.4z"/>
|
||||
<path fill="#7F96A1" d="M25.8 3.6H32v7.6h-6.2z"/>
|
||||
<path fill="#845B32" d="M12.2 7.2V18h12.5V7.2c0-3.4-2.8-6.2-6.2-6.2s-6.3 2.8-6.3 6.2z"/>
|
||||
<path fill="#26A7AA" d="M28.9 31.4H8.7c-6.3 0-9-8-4-11.8L16 11.2h17.1v16c0 2.3-1.9 4.2-4.2 4.2z"/>
|
||||
<path fill="#43C9C9" d="M15.2 17.7l-8.8.7 10.7-8"/>
|
||||
<path fill="#F6F4E7" d="M14.8 15.1l2.3-4.7 1.5 4.7m0 0l1.4-4.7 2.3 4.7"/>
|
||||
<path fill="#BDD1CF" d="M21.9 17.7h-6.7l-.4-2.6h7.5"/>
|
||||
<path fill="#F6F4E7" d="M26.8 31.4c-.6-4.6-1.9-10.2-4.8-13.7h-6.8c-3 3.5-4.2 9.1-4.8 13.7h16.4z"/>
|
||||
<path fill="#FFCD9A" d="M18.6 10.5c-1.4 0-2.6-1.2-2.6-2.6V5h5.1v2.9c0 1.5-1.1 2.6-2.5 2.6z"/>
|
||||
<path fill="#BDD1CF" d="M15.4 31.4V17.7c2.2 5.1 4.9 11.3 8.2 13.7h-8.2z"/>
|
||||
<path fill="#FFCD9A" d="M17.1 10.4l1.5 4.7 1.4-4.7"/>
|
||||
<path fill="#43C9C9" d="M25.8 11.2h7.3v9.4"/>
|
||||
<path fill="#BCD1CF" d="M52.3 15.1h-1.6l-.2-1.4c-.2-.2-.5-.4-.8-.5s-.7-.2-1.2-.2c-.9 0-1.7.3-2.2 1s-.8 1.6-.8 2.7v.4c0 1.1.3 2 .8 2.7.5.7 1.2 1 2.1 1 .4 0 .8-.1 1.2-.2.4-.1.6-.3.8-.5l.2-1.4h1.6v2.1c-.4.5-1 .9-1.7 1.2-.7.3-1.4.5-2.3.5-1.5 0-2.6-.5-3.6-1.5s-1.4-2.3-1.4-3.9v-.4c0-1.6.5-2.9 1.4-3.9s2.1-1.5 3.6-1.5c.8 0 1.6.2 2.3.5.7.3 1.2.7 1.7 1.2v2.1zm1.5 5.9l.8-.1 3.3-9.4h2.2l3.3 9.4.8.1v1.3h-3.7V21l.8-.1-.5-1.5h-3.5l-.5 1.5.8.1v1.3h-3.7V21zm3.9-3.2h2.5L59 14l-1.3 3.8zm7.8 4.5V21l1.2-.2V13l-1.2-.2v-1.3H70v1.3l-1.2.2v7.6h3.1l.1-1.4h1.7v3h-8.2zm9.5 0V21l1.2-.2V13l-1.2-.2v-1.3h4.6v1.3l-1.3.2v7.6h3.1l.1-1.4h1.7v3H75zm9.5-9.5v-1.3H89v1.3l-1.1.2v7.8l1.1.2v1.3h-4.5V21l1.2-.2V13l-1.2-.2zm15.9 4.2c0 1.6-.5 2.9-1.4 3.9-.9 1-2.1 1.6-3.6 1.6s-2.6-.5-3.5-1.6-1.4-2.3-1.4-3.9v-.2c0-1.6.4-2.9 1.3-3.9s2.1-1.6 3.5-1.6c1.5 0 2.7.5 3.6 1.6s1.4 2.4 1.4 3.9v.2zm-2.2-.2c0-1.1-.2-2-.7-2.7s-1.2-1-2.1-1-1.6.3-2 1-.7 1.6-.7 2.7v.2c0 1.1.2 2.1.7 2.8.5.7 1.1 1 2 1 .9 0 1.6-.3 2.1-1s.7-1.6.7-2.8v-.2zm8.8-5.3c1.2 0 2.2.3 2.9 1S111 14 111 15s-.4 1.9-1.1 2.5c-.7.6-1.7.9-2.9.9h-1.8v2.4l1.2.2v1.3h-4.5V21l1.2-.2V13l-1.2-.2v-1.3h5.1zm-1.8 5.2h1.8c.6 0 1.1-.2 1.4-.5s.5-.8.5-1.3-.2-1-.5-1.3c-.3-.3-.8-.5-1.4-.5h-1.8v3.6zm14.1.9h-3.7v3.1h3.5l.1-1.3h1.7v3h-8.6V21l1.2-.2V13l-1.2-.2v-1.3h8.6v3h-1.7l-.1-1.3h-3.5v2.7h3.7v1.7z"/>
|
||||
<path fill="#FFF" d="M134.3 11.6l.1 1.1c.2-.4.5-.7.9-1 .4-.2.8-.4 1.3-.4s.8.1 1.1.3c.3.2.5.5.7.8.2-.3.5-.6.8-.8.3-.2.7-.3 1.2-.3.4 0 .7.1 1 .2.3.1.5.3.8.6.2.3.4.6.5 1 .1.4.2.9.2 1.4v7.8h-2.2v-7.9c0-.4-.1-.7-.3-.9-.2-.2-.4-.2-.7-.2-.3 0-.5.1-.6.2s-.3.3-.3.5v8.3h-2.2v-7.9c0-.4-.1-.7-.3-.9-.2-.2-.4-.3-.7-.3-.3 0-.5.1-.7.2-.2.1-.3.3-.4.5v8.3h-2.2V11.6h2zm11.3 0h5.7v8.8h3.2v2h-8.9v-2h3.3v-6.8h-3.3v-2zm3.1-2.8c0-.4.1-.7.4-.9.2-.2.6-.4 1-.4s.8.1 1 .4c.2.2.4.5.4.9s-.1.7-.4.9c-.2.2-.6.4-1 .4s-.8-.1-1-.4c-.2-.2-.4-.5-.4-.9zm10.7 2.8l.1 1.5c.4-.5.9-1 1.4-1.2.6-.3 1.2-.4 1.8-.4.5 0 1 .1 1.5.2.5.2.8.4 1.2.7.3.3.6.8.8 1.3.2.5.3 1.2.3 1.9v6.7h-2.4v-6.7c0-.4-.1-.8-.2-1.1-.1-.3-.2-.5-.4-.7-.2-.2-.4-.3-.7-.4-.3-.1-.6-.1-.9-.1-.5 0-1 .1-1.4.3-.4.2-.7.5-.9.9v7.7h-2.4V11.6h2.2zm10.6 0h5.7v8.8h3.2v2H170v-2h3.3v-6.8H170v-2zm3.1-2.8c0-.4.1-.7.4-.9.2-.2.6-.4 1-.4s.8.1 1 .4c.2.2.4.5.4.9s-.1.7-.4.9c-.2.2-.6.4-1 .4s-.8-.1-1-.4c-.3-.2-.4-.5-.4-.9z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
247
docs/static/Logo_Calliope_lang.svg
vendored
@ -1,70 +1,179 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 841.9 595.3" enable-background="new 0 0 841.9 595.3" xml:space="preserve">
|
||||
<path fill="#4A5261" d="M406.9,292.9l0.2,0l5.6,17l-11.1,0.1L406.9,292.9z M402,281.8l-14.3,42.2l-3.5,0.5l0.1,5.8l16.5-0.1
|
||||
l-0.1-5.8l-3.4-0.6l2.1-6.7l15.7-0.1l2.2,6.6l-3.3,0.6l0,5.8l16.5-0.2l0-5.8l-3.5-0.5l-15-41.9L402,281.8z"/>
|
||||
<polygon fill="#4A5261" points="454.9,281.9 445.2,282 440,282 440.1,287.9 445.2,288.8 445.6,323.5 440.4,324.6 440.5,330.4
|
||||
476.9,330.1 476.7,316.5 469.3,316.6 468.9,322.7 455.3,322.8 454.9,288.7 460.1,287.7 460.1,281.8 "/>
|
||||
<polygon fill="#4A5261" points="501.6,281.9 491.9,282 486.7,282 486.8,287.9 491.9,288.8 492.2,323.5 487.1,324.6 487.2,330.4
|
||||
523.6,330.1 523.4,316.5 516,316.6 515.6,322.7 501.9,322.8 501.6,288.7 506.8,287.7 506.8,281.8 "/>
|
||||
<polygon fill="#4A5261" points="533.4,282 533.4,287.9 538.6,288.8 538.9,323.5 533.8,324.6 533.8,330.4 553.9,330.2 553.8,324.4
|
||||
548.6,323.5 548.3,288.7 553.5,287.7 553.4,281.8 "/>
|
||||
<polygon fill="#4A5261" points="674.9,282 669.7,282 669.8,287.9 674.9,288.8 675.2,323.5 670.1,324.6 670.2,330.4 708.4,330.1
|
||||
708.3,316.8 700.9,316.9 700.6,322.7 684.9,322.8 684.8,309 701.2,308.8 701.1,301.4 684.7,301.5 684.6,289.4 700.1,289.2
|
||||
700.6,295 708.1,294.9 707.9,281.7 "/>
|
||||
<g>
|
||||
<g>
|
||||
<defs>
|
||||
<rect id="SVGID_7_" x="133.2" y="204.1" width="234.3" height="188.7"/>
|
||||
</defs>
|
||||
<clipPath id="SVGID_1_">
|
||||
<use xlink:href="#SVGID_7_" overflow="visible"/>
|
||||
</clipPath>
|
||||
</g>
|
||||
<g>
|
||||
<defs>
|
||||
<rect id="SVGID_9_" x="133.2" y="204.1" width="234.3" height="188.7"/>
|
||||
</defs>
|
||||
<clipPath id="SVGID_2_">
|
||||
<use xlink:href="#SVGID_9_" overflow="visible"/>
|
||||
</clipPath>
|
||||
</g>
|
||||
<g>
|
||||
<defs>
|
||||
<rect id="SVGID_11_" x="133.2" y="204.1" width="234.3" height="188.7"/>
|
||||
</defs>
|
||||
<clipPath id="SVGID_3_">
|
||||
<use xlink:href="#SVGID_11_" overflow="visible"/>
|
||||
</clipPath>
|
||||
<path clip-path="url(#SVGID_3_)" fill="#4A5261" d="M312.3,246.7H277v-33.8c0-3.4,2.8-6.2,6.2-6.2h22.9c3.4,0,6.2,2.8,6.2,6.2
|
||||
V246.7z"/>
|
||||
</g>
|
||||
<rect x="281.8" y="214.8" fill="#8096A1" width="25.8" height="31.8"/>
|
||||
<path fill="#855C33" d="M224.9,230.1V275l52.3,0.2c0,0,0-42.2,0-44.9c0-14.4-11.8-26.2-26.2-26.2
|
||||
C236.6,204.1,224.9,215.7,224.9,230.1"/>
|
||||
<path fill="#26A6AB" d="M294.7,331h-84.1c-26.2,0-37.4-33.3-16.6-49.2l47-35.2h71.3v66.8C312.3,323.2,304.4,331,294.7,331"/>
|
||||
<polygon fill="#42C9C9" points="237.6,273.8 201,276.6 245.6,243.3 "/>
|
||||
<polygon fill="#F7F5E8" points="235.9,262.7 245.6,243.3 251.7,262.7 "/>
|
||||
<polygon fill="#F7F5E8" points="251.7,262.7 257.7,243.3 267.4,262.7 "/>
|
||||
<polygon fill="#BDD1CF" points="265.7,273.8 237.6,273.8 235.9,262.7 267.4,262.7 "/>
|
||||
<path fill="#F7F5E8" d="M286,331c-2.6-19.3-7.8-42.7-20.1-57.2h-0.1h-14h-14h-0.1c-12.3,14.5-17.6,37.9-20.1,57.2H286z"/>
|
||||
<path fill="#FFCC99" d="M253.9,243.8h-4.5c-4.7,0-8.5-3.8-8.5-8.5v-14.5h21.5v14.5C262.4,240,258.6,243.8,253.9,243.8"/>
|
||||
<path fill="#BDD1CF" d="M238.3,331v-57.2c9.1,21.4,20.4,47.3,34.2,57.2H238.3z"/>
|
||||
<polygon fill="#FFCC99" points="245.6,243.3 251.7,262.7 257.7,243.3 "/>
|
||||
<polygon fill="#42C9C9" points="281.8,246.7 312.3,246.7 312.3,285.9 "/>
|
||||
</g>
|
||||
<path fill="#4A5261" d="M373.2,297.5l-7.2,0.1l-1.1-6.4c-1-0.9-2.2-1.7-3.6-2.2c-1.5-0.5-3.2-0.8-5.1-0.8c-4.2,0-7.4,1.6-9.7,4.7
|
||||
c-2.2,3.1-3.3,7.1-3.3,12l0,1.7c0,4.9,1.2,8.9,3.5,12c2.3,3.1,5.5,4.6,9.6,4.5c1.9,0,3.7-0.3,5.2-0.9c1.6-0.6,2.8-1.3,3.7-2.3
|
||||
l0.9-6.5l7.2-0.1l0.1,9.6c-1.9,2.3-4.4,4.1-7.4,5.5c-3,1.4-6.4,2.1-10.1,2.1c-6.5,0.1-11.8-2.1-16-6.6c-4.2-4.5-6.3-10.2-6.4-17.3
|
||||
l0-1.6c-0.1-7,1.9-12.8,6-17.4c4.1-4.6,9.4-6.9,15.9-6.9c3.7,0,7.1,0.6,10.2,2c3,1.3,5.5,3.1,7.5,5.3L373.2,297.5z"/>
|
||||
<path fill="#4A5261" d="M598.7,305c0-5-1.1-9.1-3.2-12.2c-2.1-3.1-5.2-4.6-9.3-4.6c-4.1,0-7.1,1.6-9.1,4.7c-2,3.1-2.9,7.2-2.9,12.3
|
||||
l0,0.8c0,5.1,1.1,9.2,3.2,12.3c2.1,3.1,5.1,4.6,9.2,4.6c4.1,0,7.2-1.6,9.2-4.8c2-3.1,3-7.2,3-12.3L598.7,305z M608.4,305.7
|
||||
c0.1,7.1-1.9,13-5.9,17.6c-4,4.7-9.3,7-15.9,7.1c-6.5,0.1-11.8-2.2-15.9-6.8c-4.1-4.6-6.1-10.4-6.2-17.5l0-0.7
|
||||
c-0.1-7,1.9-12.9,5.9-17.6c4-4.7,9.2-7.1,15.8-7.1c6.6-0.1,11.9,2.2,16,6.8c4.1,4.6,6.2,10.4,6.3,17.5L608.4,305.7z"/>
|
||||
<path fill="#4A5261" d="M633.9,305.2l8.2-0.1c2.7,0,4.7-0.8,6.1-2.3c1.4-1.5,2-3.4,2-5.7c0-2.3-0.7-4.2-2.1-5.7
|
||||
c-1.4-1.5-3.5-2.2-6.2-2.2l-8.2,0.1L633.9,305.2z M641.9,281.8c5.5,0,9.9,1.3,13.2,4.1c3.2,2.8,4.9,6.5,4.9,11.1
|
||||
c0,4.6-1.5,8.4-4.7,11.2s-7.5,4.3-13.1,4.3l-8.2,0.1l0.1,10.7l5.2,0.9l0,5.8l-20,0.2l-0.1-5.8l5.1-1l-0.3-34.7l-5.2-1l-0.1-5.9
|
||||
l5.2,0L641.9,281.8z"/>
|
||||
</svg>
|
||||
|
||||
<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:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Ebene_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 525.21599 126.9"
|
||||
enable-background="new 0 0 841.9 595.3"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="Logo_Calliope_lang.svg"
|
||||
width="525.216"
|
||||
height="126.9"><metadata
|
||||
id="metadata75"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs73" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1536"
|
||||
inkscape:window-height="801"
|
||||
id="namedview71"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.34208337"
|
||||
inkscape:cx="420.95001"
|
||||
inkscape:cy="297.64999"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Ebene_1" /><g
|
||||
id="g8135"
|
||||
transform="translate(-183.18441,126.89999)"><path
|
||||
style="fill:#4a5261"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3"
|
||||
d="m 406.9,-38.099997 0.2,0 5.6,17 -11.1,0.1 5.3,-17.1 z m -4.9,-11.1 -14.3,42.2000002 -3.5,0.5 0.1,5.79999996 16.5,-0.1 -0.1,-5.79999996 -3.4,-0.6 2.1,-6.7000002 15.7,-0.1 2.2,6.6000002 -3.3,0.6 0,5.79999996 16.5,-0.19999996 0,-5.8 -3.5,-0.5 -15,-41.9000002 -10,0.2 z" /><polygon
|
||||
transform="translate(0,-330.99999)"
|
||||
style="fill:#4a5261"
|
||||
id="polygon5"
|
||||
points="440.1,287.9 445.2,288.8 445.6,323.5 440.4,324.6 440.5,330.4 476.9,330.1 476.7,316.5 469.3,316.6 468.9,322.7 455.3,322.8 454.9,288.7 460.1,287.7 460.1,281.8 454.9,281.9 445.2,282 440,282 " /><polygon
|
||||
transform="translate(0,-330.99999)"
|
||||
style="fill:#4a5261"
|
||||
id="polygon7"
|
||||
points="486.8,287.9 491.9,288.8 492.2,323.5 487.1,324.6 487.2,330.4 523.6,330.1 523.4,316.5 516,316.6 515.6,322.7 501.9,322.8 501.6,288.7 506.8,287.7 506.8,281.8 501.6,281.9 491.9,282 486.7,282 " /><polygon
|
||||
transform="translate(0,-330.99999)"
|
||||
style="fill:#4a5261"
|
||||
id="polygon9"
|
||||
points="553.8,324.4 548.6,323.5 548.3,288.7 553.5,287.7 553.4,281.8 533.4,282 533.4,287.9 538.6,288.8 538.9,323.5 533.8,324.6 533.8,330.4 553.9,330.2 " /><polygon
|
||||
transform="translate(0,-330.99999)"
|
||||
style="fill:#4a5261"
|
||||
id="polygon11"
|
||||
points="708.1,294.9 707.9,281.7 674.9,282 669.7,282 669.8,287.9 674.9,288.8 675.2,323.5 670.1,324.6 670.2,330.4 708.4,330.1 708.3,316.8 700.9,316.9 700.6,322.7 684.9,322.8 684.8,309 701.2,308.8 701.1,301.4 684.7,301.5 684.6,289.4 700.1,289.2 700.6,295 " /><g
|
||||
transform="translate(0,-330.99999)"
|
||||
id="g13"><g
|
||||
id="g15"><defs
|
||||
id="defs17"><rect
|
||||
height="188.7"
|
||||
width="234.3"
|
||||
y="204.10001"
|
||||
x="133.2"
|
||||
id="SVGID_7_" /></defs><clipPath
|
||||
id="SVGID_1_"><use
|
||||
height="100%"
|
||||
width="100%"
|
||||
y="0"
|
||||
x="0"
|
||||
style="overflow:visible"
|
||||
id="use21"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_7_" /></clipPath></g><g
|
||||
id="g23"><defs
|
||||
id="defs25"><rect
|
||||
height="188.7"
|
||||
width="234.3"
|
||||
y="204.10001"
|
||||
x="133.2"
|
||||
id="SVGID_9_" /></defs><clipPath
|
||||
id="SVGID_2_"><use
|
||||
height="100%"
|
||||
width="100%"
|
||||
y="0"
|
||||
x="0"
|
||||
style="overflow:visible"
|
||||
id="use29"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_9_" /></clipPath></g><g
|
||||
id="g31"><defs
|
||||
id="defs33"><rect
|
||||
height="188.7"
|
||||
width="234.3"
|
||||
y="204.10001"
|
||||
x="133.2"
|
||||
id="SVGID_11_" /></defs><clipPath
|
||||
id="SVGID_3_"><use
|
||||
height="100%"
|
||||
width="100%"
|
||||
y="0"
|
||||
x="0"
|
||||
style="overflow:visible"
|
||||
id="use37"
|
||||
overflow="visible"
|
||||
xlink:href="#SVGID_11_" /></clipPath><path
|
||||
style="fill:#4a5261"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path39"
|
||||
d="m 312.3,246.7 -35.3,0 0,-33.8 c 0,-3.4 2.8,-6.2 6.2,-6.2 l 22.9,0 c 3.4,0 6.2,2.8 6.2,6.2 l 0,33.8 z"
|
||||
clip-path="url(#SVGID_3_)" /></g><rect
|
||||
style="fill:#8096a1"
|
||||
id="rect41"
|
||||
height="31.799999"
|
||||
width="25.799999"
|
||||
y="214.8"
|
||||
x="281.79999" /><path
|
||||
style="fill:#855c33"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path43"
|
||||
d="m 224.9,230.1 0,44.9 52.3,0.2 c 0,0 0,-42.2 0,-44.9 0,-14.4 -11.8,-26.2 -26.2,-26.2 -14.4,0 -26.1,11.6 -26.1,26" /><path
|
||||
style="fill:#26a6ab"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path45"
|
||||
d="m 294.7,331 -84.1,0 c -26.2,0 -37.4,-33.3 -16.6,-49.2 l 47,-35.2 71.3,0 0,66.8 c 0,9.8 -7.9,17.6 -17.6,17.6" /><polygon
|
||||
style="fill:#42c9c9"
|
||||
id="polygon47"
|
||||
points="201,276.6 245.6,243.3 237.6,273.8 " /><polygon
|
||||
style="fill:#f7f5e8"
|
||||
id="polygon49"
|
||||
points="245.6,243.3 251.7,262.7 235.9,262.7 " /><polygon
|
||||
style="fill:#f7f5e8"
|
||||
id="polygon51"
|
||||
points="257.7,243.3 267.4,262.7 251.7,262.7 " /><polygon
|
||||
style="fill:#bdd1cf"
|
||||
id="polygon53"
|
||||
points="267.4,262.7 265.7,273.8 237.6,273.8 235.9,262.7 " /><path
|
||||
style="fill:#f7f5e8"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path55"
|
||||
d="m 286,331 c -2.6,-19.3 -7.8,-42.7 -20.1,-57.2 l -0.1,0 -14,0 -14,0 -0.1,0 c -12.3,14.5 -17.6,37.9 -20.1,57.2 l 68.4,0 z" /><path
|
||||
style="fill:#ffcc99"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path57"
|
||||
d="m 253.9,243.8 -4.5,0 c -4.7,0 -8.5,-3.8 -8.5,-8.5 l 0,-14.5 21.5,0 0,14.5 c 0,4.7 -3.8,8.5 -8.5,8.5" /><path
|
||||
style="fill:#bdd1cf"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path59"
|
||||
d="m 238.3,331 0,-57.2 c 9.1,21.4 20.4,47.3 34.2,57.2 l -34.2,0 z" /><polygon
|
||||
style="fill:#ffcc99"
|
||||
id="polygon61"
|
||||
points="251.7,262.7 257.7,243.3 245.6,243.3 " /><polygon
|
||||
style="fill:#42c9c9"
|
||||
id="polygon63"
|
||||
points="312.3,246.7 312.3,285.9 281.8,246.7 " /></g><path
|
||||
style="fill:#4a5261"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path65"
|
||||
d="m 373.2,-33.499997 -7.2,0.1 -1.1,-6.4 c -1,-0.9 -2.2,-1.7 -3.6,-2.2 -1.5,-0.5 -3.2,-0.8 -5.1,-0.8 -4.2,0 -7.4,1.6 -9.7,4.7 -2.2,3.1 -3.3,7.1 -3.3,12 l 0,1.7 c 0,4.9 1.2,8.9 3.5,12 2.3,3.1000002 5.5,4.6000002 9.6,4.5000002 1.9,0 3.7,-0.3 5.2,-0.9 1.6,-0.6 2.8,-1.3000002 3.7,-2.3000002 l 0.9,-6.5 7.2,-0.1 0.1,9.6000002 c -1.9,2.3 -4.4,4.1 -7.4,5.5 -3,1.4 -6.4,2.09999996 -10.1,2.09999996 -6.5,0.1 -11.8,-2.09999996 -16,-6.59999996 -4.2,-4.5000002 -6.3,-10.2000002 -6.4,-17.3000002 l 0,-1.6 c -0.1,-7 1.9,-12.8 6,-17.4 4.1,-4.6 9.4,-6.9 15.9,-6.9 3.7,0 7.1,0.6 10.2,2 3,1.3 5.5,3.1 7.5,5.3 l 0.1,9.5 z" /><path
|
||||
style="fill:#4a5261"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path67"
|
||||
d="m 598.7,-25.999997 c 0,-5 -1.1,-9.1 -3.2,-12.2 -2.1,-3.1 -5.2,-4.6 -9.3,-4.6 -4.1,0 -7.1,1.6 -9.1,4.7 -2,3.1 -2.9,7.2 -2.9,12.3 l 0,0.8 c 0,5.1 1.1,9.2 3.2,12.3 2.1,3.1000002 5.1,4.6000002 9.2,4.6000002 4.1,0 7.2,-1.6 9.2,-4.8000002 2,-3.1 3,-7.2 3,-12.3 l -0.1,-0.8 z m 9.7,0.7 c 0.1,7.1 -1.9,13 -5.9,17.6000002 -4,4.7 -9.3,6.99999996 -15.9,7.09999996 -6.5,0.1 -11.8,-2.19999996 -15.9,-6.79999996 -4.1,-4.6000002 -6.1,-10.4000002 -6.2,-17.5000002 l 0,-0.7 c -0.1,-7 1.9,-12.9 5.9,-17.6 4,-4.7 9.2,-7.1 15.8,-7.1 6.6,-0.1 11.9,2.2 16,6.8 4.1,4.6 6.2,10.4 6.3,17.5 l -0.1,0.7 z" /><path
|
||||
style="fill:#4a5261"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path69"
|
||||
d="m 633.9,-25.799997 8.2,-0.1 c 2.7,0 4.7,-0.8 6.1,-2.3 1.4,-1.5 2,-3.4 2,-5.7 0,-2.3 -0.7,-4.2 -2.1,-5.7 -1.4,-1.5 -3.5,-2.2 -6.2,-2.2 l -8.2,0.1 0.2,15.9 z m 8,-23.4 c 5.5,0 9.9,1.3 13.2,4.1 3.2,2.8 4.9,6.5 4.9,11.1 0,4.6 -1.5,8.4 -4.7,11.2 -3.2,2.8 -7.5,4.3 -13.1,4.3 l -8.2,0.1 0.1,10.7000002 5.2,0.9 0,5.79999996 -20,0.2 -0.1,-5.79999996 5.1,-1 -0.3,-34.7000002 -5.2,-1 -0.1,-5.9 5.2,0 18,0 z" /></g></svg>
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 8.7 KiB |
@ -2,7 +2,7 @@
|
||||
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 251.8 222.2" enable-background="new 0 0 251.8 222.2" xml:space="preserve">
|
||||
viewBox="0 0 251.8 222.2" width="251.8" height="222.2" enable-background="new 0 0 251.8 222.2" xml:space="preserve">
|
||||
<symbol id="Mini_front" viewBox="-121.4 -112.4 242.4 214.1">
|
||||
<g>
|
||||
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
BIN
docs/static/mb/device/croc-clips/badclamp.jpg
vendored
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
docs/static/mb/device/croc-clips/crocclipsclamped.jpg
vendored
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
docs/static/mb/device/croc-clips/foilcircuit.jpg
vendored
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
docs/static/mb/device/croc-clips/foilcut.jpg
vendored
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
docs/static/mb/device/croc-clips/frontclamp.jpg
vendored
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
docs/static/mb/device/croc-clips/groundconnected.jpg
vendored
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
docs/static/mb/device/croc-clips/jackconnect.jpg
vendored
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
docs/static/mb/device/croc-clips/jackground.jpg
vendored
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
docs/static/mb/device/croc-clips/microbitattached.jpg
vendored
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
docs/static/mb/device/croc-clips/microbitconnect.jpg
vendored
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
docs/static/mb/device/croc-clips/sideclamp.jpg
vendored
Normal file
After Width: | Height: | Size: 34 KiB |
42
libs/calliope-test/calliope.ts
Normal file
@ -0,0 +1,42 @@
|
||||
basic.showString("RGB")
|
||||
basic.setLedColor(Colors.Blue)
|
||||
basic.pause(500)
|
||||
basic.setLedColor(Colors.Red)
|
||||
basic.pause(500)
|
||||
basic.setLedColor(Colors.Green)
|
||||
basic.pause(500)
|
||||
basic.setLedColor(Colors.Violet)
|
||||
basic.pause(500)
|
||||
basic.setLedColor(0);
|
||||
basic.showString("Gesten")
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
basic.showString("S")
|
||||
})
|
||||
input.onGesture(Gesture.LogoUp, () => {
|
||||
basic.showString("U")
|
||||
})
|
||||
input.onGesture(Gesture.LogoDown, () => {
|
||||
basic.showString("D")
|
||||
})
|
||||
input.onGesture(Gesture.ScreenUp, () => {
|
||||
basic.showString("+")
|
||||
})
|
||||
input.onGesture(Gesture.TiltRight, () => {
|
||||
basic.showString("R")
|
||||
})
|
||||
input.onGesture(Gesture.FreeFall, () => {
|
||||
basic.showString("F")
|
||||
})
|
||||
input.onGesture(Gesture.ScreenDown, () => {
|
||||
basic.showString("-")
|
||||
})
|
||||
input.onGesture(Gesture.TiltLeft, () => {
|
||||
basic.showString("L")
|
||||
})
|
||||
input.onGesture(Gesture.ThreeG, () => {
|
||||
basic.showString("3")
|
||||
})
|
||||
input.onGesture(Gesture.SixG, () => {
|
||||
basic.showString("6")
|
||||
})
|
||||
|
11
libs/calliope-test/pxt.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "calliope",
|
||||
"description": "Test of Calliope Parts",
|
||||
"files": [
|
||||
"calliope.ts"
|
||||
],
|
||||
"public": true,
|
||||
"dependencies": {
|
||||
"core": "file:../core"
|
||||
}
|
||||
}
|
80
libs/core/_locales/ja/core-strings.json
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"Math.randomBoolean|block": "pick random true or false",
|
||||
"Math|block": "Math",
|
||||
"String.fromCharCode|block": "text from char code %code",
|
||||
"String|block": "String",
|
||||
"basic.clearScreen|block": "clear screen",
|
||||
"basic.forever|block": "forever",
|
||||
"basic.pause|block": "pause (ms) %pause",
|
||||
"basic.showLeds|block": "show leds",
|
||||
"basic.showNumber|block": "show|number %number",
|
||||
"basic.showString|block": "show|string %text",
|
||||
"basic|block": "basic",
|
||||
"control.inBackground|block": "run in background",
|
||||
"control.reset|block": "reset",
|
||||
"control.waitMicros|block": "wait (µs)%micros",
|
||||
"control|block": "control",
|
||||
"game.addScore|block": "change score by|%points",
|
||||
"game.gameOver|block": "game over",
|
||||
"game.score|block": "score",
|
||||
"game.startCountdown|block": "start countdown|(ms) %duration",
|
||||
"game|block": "game",
|
||||
"images.createBigImage|block": "create big image",
|
||||
"images.createImage|block": "create image",
|
||||
"images|block": "images",
|
||||
"input.acceleration|block": "acceleration (mg)|%NAME",
|
||||
"input.buttonIsPressed|block": "button|%NAME|is pressed",
|
||||
"input.compassHeading|block": "compass heading (°)",
|
||||
"input.lightLevel|block": "light level",
|
||||
"input.magneticForce|block": "magnetic force (µT)|%NAME",
|
||||
"input.onButtonPressed|block": "on button|%NAME|pressed",
|
||||
"input.onGesture|block": "on |%NAME",
|
||||
"input.onPinPressed|block": "on pin %NAME|pressed",
|
||||
"input.onPinReleased|block": "on pin %NAME|released",
|
||||
"input.pinIsPressed|block": "pin %NAME|is pressed",
|
||||
"input.rotation|block": "rotation (°)|%NAME",
|
||||
"input.runningTime|block": "running time (ms)",
|
||||
"input.setAccelerometerRange|block": "set accelerometer|range %range",
|
||||
"input.temperature|block": "temperature (°C)",
|
||||
"input|block": "input",
|
||||
"led.brightness|block": "brightness",
|
||||
"led.plotBarGraph|block": "plot bar graph of %value |up to %high",
|
||||
"led.plot|block": "plot|x %x|y %y",
|
||||
"led.point|block": "point|x %x|y %y",
|
||||
"led.setBrightness|block": "set brightness %value",
|
||||
"led.stopAnimation|block": "stop animation",
|
||||
"led.toggle|block": "toggle|x %x|y %y",
|
||||
"led.unplot|block": "unplot|x %x|y %y",
|
||||
"led|block": "led",
|
||||
"music.beat|block": "%fraction|beat",
|
||||
"music.changeTempoBy|block": "change tempo by (bpm)|%value",
|
||||
"music.noteFrequency|block": "%note",
|
||||
"music.playTone|block": "play|tone %note=device_note|for %duration=device_beat",
|
||||
"music.rest|block": "rest(ms)|%duration=device_beat",
|
||||
"music.ringTone|block": "ring tone (Hz)|%note=device_note",
|
||||
"music.setTempo|block": "set tempo to (bpm)|%value",
|
||||
"music.tempo|block": "tempo (bpm)",
|
||||
"music|block": "music",
|
||||
"pins.analogReadPin|block": "analog read|pin %name",
|
||||
"pins.analogSetPeriod|block": "analog set period|pin %pin|to (µs)%micros",
|
||||
"pins.analogWritePin|block": "analog write|pin %name|to %value",
|
||||
"pins.digitalReadPin|block": "digital read|pin %name",
|
||||
"pins.digitalWritePin|block": "digital write|pin %name|to %value",
|
||||
"pins.i2cReadNumber|block": "i2c read number|at address %address|of format %format=i2c_sizeof",
|
||||
"pins.i2cWriteNumber|block": "i2c write number|at address %address|with value %value|of format %format=i2c_sizeof",
|
||||
"pins.map|block": "map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh",
|
||||
"pins.onPulsed|block": "on|pin %pin|pulsed %pulse",
|
||||
"pins.pulseDuration|block": "pulse duration (µs)",
|
||||
"pins.servoSetPulse|block": "servo set pulse|pin %value|to (µs) %micros",
|
||||
"pins.servoWritePin|block": "servo write|pin %name|to %value",
|
||||
"pins.setPull|block": "set pull|pin %pin|to %pull",
|
||||
"pins.spiWrite|block": "spi write %value",
|
||||
"pins|block": "pins",
|
||||
"serial.readLine|block": "serial read line",
|
||||
"serial.redirect|block": "serial redirect to|TX %tx|RX %rx|at baud rate %rate",
|
||||
"serial.writeLine|block": "serial|write line %text",
|
||||
"serial.writeNumber|block": "serial|write number %value",
|
||||
"serial.writeString|block": "serial write string %text",
|
||||
"serial.writeValue|block": "serial|write value %name|= %value",
|
||||
"serial|block": "serial"
|
||||
}
|
1
libs/core/dal.d.ts
vendored
@ -426,6 +426,7 @@ declare const enum DAL {
|
||||
MICROBIT_ACCELEROMETER_TILT_TOLERANCE = 200,
|
||||
MICROBIT_ACCELEROMETER_FREEFALL_TOLERANCE = 400,
|
||||
MICROBIT_ACCELEROMETER_SHAKE_TOLERANCE = 400,
|
||||
MICROBIT_ACCELEROMETER_2G_TOLERANCE = 2048,
|
||||
MICROBIT_ACCELEROMETER_3G_TOLERANCE = 3072,
|
||||
MICROBIT_ACCELEROMETER_6G_TOLERANCE = 6144,
|
||||
MICROBIT_ACCELEROMETER_8G_TOLERANCE = 8192,
|
||||
|
@ -130,7 +130,7 @@ namespace input {
|
||||
//% parts="accelerometer"
|
||||
void onGesture(Gesture gesture, Action body) {
|
||||
if ((int)gesture == MICROBIT_ACCELEROMETER_EVT_3G && uBit.accelerometer.getRange() < 3)
|
||||
uBit.accelerometer.setRange(4);
|
||||
uBit.accelerometer.setRange(6);
|
||||
else if ((int)gesture == MICROBIT_ACCELEROMETER_EVT_6G && uBit.accelerometer.getRange() < 6)
|
||||
uBit.accelerometer.setRange(8);
|
||||
registerWithDal(MICROBIT_ID_GESTURE, (int)gesture, body);
|
||||
|
@ -33,7 +33,9 @@
|
||||
"parts/speaker.svg",
|
||||
"parts/headphone.svg",
|
||||
"parts/dcmotor.svg",
|
||||
"_locales/fr/microbit-jsdoc-strings.json"
|
||||
"_locales/ja/core-jsdoc-strings.json",
|
||||
"_locales/ja/core-strings.json",
|
||||
"_locales/fr/core-jsdoc-strings.json"
|
||||
],
|
||||
"public": true,
|
||||
"dependencies": {},
|
||||
|
@ -157,8 +157,8 @@
|
||||
{"x": 395, "y": 48} ]
|
||||
},
|
||||
"pinDefinitions": [
|
||||
{ "target": "P1", "style": "croc", "orientation": "-Z"},
|
||||
{ "target": "ground", "style": "croc", "orientation": "-Z"}
|
||||
{ "target": "M_OUT1", "style": "croc", "orientation": "-Z"},
|
||||
{ "target": "M_OUT2", "style": "croc", "orientation": "-Z"}
|
||||
],
|
||||
"instantiation": {"kind": "singleton"},
|
||||
"assembly": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-calliope",
|
||||
"version": "0.5.9",
|
||||
"version": "0.5.24",
|
||||
"description": "calliope target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -29,6 +29,6 @@
|
||||
"typescript": "^1.8.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.4.55"
|
||||
"pxt-core": "0.4.65"
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,13 @@
|
||||
"P15": "P15",
|
||||
"P16": "P16",
|
||||
"P19": "P19",
|
||||
"P20": "P20"
|
||||
"P20": "P20",
|
||||
"EXT_PWR":"EXT_PWR",
|
||||
"SPKR":"EXT_PWR",
|
||||
"BTN_A": "BTN_A",
|
||||
"BTN_B": "BTN_B",
|
||||
"M_OUT1": "M_OUT1",
|
||||
"M_OUT2": "M_OUT2"
|
||||
},
|
||||
"spiPins": {
|
||||
"MOSI": "P15",
|
||||
@ -196,7 +202,7 @@
|
||||
"yottaTarget": "bbc-microbit-classic-gcc",
|
||||
"yottaCorePackage": "pxt-calliope-core",
|
||||
"githubCorePackage": "microsoft/pxt-calliope-core",
|
||||
"gittag": "v0.5.8",
|
||||
"gittag": "v0.5.11",
|
||||
"serviceId": "calliope"
|
||||
},
|
||||
"serial": {
|
||||
@ -206,16 +212,15 @@
|
||||
},
|
||||
"appTheme": {
|
||||
"accentColor": "#249899",
|
||||
"invertedMenu": true,
|
||||
"defaultLocale": "de",
|
||||
"logoUrl": "https://calliope.cc/about",
|
||||
"logo": "./static/Logo_Calliope_Woman.svg",
|
||||
"docsLogo": "./static/Logo_Calliope_Woman.svg",
|
||||
"logo": "./static/Calliopeminieditor.svg",
|
||||
"docsLogo": "./static/Calliopeminieditor.svg",
|
||||
"portraitLogo": "./static/Logo_Calliope_Woman.svg",
|
||||
"footerLogo": "./static/Logo_Calliope_Woman.svg",
|
||||
"footerLogo": "./static/Calliopeminieditor.svg",
|
||||
"cardLogo": "https://az851932.vo.msecnd.net/pub/drbwxcth",
|
||||
"appLogo": "https://az851932.vo.msecnd.net/pub/tbhemtig",
|
||||
"organization": "Microsoft",
|
||||
"organizationUrl": "https://calliope.cc/",
|
||||
"organizationLogo": "./static/Microsoft-logo_rgb_c-gray.png",
|
||||
"homeUrl": "https://calliope.cc/",
|
||||
"privacyUrl": "https://go.microsoft.com/fwlink/?LinkId=521839",
|
||||
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
|
||||
@ -247,7 +252,7 @@
|
||||
"path": "/browsers/windows"
|
||||
}
|
||||
],
|
||||
"boardName": "BBC micro:bit",
|
||||
"boardName": "Calliope MINI",
|
||||
"docMenu": [
|
||||
{
|
||||
"name": "Getting Started",
|
||||
|
@ -143,8 +143,7 @@ namespace pxsim.visuals {
|
||||
stroke-width: 2px;
|
||||
}
|
||||
`;
|
||||
const BOARD_SVG = `
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
const BOARD_SVG = `<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
@ -967,48 +966,28 @@ namespace pxsim.visuals {
|
||||
</svg>
|
||||
`
|
||||
|
||||
const pins4onXs = [66.7, 79.1, 91.4, 103.7, 164.3, 176.6, 188.9, 201.3, 213.6, 275.2, 287.5, 299.8, 312.1, 324.5, 385.1, 397.4, 409.7, 422];
|
||||
const pins4onMids = pins4onXs.map(x => x + 5);
|
||||
const littlePinDist = pins4onMids[1] - pins4onMids[0];
|
||||
const bigPinWidth = pins4onMids[4] - pins4onMids[3];
|
||||
const pin0mid = pins4onXs[0] - bigPinWidth / 2.0;
|
||||
const pin3mid = pin0mid - bigPinWidth / 2.0;
|
||||
const pin1mid = pins4onMids[3] + bigPinWidth / 2.0;
|
||||
const pin2mid = pins4onMids[8] + bigPinWidth / 2.0;
|
||||
const pin3Vmid = pins4onMids[13] + bigPinWidth / 2.0;
|
||||
const pinGNDmid = pins4onMids[pins4onMids.length - 1] + bigPinWidth / 2.0;
|
||||
const pinGND2mid = pinGNDmid + bigPinWidth / 2.0;
|
||||
const pinMids = [pin0mid, pin1mid, pin2mid, pin3mid].concat(pins4onMids).concat([pinGNDmid, pin3Vmid, pinGND2mid]);
|
||||
const pinNames = [
|
||||
"P0", "P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "P9", "P10",
|
||||
"P11", "P12", "P13", "P14", "P15", "P16", "P17", "P18", "P19", "P20",
|
||||
"GND0", "GND", "+3v3", "GND1"];
|
||||
"EXT_PWR", "SPKR", "BTN_A", "BTN_B",
|
||||
"EDGE_P0", "EDGE_P1", "EDGE_P2", "EDGE_P3", "EDGE_GND", "EDGE_VCC",
|
||||
"C_GND1", "C_GND2", "C_GND3", "C_GND4", "C_VCC1", "C_VCC2",
|
||||
"C_P0", "C_P2", "C_P4", "C_P6", "C_P8", "C_P10", "C_P12", "C_P14", "C_P16", "C_P20",
|
||||
"C_P1", "C_P22", "C_P5", "C_P7", "C_P9", "C_P11", "C_P13", "C_P15", "C_P21", "C_P19",
|
||||
"M_GND1", "M_GND2", "M_OUT1", "M_OUT2", "M_VM",
|
||||
"G_A0_GND", "G_A0_VCC", "G_A0_SDA", "G_A0_SCL",
|
||||
"G_A1_RX", "G_A1_TX", "G_A1_VCC", "G_A1_GND"
|
||||
];
|
||||
const pinTitles = [
|
||||
"P0, ANALOG IN",
|
||||
"P1, ANALOG IN",
|
||||
"P2, ANALOG IN",
|
||||
"P3, ANALOG IN, LED Col 1",
|
||||
"P4, ANALOG IN, LED Col 2",
|
||||
"P5, BUTTON A",
|
||||
"P6, LED Col 9",
|
||||
"P7, LED Col 8",
|
||||
"P8",
|
||||
"P9, LED Col 7",
|
||||
"P10, ANALOG IN, LED Col 3",
|
||||
"P11, BUTTON B",
|
||||
"P12, RESERVED ACCESSIBILITY",
|
||||
"P13, SPI - SCK",
|
||||
"P14, SPI - MISO",
|
||||
"P15, SPI - MOSI",
|
||||
"P16, SPI - Chip Select",
|
||||
"P17, +3v3",
|
||||
"P18, +3v3",
|
||||
"P19, I2C - SCL",
|
||||
"P20, I2C - SDA",
|
||||
"GND", "GND", "+3v3", "GND"
|
||||
"External Power", "Speaker", "Button A", "Button B",
|
||||
"0, ANALOG IN", "1, ANALOG IN", "2, ANALOG IN", "3, ANALOG IN", "GND", "+3v3",
|
||||
"GND", "GND", "GND", "GND", "+3v3", "+3v3",
|
||||
"C0, ANALOG IN", "C2, ANALOG IN", "C4", "C6", "C8", "C10", "C12", "C14", "C16", "C18",
|
||||
"C1, ANALOG IN", "C3, ANALOG IN", "C5", "C7", "C9", "C11", "C13", "C15", "C17", "C19",
|
||||
"GND", "GND", "MOTOR1", "MOTOR2", "MOTOR VM",
|
||||
"GND", "+3v3", "C18, I2C - SDA", "C19, I2C - SCL",
|
||||
"C16, Serial - RX", "C17, Serial - TX", "+3v3", "GND"
|
||||
];
|
||||
const MB_WIDTH = 251.8;
|
||||
const MB_HEIGHT = 222.2;
|
||||
const MB_HEIGHT = 222.2;
|
||||
export interface IBoardTheme {
|
||||
accent?: string;
|
||||
display?: string;
|
||||
@ -1080,11 +1059,207 @@ namespace pxsim.visuals {
|
||||
private thermometerText: SVGTextElement;
|
||||
private shakeButton: SVGElement;
|
||||
public board: pxsim.DalBoard;
|
||||
private pinNmToCoord: Map<Coord> = {};
|
||||
private rgbLed: SVGElement;
|
||||
private pinNmToCoord: Map<Coord> = {
|
||||
"EXT_PWR": [
|
||||
92.30997467041016,
|
||||
-42.92474937438965
|
||||
],
|
||||
"SPKR": [
|
||||
106.44635391235352,
|
||||
-16.370698928833008
|
||||
],
|
||||
"BTN_A": [
|
||||
93.8138427734375,
|
||||
56.631452560424805
|
||||
],
|
||||
"BTN_B": [
|
||||
204.92835235595703,
|
||||
56.631452560424805
|
||||
],
|
||||
"EDGE_P0": [
|
||||
56.002254486083984,
|
||||
95.43130111694336
|
||||
],
|
||||
"EDGE_P1": [
|
||||
103.00893783569336,
|
||||
175.82388305664062
|
||||
],
|
||||
"EDGE_P2": [
|
||||
195.90512084960938,
|
||||
175.3082733154297
|
||||
],
|
||||
"EDGE_P3": [
|
||||
241.79466247558594,
|
||||
95.3883285522461
|
||||
],
|
||||
"EDGE_GND": [
|
||||
103.00893783569336,
|
||||
14.86682915687561
|
||||
],
|
||||
"EDGE_VCC": [
|
||||
195.64733123779297,
|
||||
14.86682915687561
|
||||
],
|
||||
"C_GND1": [
|
||||
113.1493148803711,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_GND2": [
|
||||
150.27342987060547,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_GND3": [
|
||||
150.27342987060547,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_GND4": [
|
||||
187.39752960205078,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_VCC1": [
|
||||
187.39752960205078,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_VCC2": [
|
||||
113.1922836303711,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P0": [
|
||||
119.33667373657227,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P2": [
|
||||
125.52401733398438,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P4": [
|
||||
131.71136474609375,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P6": [
|
||||
137.89871978759766,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P8": [
|
||||
144.08607482910156,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P10": [
|
||||
156.46077728271484,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P12": [
|
||||
162.64812469482422,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P14": [
|
||||
168.83545684814453,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P16": [
|
||||
175.02281951904297,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P20": [
|
||||
181.2101821899414,
|
||||
159.83989715576172
|
||||
],
|
||||
"C_P1": [
|
||||
119.379638671875,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P22": [
|
||||
125.56698226928711,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P5": [
|
||||
131.71136474609375,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P7": [
|
||||
137.89871978759766,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P9": [
|
||||
144.08607482910156,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P11": [
|
||||
156.46077728271484,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P13": [
|
||||
162.64812469482422,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P15": [
|
||||
168.83545684814453,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P21": [
|
||||
175.02281951904297,
|
||||
153.5666275024414
|
||||
],
|
||||
"C_P19": [
|
||||
181.2101821899414,
|
||||
153.5666275024414
|
||||
],
|
||||
"M_GND1": [
|
||||
137.89871978759766,
|
||||
141.70752716064453
|
||||
],
|
||||
"M_GND2": [
|
||||
156.46077728271484,
|
||||
141.70752716064453
|
||||
],
|
||||
"M_OUT1": [
|
||||
144.08607482910156,
|
||||
141.70752716064453
|
||||
],
|
||||
"M_OUT2": [
|
||||
150.27342987060547,
|
||||
141.70752716064453
|
||||
],
|
||||
"M_VM": [
|
||||
162.64812469482422,
|
||||
141.70752716064453
|
||||
],
|
||||
"G_A0_GND": [
|
||||
82.47036743164062,
|
||||
72.35763549804688
|
||||
],
|
||||
"G_A0_VCC": [
|
||||
78.34546279907227,
|
||||
76.3106689453125
|
||||
],
|
||||
"G_A0_SDA": [
|
||||
74.65023803710938,
|
||||
80.00588989257812
|
||||
],
|
||||
"G_A0_SCL": [
|
||||
70.43940734863281,
|
||||
84.21672821044922
|
||||
],
|
||||
"G_A1_RX": [
|
||||
216.52963256835938,
|
||||
71.4982795715332
|
||||
],
|
||||
"G_A1_TX": [
|
||||
220.65453338623047,
|
||||
75.53724670410156
|
||||
],
|
||||
"G_A1_VCC": [
|
||||
224.34976959228516,
|
||||
79.23247528076172
|
||||
],
|
||||
"G_A1_GND": [
|
||||
228.56060028076172,
|
||||
83.44330978393555
|
||||
]
|
||||
};
|
||||
|
||||
constructor(public props: IBoardProps) {
|
||||
this.recordPinCoords();
|
||||
this.buildDom();
|
||||
if (props && props.wireframe)
|
||||
svg.addClass(this.element, "sim-wireframe");
|
||||
@ -1119,15 +1294,16 @@ namespace pxsim.visuals {
|
||||
}
|
||||
|
||||
public getPinDist(): number {
|
||||
return littlePinDist * 1.7;
|
||||
return 10;
|
||||
}
|
||||
|
||||
public recordPinCoords() {
|
||||
const pinsY = 356.7 + 40;
|
||||
pinNames.forEach((nm, i) => {
|
||||
let x = pinMids[i];
|
||||
this.pinNmToCoord[nm] = [x, pinsY];
|
||||
private recordPinCoords() {
|
||||
pinNames.forEach((nm, i) => {
|
||||
const p = this.pins[i];
|
||||
const r = p.getBoundingClientRect();
|
||||
this.pinNmToCoord[nm] = [r.left + r.width / 2, r.top + r.height / 2];
|
||||
});
|
||||
console.log(JSON.stringify(this.pinNmToCoord, null, 2))
|
||||
}
|
||||
|
||||
private updateTheme() {
|
||||
@ -1187,7 +1363,7 @@ namespace pxsim.visuals {
|
||||
const g = (c >> 8) & 0xFF;
|
||||
const r = (c >> 16) & 0xFF;
|
||||
const w = (c >> 24) & 0xFF;
|
||||
const ch = `rgba(${r}, ${g}, ${b}, 1)`;
|
||||
const ch = `rgba(${r}, ${g}, ${b}, 1)`;
|
||||
svg.fill(this.rgbLed, ch);
|
||||
} else if (this.rgbLed) {
|
||||
svg.fill(this.rgbLed, 'white');
|
||||
@ -1265,8 +1441,10 @@ namespace pxsim.visuals {
|
||||
rx: 5, ry: 5,
|
||||
fill: `url(#${gid})`
|
||||
});
|
||||
this.thermometerText = svg.child(this.g, "text", { class: 'sim-text',
|
||||
x: 100, y: MB_HEIGHT - 174 }) as SVGTextElement;
|
||||
this.thermometerText = svg.child(this.g, "text", {
|
||||
class: 'sim-text',
|
||||
x: 100, y: MB_HEIGHT - 174
|
||||
}) as SVGTextElement;
|
||||
this.updateTheme();
|
||||
|
||||
let pt = this.element.createSVGPoint();
|
||||
@ -1375,7 +1553,7 @@ namespace pxsim.visuals {
|
||||
}
|
||||
}, ev => { },
|
||||
ev => { })
|
||||
this.lightLevelText = svg.child(this.g, "text", { x: cx-r-7, y: cy + r + 8, text: '', class: 'sim-text inverted' }) as SVGTextElement;
|
||||
this.lightLevelText = svg.child(this.g, "text", { x: cx - r - 7, y: cy + r + 8, text: '', class: 'sim-text inverted' }) as SVGTextElement;
|
||||
this.updateTheme();
|
||||
}
|
||||
|
||||
@ -1404,8 +1582,7 @@ namespace pxsim.visuals {
|
||||
}
|
||||
|
||||
private buildDom() {
|
||||
this.element = <SVGSVGElement>svg.elt("svg")
|
||||
this.element.innerHTML = BOARD_SVG;
|
||||
this.element = new DOMParser().parseFromString(BOARD_SVG, "image/svg+xml").querySelector("svg") as SVGSVGElement;
|
||||
svg.hydrate(this.element, {
|
||||
"version": "1.0",
|
||||
"viewBox": `0 0 ${MB_WIDTH} ${MB_HEIGHT}`,
|
||||
@ -1447,21 +1624,11 @@ namespace pxsim.visuals {
|
||||
|
||||
// https://www.microbit.co.uk/device/pins
|
||||
// P0, P1, P2
|
||||
this.pins = [
|
||||
"M16.5,341.2c0,0.4-0.1,0.9-0.1,1.3v60.7c4.1,1.7,8.6,2.7,12.9,2.7h34.4v-64.7h0.3c0,0,0-0.1,0-0.1c0-13-10.6-23.6-23.7-23.6C27.2,317.6,16.5,328.1,16.5,341.2z M21.2,341.6c0-10.7,8.7-19.3,19.3-19.3c10.7,0,19.3,8.7,19.3,19.3c0,10.7-8.6,19.3-19.3,19.3C29.9,360.9,21.2,352.2,21.2,341.6z",
|
||||
"M139.1,317.3c-12.8,0-22.1,10.3-23.1,23.1V406h46.2v-65.6C162.2,327.7,151.9,317.3,139.1,317.3zM139.3,360.1c-10.7,0-19.3-8.6-19.3-19.3c0-10.7,8.6-19.3,19.3-19.3c10.7,0,19.3,8.7,19.3,19.3C158.6,351.5,150,360.1,139.3,360.1z",
|
||||
"M249,317.3c-12.8,0-22.1,10.3-23.1,23.1V406h46.2v-65.6C272.1,327.7,261.8,317.3,249,317.3z M249.4,360.1c-10.7,0-19.3-8.6-19.3-19.3c0-10.7,8.6-19.3,19.3-19.3c10.7,0,19.3,8.7,19.3,19.3C268.7,351.5,260.1,360.1,249.4,360.1z"
|
||||
].map((p, pi) => svg.path(this.g, "sim-pin sim-pin-touch", p));
|
||||
|
||||
// P3
|
||||
this.pins.push(svg.path(this.g, "sim-pin", "M0,357.7v19.2c0,10.8,6.2,20.2,14.4,25.2v-44.4H0z"));
|
||||
|
||||
pins4onXs.forEach(x => {
|
||||
this.pins.push(svg.child(this.g, "rect", { x: x, y: 356.7, width: 10, height: 50, class: "sim-pin" }));
|
||||
})
|
||||
this.pins.push(svg.path(this.g, "sim-pin", "M483.6,402c8.2-5,14.4-14.4,14.4-25.1v-19.2h-14.4V402z"));
|
||||
this.pins.push(svg.path(this.g, "sim-pin", "M359.9,317.3c-12.8,0-22.1,10.3-23.1,23.1V406H383v-65.6C383,327.7,372.7,317.3,359.9,317.3z M360,360.1c-10.7,0-19.3-8.6-19.3-19.3c0-10.7,8.6-19.3,19.3-19.3c10.7,0,19.3,8.7,19.3,19.3C379.3,351.5,370.7,360.1,360,360.1z"));
|
||||
this.pins.push(svg.path(this.g, "sim-pin", "M458,317.6c-13,0-23.6,10.6-23.6,23.6c0,0,0,0.1,0,0.1h0V406H469c4.3,0,8.4-1,12.6-2.7v-60.7c0-0.4,0-0.9,0-1.3C481.6,328.1,471,317.6,458,317.6z M457.8,360.9c-10.7,0-19.3-8.6-19.3-19.3c0-10.7,8.6-19.3,19.3-19.3c10.7,0,19.3,8.7,19.3,19.3C477.1,352.2,468.4,360.9,457.8,360.9z"));
|
||||
this.pins = pinNames.map(n => {
|
||||
let p = this.element.getElementById(n) as SVGElement;
|
||||
svg.addClass(p, "sim-pin");
|
||||
return p;
|
||||
});
|
||||
|
||||
this.pins.forEach((p, i) => svg.hydrate(p, { title: pinTitles[i] }));
|
||||
|
||||
|