Beta updates (#259)
* minor updates * update assets - pin beta to 6.0.24 - replace assets - fix simulator rgbled off block
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"appref": "v6.0.21"
|
||||
"appref": "v6.0.24"
|
||||
}
|
Двоичные данные
docs/calliope/links/thumbnail_didactic_material.gif
До Ширина: | Высота: | Размер: 86 KiB После Ширина: | Высота: | Размер: 44 KiB |
Двоичные данные
docs/calliope/links/thumbnail_projects.gif
До Ширина: | Высота: | Размер: 19 KiB После Ширина: | Высота: | Размер: 9.6 KiB |
Двоичные данные
docs/calliope/links/thumbnail_screenshots.gif
До Ширина: | Высота: | Размер: 3.0 KiB После Ширина: | Высота: | Размер: 3.8 KiB |
Двоичные данные
docs/calliope/links/thumbnail_shop.gif
До Ширина: | Высота: | Размер: 18 KiB После Ширина: | Высота: | Размер: 9.1 KiB |
До Ширина: | Высота: | Размер: 91 KiB После Ширина: | Высота: | Размер: 90 KiB |
До Ширина: | Высота: | Размер: 4.6 KiB После Ширина: | Высота: | Размер: 4.6 KiB |
До Ширина: | Высота: | Размер: 81 KiB После Ширина: | Высота: | Размер: 32 KiB |
До Ширина: | Высота: | Размер: 91 KiB После Ширина: | Высота: | Размер: 95 KiB |
До Ширина: | Высота: | Размер: 5.1 KiB После Ширина: | Высота: | Размер: 4.9 KiB |
До Ширина: | Высота: | Размер: 93 KiB После Ширина: | Высота: | Размер: 32 KiB |
До Ширина: | Высота: | Размер: 7.6 KiB После Ширина: | Высота: | Размер: 4.2 KiB |
До Ширина: | Высота: | Размер: 8.6 KiB После Ширина: | Высота: | Размер: 4.5 KiB |
До Ширина: | Высота: | Размер: 86 KiB После Ширина: | Высота: | Размер: 32 KiB |
До Ширина: | Высота: | Размер: 10 KiB После Ширина: | Высота: | Размер: 3.8 KiB |
До Ширина: | Высота: | Размер: 58 KiB После Ширина: | Высота: | Размер: 61 KiB |
После Ширина: | Высота: | Размер: 61 KiB |
|
@ -14,5 +14,6 @@
|
|||
"public": true,
|
||||
"disablesVariants": [
|
||||
"minidal"
|
||||
]
|
||||
],
|
||||
"icon": "./static/packages/microphone/icon.png"
|
||||
}
|
|
@ -10,11 +10,10 @@
|
|||
"basic.setLedColors|param|color2": "The second LED color.",
|
||||
"basic.setLedColors|param|color3": "The third LED color.",
|
||||
"input": "Events and data from sensors",
|
||||
"input.logoIsPressed": "Get the logo state (pressed or not).",
|
||||
"input.onLogoEvent": "Do something when the logo is touched and released again.",
|
||||
"input.logoIsPressed": "Get the logo state (pressed or not). Calliope mini 3 block.",
|
||||
"input.onLogoEvent": "Do something when the logo is touched and released again. Calliope mini 3 block.",
|
||||
"input.onLogoEvent|param|body": "the code to run when the logo is pressed",
|
||||
"motors": "Blocks to control the onboard motors",
|
||||
"motors.brakeMotor": "Controls one or two motors attached to the board.",
|
||||
"motors.dualMotorPower": "Controls two motors attached to the board.",
|
||||
"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. Switches to single motor mode!",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"TouchTarget.P0|block": "P0",
|
||||
"TouchTarget.P1|block": "P1",
|
||||
"TouchTarget.P2|block": "P2",
|
||||
"TouchTarget.P3|block": "P3",
|
||||
"TouchTargetMode.Capacitive|block": "capacitive",
|
||||
"TouchTargetMode.Resistive|block": "resistive",
|
||||
"WaveShape.Noise|block": "noise",
|
||||
|
@ -30,7 +31,6 @@
|
|||
"input.logoIsPressed|block": "logo is pressed",
|
||||
"input.onLogoEvent|block": "on logo $action",
|
||||
"input|block": "input",
|
||||
"motors.brakeMotor|block": "motor %motor break",
|
||||
"motors.dualMotorPower|block": "motor %motor|at %percent \\%",
|
||||
"motors.motorCommand|block": "motor %command",
|
||||
"motors.motorPower|block": "motor on at %percent \\%",
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
P1 = 101, // MICROBIT_ID_IO_P1
|
||||
//% block="P2"
|
||||
P2 = 102, // MICROBIT_ID_IO_P2
|
||||
//% block="P3"
|
||||
P3 = 103, // MICROBIT_ID_IO_P3
|
||||
//% block="logo"
|
||||
LOGO = 121, // MICROBIT_ID_LOGO
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ enum TouchButtonEvent {
|
|||
|
||||
namespace input {
|
||||
/**
|
||||
* Do something when the logo is touched and released again.
|
||||
* Do something when the logo is touched and released again. Calliope mini 3 block.
|
||||
* @param body the code to run when the logo is pressed
|
||||
*/
|
||||
//% weight=83 blockGap=32
|
||||
|
@ -33,7 +33,7 @@ namespace input {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the logo state (pressed or not).
|
||||
* Get the logo state (pressed or not). Calliope mini 3 block.
|
||||
*/
|
||||
//% weight=58
|
||||
//% blockId="input_logo_is_pressed" block="logo is pressed"
|
||||
|
|
|
@ -24,24 +24,7 @@ namespace motors {
|
|||
//% hidden=1 deprecated=1
|
||||
export function motorCommand(command: MotorCommand) {
|
||||
if(command == MotorCommand.Break) {
|
||||
brakeMotor(Motor.M0_M1)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls one or two motors attached to the board.
|
||||
*/
|
||||
//% blockId=block_break_motor block="motor %motor break"
|
||||
//% weight=80
|
||||
export function brakeMotor(motor: Motor) {
|
||||
|
||||
pins.digitalWritePin(DigitalPin.M_MODE, 1);
|
||||
|
||||
if (motor === Motor.M0 || motor === Motor.M0_M1) {
|
||||
pins.analogWritePin(AnalogPin.M0_SPEED, 0);
|
||||
}
|
||||
if (motor === Motor.M1 || motor === Motor.M0_M1) {
|
||||
pins.analogWritePin(AnalogPin.M1_SPEED, 0);
|
||||
dualMotorPower(Motor.M0_M1, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ declare namespace music {
|
|||
declare namespace input {
|
||||
|
||||
/**
|
||||
* Do something when the logo is touched and released again.
|
||||
* Do something when the logo is touched and released again. Calliope mini 3 block.
|
||||
* @param body the code to run when the logo is pressed
|
||||
*/
|
||||
//% weight=83 blockGap=32
|
||||
|
@ -71,7 +71,7 @@ declare namespace input {
|
|||
function onLogoEvent(action: TouchButtonEvent, body: () => void): void;
|
||||
|
||||
/**
|
||||
* Get the logo state (pressed or not).
|
||||
* Get the logo state (pressed or not). Calliope mini 3 block.
|
||||
*/
|
||||
//% weight=58
|
||||
//% blockId="input_logo_is_pressed" block="logo is pressed"
|
||||
|
|
|
@ -19,6 +19,8 @@ enum class TouchTarget {
|
|||
P1 = MICROBIT_ID_IO_P1,
|
||||
//% block="P2"
|
||||
P2 = MICROBIT_ID_IO_P2,
|
||||
//% block="P3"
|
||||
P3 = MICROBIT_ID_IO_P3,
|
||||
//% block="logo"
|
||||
LOGO = MICROBIT_ID_LOGO
|
||||
};
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
"basic": "Provides access to basic micro:bit functionality.\n\nProvides access to basic micro:bit functionality.\n\nProvides access to basic calliope mini functionality.\n\r\nProvides access to basic calliope mini functionality.",
|
||||
"basic.setLedColors": "Sets the color on the built-in RGB LED. Set to 0 to turn off.",
|
||||
"basic.setLedColors|param|brightness": "The LED brightness in percent.",
|
||||
"basic.setLedColors|param|color1": "The color of the first LED in RGB format (e.g., 0xFF0000 for red).",
|
||||
"basic.setLedColors|param|color2": "The second LED color.",
|
||||
"basic.setLedColors|param|color3": "The third LED color.",
|
||||
"input": "Events and data from sensors",
|
||||
"input.assumeCalibrationCompass": "Obsolete, compass calibration is automatic.",
|
||||
"input.clearCalibrationCompass": "Obsolete, compass calibration is automatic.",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"basic.setLedColors|block": "set LED to %color1=colorNumberPicker %color2=colorNumberPicker %color3=colorNumberPicker",
|
||||
"basic|block": "basic",
|
||||
"input.assumeCalibrationCompass|block": "assume calibration compass",
|
||||
"input.clearCalibrationCompass|block": "clear calibration compass",
|
||||
"input.isCalibratedCompass|block": "is compass calibrated",
|
||||
|
@ -8,8 +10,10 @@
|
|||
"motors.motorCommand|block": "motor %command",
|
||||
"motors.motorPower|block": "motor on at %percent \\%",
|
||||
"motors|block": "motors",
|
||||
"{id:category}Basic": "Basic",
|
||||
"{id:category}Input": "Input",
|
||||
"{id:category}Motors": "Motors",
|
||||
"{id:group}Configuration": "Configuration",
|
||||
"{id:group}RGB LED": "RGB LED",
|
||||
"{id:group}System": "System"
|
||||
}
|
|
@ -15,6 +15,7 @@
|
|||
"microphone.ts",
|
||||
"motors.ts",
|
||||
"parts/dcmotor.svg",
|
||||
"input.cpp"
|
||||
"input.cpp",
|
||||
"rgbled.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Provides access to basic calliope mini functionality.
|
||||
*/
|
||||
namespace basic {
|
||||
|
||||
/**
|
||||
* Sets the color on the built-in RGB LED. Set to 0 to turn off.
|
||||
* @param color1 The color of the first LED in RGB format (e.g., 0xFF0000 for red).
|
||||
* @param color2 The second LED color.
|
||||
* @param color3 The third LED color.
|
||||
* @param brightness The LED brightness in percent.
|
||||
*/
|
||||
//% help=basic/set-led-colors
|
||||
//% blockId=device_set_led_colors
|
||||
//% block="set LED to %color1=colorNumberPicker %color2=colorNumberPicker %color3=colorNumberPicker"
|
||||
//% color1.defl=0xff0000
|
||||
//% color2.defl=0xff0000
|
||||
//% color3.defl=0xff0000
|
||||
//% brightness.defl=20
|
||||
//% expandableArgumentMode="toggle"
|
||||
//% weight=10
|
||||
//% group="RGB LED"
|
||||
//% inlineInputMode=inline
|
||||
//% hidden=1
|
||||
export function setLedColors(color1: number, color2: number, color3: number, brightness: number = 20) {
|
||||
setLedColorDal(color1);
|
||||
}
|
||||
|
||||
}
|
|
@ -148,7 +148,7 @@
|
|||
"yottaTarget": "calliope-mini-classic-gcc@https://github.com/calliope-mini/target-calliope-mini-classic-gcc#v1.2.4",
|
||||
"yottaCorePackage": "microbit",
|
||||
"githubCorePackage": "calliope-mini/microbit",
|
||||
"gittag": "v2.2.0-rc6-calliope.rc4",
|
||||
"gittag": "v2.2.0-rc6-calliope.rc5",
|
||||
"serviceId": "calliope",
|
||||
"dockerImage": "pext/yotta:gcc5"
|
||||
},
|
||||
|
@ -174,7 +174,7 @@
|
|||
"codalTarget": {
|
||||
"name": "codal-microbit-v2",
|
||||
"url": "https://github.com/calliope-edu/codal-microbit-v2",
|
||||
"branch": "v0.2.57-calliope-1.5",
|
||||
"branch": "v0.2.63-calliope-rc1",
|
||||
"type": "git"
|
||||
},
|
||||
"codalBinary": "MICROBIT",
|
||||
|
|
|
@ -22,7 +22,9 @@ namespace pxsim.basic {
|
|||
}
|
||||
|
||||
export function turnRgbLedOff() {
|
||||
board().rgbLedLeftState = 0;
|
||||
board().rgbLedState = 0;
|
||||
board().rgbLedRightState = 0;
|
||||
runtime.queueDisplayUpdate()
|
||||
}
|
||||
}
|
|
@ -1344,7 +1344,7 @@ namespace pxsim.visuals {
|
|||
"Button A", "Button B",
|
||||
"GND", "GND", "GND", "+3v3",
|
||||
"P0", "P2", "C4", "C6", "C8", "C10", "C12", "C14", "C16 (A1 RX)", "C18", "C20 (A0 SDA)",
|
||||
"P1", "P3", "C5", "C7", "C9", "C11", "C13", "C15", "C17 (A1 TX)", "C19",
|
||||
"P1", "P3", "C5", "C7", "C9", "C11", "C13", "C15", "C17 (A1 TX)", "C19 (A0 SCL)",
|
||||
"Motor 0 -", "Motor 1 -", "MOTOR 0 +", "MOTOR 1 +", "MOTOR VM+",
|
||||
"GND", "+3v3", "C20 (A0 SDA)", "C19 (A0 SCL)",
|
||||
"C16 (A1 RX)", "C17 (A1 TX)", "+3v3", "GND"
|
||||
|
|