Compare commits

..

4 Commits

Author SHA1 Message Date
Matthias L. Jugel
c1025b8658 fix naming and pin selection 2016-11-10 21:00:03 +01:00
Matthias L. Jugel
cdb9682a8b intermediate fix for accelerometer used in pxt 2016-11-10 20:45:40 +01:00
Matthias L. Jugel
42d21dea28 fix pin name for SDA 2016-11-10 15:30:49 +01:00
Matthias L. Jugel
c4e427c090 fix pins to be in sync with the naming in the simulator and on the board 2016-11-10 15:11:12 +01:00
6 changed files with 74 additions and 80 deletions

View File

@@ -169,9 +169,9 @@
"led.unplot|param|x": "TODO", "led.unplot|param|x": "TODO",
"led.unplot|param|y": "TODO", "led.unplot|param|y": "TODO",
"motors": "Blocks to control the onboard motors", "motors": "Blocks to control the onboard motors",
"motors.dualMotorPower": "Controls two motors attached to the board.", "motors.dualMotorPower": "Controls two motors attached to the board. Switches to dual-motor mode!",
"motors.motorCommand": "Send break, coast or sleep commands to the motor", "motors.motorCommand": "Send break, coast or sleep commands to the motor. Has no effect in dual-motor mode.",
"motors.motorPower": "Turns on the motor at a certain percent of power.", "motors.motorPower": "Turns on the motor at a certain percent of power. Switches to single motor mode!",
"motors.motorPower|param|power": "%percent of power sent to the motor. Negative power goes backward. eg: 50", "motors.motorPower|param|power": "%percent of power sent to the motor. Negative power goes backward. eg: 50",
"music": "Generation of music tones through pin ``P0``.", "music": "Generation of music tones through pin ``P0``.",
"music.beat": "Returns the duration of a beat in milli-seconds", "music.beat": "Returns the duration of a beat in milli-seconds",
@@ -180,7 +180,6 @@
"music.noteFrequency": "Gets the frequency of a note.", "music.noteFrequency": "Gets the frequency of a note.",
"music.noteFrequency|param|name": "the note name", "music.noteFrequency|param|name": "the note name",
"music.playTone": "Plays a tone through ``speaker`` for the given duration.", "music.playTone": "Plays a tone through ``speaker`` for the given duration.",
"music.playTone|param|frequency": "pitch of the tone to play in Hertz (Hz)",
"music.playTone|param|ms": "tone duration in milliseconds (ms)", "music.playTone|param|ms": "tone duration in milliseconds (ms)",
"music.rest": "Rests (plays nothing) for a specified time through pin ``P0``.", "music.rest": "Rests (plays nothing) for a specified time through pin ``P0``.",
"music.rest|param|ms": "rest duration in milliseconds (ms)", "music.rest|param|ms": "rest duration in milliseconds (ms)",

3
libs/core/dal.d.ts vendored
View File

@@ -153,6 +153,9 @@ declare const enum DAL {
CALLIOPE_ID_IO_P14 = 38, CALLIOPE_ID_IO_P14 = 38,
CALLIOPE_ID_IO_P15 = 39, CALLIOPE_ID_IO_P15 = 39,
CALLIOPE_ID_IO_P22 = 40, CALLIOPE_ID_IO_P22 = 40,
CALLIOPE_ID_IO_P28 = 41,
CALLIOPE_ID_IO_P29 = 42,
CALLIOPE_ID_IO_P30 = 43,
MICROBIT_ID_MESSAGE_BUS_LISTENER = 1021, MICROBIT_ID_MESSAGE_BUS_LISTENER = 1021,
MICROBIT_ID_NOTIFY_ONE = 1022, MICROBIT_ID_NOTIFY_ONE = 1022,
MICROBIT_ID_NOTIFY = 1023, MICROBIT_ID_NOTIFY = 1023,

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

@@ -266,37 +266,33 @@ declare namespace motors {
P0 = 7, // MICROBIT_ID_IO_P0 P0 = 7, // MICROBIT_ID_IO_P0
P1 = 8, // MICROBIT_ID_IO_P1 P1 = 8, // MICROBIT_ID_IO_P1
P2 = 9, // MICROBIT_ID_IO_P2 P2 = 9, // MICROBIT_ID_IO_P2
P3 = 10, // MICROBIT_ID_IO_P3 P3 = 40, // CALLIOPE_ID_IO_P22
P4 = 11, // MICROBIT_ID_IO_P4 C4 = 10, // MICROBIT_ID_IO_P3
P5 = 12, // MICROBIT_ID_IO_P5 C5 = 11, // MICROBIT_ID_IO_P4
P6 = 13, // MICROBIT_ID_IO_P6 C6 = 17, // MICROBIT_ID_IO_P10
P7 = 14, // MICROBIT_ID_IO_P7 C7 = 34, // CALLIOPE_ID_IO_P7
//P8 = MICROBIT_ID_IO_P8, C8 = 35, // CALLIOPE_ID_IO_P8
P9 = 16, // MICROBIT_ID_IO_P9 C9 = 36, // CALLIOPE_ID_IO_P9
P10 = 17, // MICROBIT_ID_IO_P10 C10 = 16, // MICROBIT_ID_IO_P9
P11 = 18, // MICROBIT_ID_IO_P11 C11 = 14, // MICROBIT_ID_IO_P7
//P12 = MICROBIT_ID_IO_P12, C12 = 13, // MICROBIT_ID_IO_P6
//P13 = MICROBIT_ID_IO_P13, C13 = 37, // CALLIOPE_ID_IO_P13
//P14 = MICROBIT_ID_IO_P14, C14 = 38, // CALLIOPE_ID_IO_P14
//P15 = MICROBIT_ID_IO_P15, C15 = 39, // CALLIOPE_ID_IO_P15
//P16 = MICROBIT_ID_IO_P16, //P16 = MICROBIT_ID_IO_P16,
P19 = 24, // MICROBIT_ID_IO_P19 C19 = 24, // MICROBIT_ID_IO_P19
P20 = 25, // MICROBIT_ID_IO_P20 C20 = 25, // MICROBIT_ID_IO_P20
P28 = 41, // CALLIOPE_ID_IO_P28
P29 = 42, // CALLIOPE_ID_IO_P29
P30 = 43, // CALLIOPE_ID_IO_P30
} }
declare enum AnalogPin { declare enum AnalogPin {
P0 = 7, // MICROBIT_ID_IO_P0 //P0 = MICROBIT_ID_IO_P0, -- does not work analogue
P1 = 8, // MICROBIT_ID_IO_P1 P1 = 8, // MICROBIT_ID_IO_P1
P2 = 9, // MICROBIT_ID_IO_P2 P2 = 9, // MICROBIT_ID_IO_P2
P3 = 10, // MICROBIT_ID_IO_P3 //P3 = CALLIOPE_ID_IO_P22, -- does not work analogue
P4 = 11, // MICROBIT_ID_IO_P4 C4 = 10, // MICROBIT_ID_IO_P3
P10 = 17, // MICROBIT_ID_IO_P10 C5 = 11, // MICROBIT_ID_IO_P4
P29 = 42, // CALLIOPE_ID_IO_P29 C6 = 17, // MICROBIT_ID_IO_P10
P30 = 43, // CALLIOPE_ID_IO_P30
} }

View File

@@ -1,39 +1,35 @@
#include "ksbit.h" #include "ksbit.h"
enum class DigitalPin { enum class DigitalPin {
P0 = MICROBIT_ID_IO_P0, P0 = MICROBIT_ID_IO_P0, // edge connector 0
P1 = MICROBIT_ID_IO_P1, P1 = MICROBIT_ID_IO_P1, // edge connector 1
P2 = MICROBIT_ID_IO_P2, P2 = MICROBIT_ID_IO_P2, // edge connector 2
P3 = MICROBIT_ID_IO_P3, P3 = CALLIOPE_ID_IO_P22, // edge connector 3
P4 = MICROBIT_ID_IO_P4, C4 = MICROBIT_ID_IO_P3, // LED matrix C1
P5 = MICROBIT_ID_IO_P5, C5 = MICROBIT_ID_IO_P4, // LED matrix C2
P6 = MICROBIT_ID_IO_P6, C6 = MICROBIT_ID_IO_P10, // LED matrix C3
P7 = MICROBIT_ID_IO_P7, C7 = CALLIOPE_ID_IO_P7, // LED matrix C4
//P8 = MICROBIT_ID_IO_P8, C8 = CALLIOPE_ID_IO_P8, // LED matrix C5
P9 = MICROBIT_ID_IO_P9, C9 = CALLIOPE_ID_IO_P9, // LED matrix C6
P10 = MICROBIT_ID_IO_P10, C10 = MICROBIT_ID_IO_P9, // LED matrix C7
P11 = MICROBIT_ID_IO_P11, C11 = MICROBIT_ID_IO_P7, // LED matrix C8
//P12 = MICROBIT_ID_IO_P12, C12 = MICROBIT_ID_IO_P6, // LED matrix C9
//P13 = MICROBIT_ID_IO_P13, C13 = CALLIOPE_ID_IO_P13, // LED matrix R1
//P14 = MICROBIT_ID_IO_P14, C14 = CALLIOPE_ID_IO_P14, // LED matrix R2
//P15 = MICROBIT_ID_IO_P15, C15 = CALLIOPE_ID_IO_P15, // LED matrix R3
//P16 = MICROBIT_ID_IO_P16, //P16 = MICROBIT_ID_IO_P16,
P19 = MICROBIT_ID_IO_P19, C19 = MICROBIT_ID_IO_P19, // SCL
P20 = MICROBIT_ID_IO_P20, C20 = MICROBIT_ID_IO_P20 // SDA
P28 = CALLIOPE_ID_IO_P28,
P29 = CALLIOPE_ID_IO_P29,
P30 = CALLIOPE_ID_IO_P30
}; };
enum class AnalogPin { enum class AnalogPin {
P0 = MICROBIT_ID_IO_P0, //P0 = MICROBIT_ID_IO_P0, -- does not work analogue
P1 = MICROBIT_ID_IO_P1, P1 = MICROBIT_ID_IO_P1, // edge connector 1
P2 = MICROBIT_ID_IO_P2, P2 = MICROBIT_ID_IO_P2, // edge connector 2
P3 = MICROBIT_ID_IO_P3, //P3 = CALLIOPE_ID_IO_P22, -- does not work analogue
P4 = MICROBIT_ID_IO_P4, C4 = MICROBIT_ID_IO_P3,
P10 = MICROBIT_ID_IO_P10, C5 = MICROBIT_ID_IO_P4,
P29 = CALLIOPE_ID_IO_P29, C6 = MICROBIT_ID_IO_P10,
P30 = CALLIOPE_ID_IO_P30
}; };
enum class PulseValue { enum class PulseValue {

View File

@@ -1,6 +1,6 @@
{ {
"name": "pxt-calliope", "name": "pxt-calliope",
"version": "0.5.71", "version": "0.5.70",
"description": "calliope target for PXT", "description": "calliope target for PXT",
"keywords": [ "keywords": [
"JavaScript", "JavaScript",
@@ -30,7 +30,7 @@
"typescript": "^1.8.7" "typescript": "^1.8.7"
}, },
"dependencies": { "dependencies": {
"pxt-core": "0.5.64", "pxt-core": "0.5.62",
"less": "^2.6.0", "less": "^2.6.0",
"semantic-ui-less": "^2.2.4" "semantic-ui-less": "^2.2.4"
} }

View File

@@ -99,21 +99,21 @@
"P1": "EDGE_P1", "P1": "EDGE_P1",
"P2": "EDGE_P2", "P2": "EDGE_P2",
"P3": "EDGE_P3", "P3": "EDGE_P3",
"P4": "C_P4", "C4": "C_P4",
"P5": "C_P5", "C5": "C_P5",
"P6": "C_P6", "C6": "C_P6",
"P7": "C_P7", "C7": "C_P7",
"P8": "C_P8", "C8": "C_P8",
"P9": "C_P9", "C9": "C_P9",
"P10": "C_P10", "C10": "C_P10",
"P11": "C_P11", "C11": "C_P11",
"P12": "C_P12", "C12": "C_P12",
"P13": "C_P13", "C13": "C_P13",
"P14": "C_P14", "C14": "C_P14",
"P15": "C_P15", "C15": "C_P15",
"P16": "C_P16", "C16": "C_P16",
"P19": "C_P19", "C19": "C_P19",
"P20": "C_P20", "C20": "C_P20",
"EXT_PWR":"EXT_PWR", "EXT_PWR":"EXT_PWR",
"SPKR":"EXT_PWR", "SPKR":"EXT_PWR",
"BTN_A": "BTN_A", "BTN_A": "BTN_A",
@@ -127,15 +127,15 @@
"SCK": "P13" "SCK": "P13"
}, },
"i2cPins": { "i2cPins": {
"SDA": "P20", "SDA": "C20",
"SCL": "P19" "SCL": "C19"
}, },
"analogInPins": [ "analogInPins": [
"P0",
"P1", "P1",
"P2", "P2",
"P3", "C4",
"P10" "C5",
"C6"
], ],
"groundPins": [ "groundPins": [
"EDGE_GND" "EDGE_GND"
@@ -169,7 +169,7 @@
"yottaTarget": "bbc-microbit-classic-gcc", "yottaTarget": "bbc-microbit-classic-gcc",
"yottaCorePackage": "pxt-calliope-core", "yottaCorePackage": "pxt-calliope-core",
"githubCorePackage": "microsoft/pxt-calliope-core", "githubCorePackage": "microsoft/pxt-calliope-core",
"gittag": "v0.5.13", "gittag": "v0.5.14",
"serviceId": "calliope" "serviceId": "calliope"
}, },
"serial": { "serial": {