diff --git a/docs/reference/input.md b/docs/reference/input.md index bd045b28..7e63c4ad 100644 --- a/docs/reference/input.md +++ b/docs/reference/input.md @@ -14,6 +14,7 @@ input.onPinPressed(TouchPin.P0, () => { }); input.buttonIsPressed(Button.A); input.compassHeading(); +input.pinIsPressed(TouchPin.P0); input.temperature(); input.acceleration(Dimension.X); input.lightLevel(); @@ -21,7 +22,6 @@ input.rotation(Rotation.Pitch); input.magneticForce(Dimension.X); input.runningTime(); input.setAccelerometerRange(AcceleratorRange.OneG); -input.pinIsPressed(TouchPin.P0); input.calibrate(); input.onLogoDown(() => { diff --git a/libs/microbit-bluetooth/_locales/microbit-bluetooth-strings.json b/libs/microbit-bluetooth/_locales/microbit-bluetooth-strings.json new file mode 100644 index 00000000..0ce310fb --- /dev/null +++ b/libs/microbit-bluetooth/_locales/microbit-bluetooth-strings.json @@ -0,0 +1,26 @@ +{ + "bluetooth": "Support for additional Bluetooth services.", + "bluetooth.onBluetoothConnected": "Register code to run when the micro:bit is connected to over Bluetooth", + "bluetooth.onBluetoothConnected|block": "on bluetooth connected", + "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", + "bluetooth.onBluetoothDisconnected|block": "on bluetooth disconnected", + "bluetooth.onBluetoothDisconnected|param|body": "Code to run when a Bluetooth connection is lost", + "bluetooth.startAccelerometerService": "Starts the Bluetooth accelerometer service", + "bluetooth.startAccelerometerService|block": "bluetooth accelerometer service", + "bluetooth.startButtonService": "Starts the Bluetooth button service", + "bluetooth.startButtonService|block": "bluetooth button service", + "bluetooth.startIOPinService": "Starts the Bluetooth IO pin service.", + "bluetooth.startIOPinService|block": "bluetooth io pin service", + "bluetooth.startLEDService": "Starts the Bluetooth LED service", + "bluetooth.startLEDService|block": "bluetooth led service", + "bluetooth.startMagnetometerService": "Starts the Bluetooth magnetometer service", + "bluetooth.startMagnetometerService|block": "bluetooth magnetometer service", + "bluetooth.startTemperatureService": "Starts the Bluetooth temperature service", + "bluetooth.startTemperatureService|block": "bluetooth temperature service", + "bluetooth.uartRead": "Reads from the Bluetooth UART service buffer, returning its contents when the specified delimiter character is encountered.", + "bluetooth.uartRead|block": "bluetooth uart read %del=bluetooth_uart_delimiter_conv", + "bluetooth.uartWrite": "Writes to the Bluetooth UART service buffer. From there the data is transmitted over Bluetooth to a connected device.", + "bluetooth.uartWrite|block": "bluetooth uart write %data", + "bluetooth|block": "bluetooth" +} \ No newline at end of file diff --git a/libs/microbit-devices/_locales/microbit-devices-strings.json b/libs/microbit-devices/_locales/microbit-devices-strings.json new file mode 100644 index 00000000..a3098eca --- /dev/null +++ b/libs/microbit-devices/_locales/microbit-devices-strings.json @@ -0,0 +1,26 @@ +{ + "devices": "Control a phone with the BBC micro:bit via Bluetooth.", + "devices.onGamepadButton": "Register code to run when the micro:bit receives a command from the paired gamepad.", + "devices.onGamepadButton|block": "on gamepad button|%NAME", + "devices.onGamepadButton|param|body": "code to run when button is pressed", + "devices.onGamepadButton|param|name": "button name", + "devices.onNotified": "Registers code to run when the device notifies about a particular event.", + "devices.onNotified|block": "on notified|%event", + "devices.onNotified|param|body": "code handler when event is triggered", + "devices.onNotified|param|event": "event description", + "devices.onSignalStrengthChanged": "Registers code to run when the device notifies about a change of signal strength.", + "devices.onSignalStrengthChanged|block": "on signal strength changed", + "devices.onSignalStrengthChanged|param|body": "Code run when the signal strength changes.", + "devices.raiseAlertTo": "Sends an ``alert`` command to the parent device.", + "devices.raiseAlertTo|block": "raise alert to|%property", + "devices.raiseAlertTo|param|event": "event description", + "devices.signalStrength": "Returns the last signal strength reported by the paired device.", + "devices.signalStrength|block": "signal strength", + "devices.tellCameraTo": "Sends a ``camera`` command to the parent device.", + "devices.tellCameraTo|block": "tell camera to|%property", + "devices.tellCameraTo|param|event": "event description", + "devices.tellRemoteControlTo": "Sends a ``remote control`` command to the parent device.", + "devices.tellRemoteControlTo|block": "tell remote control to|%property", + "devices.tellRemoteControlTo|param|event": "event description", + "devices|block": "devices" +} \ No newline at end of file diff --git a/libs/microbit/_locales/microbit-strings.json b/libs/microbit/_locales/microbit-strings.json index 73404cb4..6f719e74 100644 --- a/libs/microbit/_locales/microbit-strings.json +++ b/libs/microbit/_locales/microbit-strings.json @@ -92,7 +92,7 @@ "input.onShake": "Attaches code to run when the device is shaken.", "input.onShake|param|body": "TODO", "input.pinIsPressed": "Get the pin state (pressed or not). Requires to hold the ground to close the circuit.", - "input.pinIsPressed|block": "pin|%NAME|is pressed", + "input.pinIsPressed|block": "pin %NAME|is pressed", "input.pinIsPressed|param|name": "pin used to detect the touch", "input.rotation": "The pitch of the device, rotation along the ``x-axis``, in degrees.", "input.rotation|block": "rotation (°)|%NAME",