Merge branch 'master' of github.com:Microsoft/pxt-microbit
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
{
|
||||
"bluetooth": "Support for additional Bluetooth services.",
|
||||
"bluetooth.onBluetoothConnected": "Register code to run when the micro:bit is connected to over Bluetooth",
|
||||
"bluetooth.onBluetoothConnected|param|body": "Code to run when a Bluetooth connection is established",
|
||||
"bluetooth.onBluetoothDisconnected": "Register code to run when a bluetooth connection to the micro:bit is lost",
|
||||
@ -10,6 +9,7 @@
|
||||
"bluetooth.startLEDService": "Starts the Bluetooth LED service",
|
||||
"bluetooth.startMagnetometerService": "Starts the Bluetooth magnetometer service",
|
||||
"bluetooth.startTemperatureService": "Starts the Bluetooth temperature service",
|
||||
"bluetooth.startUartService": "Starts the Bluetooth UART service",
|
||||
"bluetooth.uartRead": "Reads from the Bluetooth UART service buffer, returning its contents when the specified delimiter character is encountered.",
|
||||
"bluetooth.uartWrite": "Writes to the Bluetooth UART service buffer. From there the data is transmitted over Bluetooth to a connected device."
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
"bluetooth.startLEDService|block": "bluetooth led service",
|
||||
"bluetooth.startMagnetometerService|block": "bluetooth magnetometer service",
|
||||
"bluetooth.startTemperatureService|block": "bluetooth temperature service",
|
||||
"bluetooth.startUartService|block": "bluetooth uart service",
|
||||
"bluetooth.uartRead|block": "bluetooth uart read %del=bluetooth_uart_delimiter_conv",
|
||||
"bluetooth.uartWrite|block": "bluetooth uart write %data",
|
||||
"bluetooth|block": "bluetooth"
|
||||
|
@ -22,6 +22,8 @@
|
||||
"control": "Runtime and event utilities.",
|
||||
"control.inBackground": "Schedules code that run in the background.",
|
||||
"control.reset": "Resets the BBC micro:bit.",
|
||||
"control.waitMicros": "Blocks the current fiber for the given microseconds",
|
||||
"control.waitMicros|param|micros": "number of micro-seconds to wait. eg: 4",
|
||||
"game": "A single-LED sprite game engine",
|
||||
"game.addScore": "Adds points to the current score",
|
||||
"game.addScore|param|points": "amount of points to change, eg: 1",
|
||||
@ -52,9 +54,12 @@
|
||||
"input.onLogoDown|param|body": "TODO",
|
||||
"input.onLogoUp": "Attaches code to run when the logo is oriented upwards and the board is vertical.",
|
||||
"input.onLogoUp|param|body": "TODO",
|
||||
"input.onPinPressed": "Do something when a pin(``P0``, ``P1`` or both ``P2``) is pressed.",
|
||||
"input.onPinPressed|param|body": "TODO",
|
||||
"input.onPinPressed|param|name": "TODO",
|
||||
"input.onPinPressed": "Do something when a pin is pressed.",
|
||||
"input.onPinPressed|param|body": "the code to run when the pin is pressed",
|
||||
"input.onPinPressed|param|name": "the pin that needs to be pressed",
|
||||
"input.onPinReleased": "Do something when a pin is released.",
|
||||
"input.onPinReleased|param|body": "the code to run when the pin is released",
|
||||
"input.onPinReleased|param|name": "the pin that needs to be released",
|
||||
"input.onScreenDown": "Attaches code to run when the screen is facing down.",
|
||||
"input.onScreenDown|param|body": "TODO",
|
||||
"input.onScreenUp": "Attaches code to run when the screen is facing up.",
|
||||
@ -152,6 +157,8 @@
|
||||
"pins.setPull": "Configures the pull of this pin.",
|
||||
"pins.setPull|param|name": "pin to set the pull mode on",
|
||||
"pins.setPull|param|pull": "one of the mbed pull configurations: PullUp, PullDown, PullNone ",
|
||||
"pins.spiWrite": "Write to the SPI slave and return the response",
|
||||
"pins.spiWrite|param|value": "Data to be sent to the SPI slave",
|
||||
"serial": "Reading and writing data over a serial connection.",
|
||||
"serial.readLine": "Reads a line of text from the serial port.",
|
||||
"serial.redirect": "Dynamically configuring the serial instance to use pins other than USBTX and USBRX.",
|
||||
|
@ -12,6 +12,7 @@
|
||||
"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",
|
||||
@ -28,7 +29,8 @@
|
||||
"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.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)",
|
||||
@ -41,6 +43,7 @@
|
||||
"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",
|
||||
@ -65,6 +68,7 @@
|
||||
"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",
|
||||
|
@ -1,78 +1,126 @@
|
||||
{
|
||||
"ledmatrix": {
|
||||
"visual": "ledmatrix",
|
||||
"breadboardColumnsNeeded": 8,
|
||||
"breadboardStartRow": "h",
|
||||
"pinAllocation": {
|
||||
"type": "auto",
|
||||
"gpioPinsNeeded": [5, 5]
|
||||
"buttonpair": {
|
||||
"simulationBehavior": "buttonpair",
|
||||
"visual": {
|
||||
"builtIn": "buttonpair",
|
||||
"width": 75,
|
||||
"height": 45,
|
||||
"pinDistance": 15,
|
||||
"pinLocations": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 30, "y": 45},
|
||||
{"x": 45, "y": 0},
|
||||
{"x": 75, "y": 45}
|
||||
]
|
||||
},
|
||||
"assemblyStep": 0,
|
||||
"wires": [
|
||||
{"start": ["breadboard", "j", 0], "end": ["GPIO", 5], "color": "purple", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "j", 1], "end": ["GPIO", 6], "color": "purple", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "j", 2], "end": ["GPIO", 7], "color": "purple", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "j", 3], "end": ["GPIO", 8], "color": "purple", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "a", 7], "end": ["GPIO", 9], "color": "purple", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "a", 0], "end": ["GPIO", 0], "color": "green", "assemblyStep": 2},
|
||||
{"start": ["breadboard", "a", 1], "end": ["GPIO", 1], "color": "green", "assemblyStep": 2},
|
||||
{"start": ["breadboard", "a", 2], "end": ["GPIO", 2], "color": "green", "assemblyStep": 2},
|
||||
{"start": ["breadboard", "a", 3], "end": ["GPIO", 3], "color": "green", "assemblyStep": 2},
|
||||
{"start": ["breadboard", "j", 4], "end": ["GPIO", 4], "color": "green", "assemblyStep": 2}
|
||||
]
|
||||
},
|
||||
"buttonpair": {
|
||||
"visual": "buttonpair",
|
||||
"breadboardColumnsNeeded": 6,
|
||||
"breadboardStartRow": "f",
|
||||
"pinAllocation": {
|
||||
"type": "predefined",
|
||||
"pins": ["P13", "P12"]
|
||||
"numberOfPins": 4,
|
||||
"pinDefinitions": [
|
||||
{"target": "P14", "style": "male", "orientation": "-Z"},
|
||||
{"target": "ground", "style": "male", "orientation": "-Z"},
|
||||
{"target": "P15", "style": "male", "orientation": "-Z"},
|
||||
{"target": "ground", "style": "male", "orientation": "-Z"}
|
||||
],
|
||||
"instantiation": {
|
||||
"kind": "singleton"
|
||||
},
|
||||
"assemblyStep": 0,
|
||||
"wires": [
|
||||
{"start": ["breadboard", "j", 0], "end": ["GPIO", 0], "color": "yellow", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "a", 2], "end": "ground", "color": "blue", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "j", 3], "end": ["GPIO", 1], "color": "orange", "assemblyStep": 2},
|
||||
{"start": ["breadboard", "a", 5], "end": "ground", "color": "blue", "assemblyStep": 2}
|
||||
"assembly": [
|
||||
{"part": true},
|
||||
{"pinIndices": [0, 1]},
|
||||
{"pinIndices": [2, 3]}
|
||||
]
|
||||
},
|
||||
"neopixel": {
|
||||
"visual": "neopixel",
|
||||
"breadboardColumnsNeeded": 5,
|
||||
"breadboardStartRow": "h",
|
||||
"pinAllocation": {
|
||||
"type": "factoryfunction",
|
||||
"functionName": "neopixel.create",
|
||||
"pinArgPositions": [0],
|
||||
"otherArgPositions": [1]
|
||||
"simulationBehavior": "neopixel",
|
||||
"visual": {
|
||||
"builtIn": "neopixel",
|
||||
"width": 58,
|
||||
"height": 113,
|
||||
"pinDistance": 9,
|
||||
"pinLocations": [
|
||||
{"x": 10, "y": 0},
|
||||
{"x": 19, "y": 0},
|
||||
{"x": 28, "y": 0}
|
||||
]
|
||||
},
|
||||
"assemblyStep": 0,
|
||||
"wires": [
|
||||
{"start": ["breadboard", "j", 1], "end": "ground", "color": "blue", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "j", 2], "end": "threeVolt", "color": "red", "assemblyStep": 2},
|
||||
{"start": ["breadboard", "j", 3], "end": ["GPIO", 0], "color": "green", "assemblyStep": 2}
|
||||
"numberOfPins": 3,
|
||||
"pinDefinitions": [
|
||||
{"target": {"pinInstantiationIdx": 0}, "style": "solder", "orientation": "+Z"},
|
||||
{"target": "threeVolt", "style": "solder", "orientation": "+Z"},
|
||||
{"target": "ground", "style": "solder", "orientation": "+Z"}
|
||||
],
|
||||
"instantiation": {
|
||||
"kind": "function",
|
||||
"fullyQualifiedName": "neopixel.create",
|
||||
"argumentRoles": [
|
||||
{"pinInstantiationIdx": 0, "partParameter": "pin"},
|
||||
{"partParameter": "mode"}
|
||||
]
|
||||
},
|
||||
"assembly": [
|
||||
{"part": true, "pinIndices": [2]},
|
||||
{"pinIndices": [0, 1]}
|
||||
]
|
||||
},
|
||||
"ledmatrix": {
|
||||
"visual": {
|
||||
"builtIn": "ledmatrix",
|
||||
"width": 105,
|
||||
"height": 105,
|
||||
"pinDistance": 15,
|
||||
"pinLocations": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 15, "y": 0},
|
||||
{"x": 30, "y": 0},
|
||||
{"x": 45, "y": 0},
|
||||
{"x": 105, "y": 105},
|
||||
{"x": 0, "y": 105},
|
||||
{"x": 15, "y": 105},
|
||||
{"x": 30, "y": 105},
|
||||
{"x": 45, "y": 105},
|
||||
{"x": 60, "y": 0}
|
||||
]
|
||||
},
|
||||
"simulationBehavior": "ledmatrix",
|
||||
"numberOfPins": 10,
|
||||
"instantiation": {"kind": "singleton"},
|
||||
"pinDefinitions": [
|
||||
{"target": "P6", "style": "male", "orientation": "-Z", "colorGroup": 0},
|
||||
{"target": "P7", "style": "male", "orientation": "-Z", "colorGroup": 0},
|
||||
{"target": "P8", "style": "male", "orientation": "-Z", "colorGroup": 0},
|
||||
{"target": "P9", "style": "male", "orientation": "-Z", "colorGroup": 0},
|
||||
{"target": "P10", "style": "male", "orientation": "-Z", "colorGroup": 0},
|
||||
{"target": "P12", "style": "male", "orientation": "-Z", "colorGroup": 1},
|
||||
{"target": "P13", "style": "male", "orientation": "-Z", "colorGroup": 1},
|
||||
{"target": "P16", "style": "male", "orientation": "-Z", "colorGroup": 1},
|
||||
{"target": "P19", "style": "male", "orientation": "-Z", "colorGroup": 1},
|
||||
{"target": "P20", "style": "male", "orientation": "-Z", "colorGroup": 1}
|
||||
],
|
||||
"assembly": [
|
||||
{"part": true},
|
||||
{"pinIndices": [0, 1, 2, 3, 4]},
|
||||
{"pinIndices": [5, 6, 7, 8, 9]}
|
||||
]
|
||||
},
|
||||
"speaker": {
|
||||
"numberOfPins": 2,
|
||||
"visual": {
|
||||
"image": "/parts/speaker.svg",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"firstPin": [180, 135],
|
||||
"pinDist": 70,
|
||||
"extraColumnOffset": 1
|
||||
"pinDistance": 70,
|
||||
"pinLocations": [
|
||||
{"x": 180, "y": 135},
|
||||
{"x": 320, "y": 135}
|
||||
]
|
||||
},
|
||||
"breadboardColumnsNeeded": 5,
|
||||
"breadboardStartRow": "f",
|
||||
"pinAllocation": {
|
||||
"type": "auto",
|
||||
"gpioPinsNeeded": 1
|
||||
},
|
||||
"assemblyStep": 0,
|
||||
"wires": [
|
||||
{"start": ["breadboard", "j", 1], "end": ["GPIO", 0], "color": "#ff80fa", "assemblyStep": 1},
|
||||
{"start": ["breadboard", "j", 3], "end": "ground", "color": "blue", "assemblyStep": 1}
|
||||
"pinDefinitions": [
|
||||
{"target": "P0", "style": "male", "orientation": "-Z"},
|
||||
{"target": "ground", "style": "male", "orientation": "-Z"}
|
||||
],
|
||||
"instantiation": {"kind": "singleton"},
|
||||
"assembly": [
|
||||
{"part": true, "pinIndices": [0]},
|
||||
{"pinIndices": [1]}
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user