diff --git a/docs/calliope/firststeps/firstSteps.md b/docs/calliope/firststeps/firstSteps.md index 111f8ff0..a35ed168 100644 --- a/docs/calliope/firststeps/firstSteps.md +++ b/docs/calliope/firststeps/firstSteps.md @@ -14,7 +14,7 @@ For example drag and drop some blocks and try your program on the Simulator with Click the Download button in the editor. This will download a 'hex' file, which is a compact format of your program that your mini can read. Once the file has been downloaded, just copy it to your Calliope mini just like copying a file to a USB stick. -![Connecting Image](/docs/calliope/firststeps/connecting.jpg) +![Connecting Image](/calliope/firststeps/connecting.jpg) ## Introduction @unplugged @@ -32,7 +32,7 @@ Be careful to insure that the ridge on the plug is facing upwards. If the plug slides easily into the socket then you are attaching it correctly. Otherwise, turn the plug round and re-insert it into the socket. Slide it to "on“ and your Calliope mini is powered by the batteries. -![Powering Image](/docs/calliope/firststeps/powerItUp.png) +![Powering Image](/calliope/firststeps/powerItUp.png) ## Introduction @unplugged diff --git a/docs/projects.md b/docs/projects.md index f7ae1ffb..bd0d0e2d 100644 --- a/docs/projects.md +++ b/docs/projects.md @@ -5,18 +5,18 @@ { "name": "First Steps", "url": "/calliope/firststeps", - "imageUrl": "/docs/calliope/firststeps/connecting.jpg", - "largeImageUrl": "/docs/calliope/firststeps/firstSteps.jpg" + "imageUrl": "/calliope/firststeps/connecting.jpg", + "largeImageUrl": "/calliope/firststeps/firstSteps.jpg" }, { "name": "Tutorials", "url": "/calliope/tutorials", - "imageUrl": "/docs/calliope/tutorials/01_flashing_heart.gif" + "imageUrl": "/calliope/tutorials/01_flashing_heart.gif" }, { "name": "Calliope Links", "url": "/calliope/links", - "imageUrl": "/docs/calliope/links/thumbnail_shop.gif" + "imageUrl": "/calliope/links/thumbnail_shop.gif" } ] ``` diff --git a/docs/projects/coin-flipper.md b/docs/projects/coin-flipper.md index 7c9464e5..f82a7480 100644 --- a/docs/projects/coin-flipper.md +++ b/docs/projects/coin-flipper.md @@ -4,7 +4,7 @@ Let's create a coin flipping program to simulate a real coin toss. We'll use icon images to represent a ``heads`` or ``tails`` result. -![Simulating coin toss](/docs/calliope/tutorials/08_coin_flipper_animation.gif) +![Simulating coin toss](/calliope/tutorials/08_coin_flipper_animation.gif) ## Step 1 diff --git a/docs/projects/dice.md b/docs/projects/dice.md index 3de037ea..5ed9faf6 100644 --- a/docs/projects/dice.md +++ b/docs/projects/dice.md @@ -5,7 +5,7 @@ Let's turn the @boardname@ into a dice! (Want to learn how the accelerometer works? [Watch this video](https://youtu.be/byngcwjO51U)). -![A mini dice](/docs/calliope/tutorials/04_dice_animation.gif) +![A mini dice](/calliope/tutorials/04_dice_animation.gif) ## Step 1 @fullscreen diff --git a/docs/projects/flashing-heart.md b/docs/projects/flashing-heart.md index a8083b80..2dca5dd0 100644 --- a/docs/projects/flashing-heart.md +++ b/docs/projects/flashing-heart.md @@ -6,13 +6,13 @@ Learn how to use the LEDs and make a flashing heart! (Want to learn how lights work? [Watch this video](https://youtu.be/qqBmvHD5bCw)). -![Heart shape in the LEDs](/docs/calliope/tutorials/01_flashing_heart_animation.gif) +![Heart shape in the LEDs](/calliope/tutorials/01_flashing_heart_animation.gif) ## Step 1 @fullscreen Place the ``||basic:show leds||`` block in the ``||basic:forever||`` block and draw a heart. -![An animation that shows how to drag a block and paint a heart](/docs/calliope/tutorials/add_show_led.gif) +![An animation that shows how to drag a block and paint a heart](/calliope/tutorials/add_show_led.gif) ## Step 2 @fullscreen @@ -39,7 +39,7 @@ basic.forever(function() { Look at the virtual @boardname@, you should see the heart and your drawing blink on the screen. -![Heart shape in the LEDs](/docs/calliope/tutorials/01_flashing_heart_animation.gif) +![Heart shape in the LEDs](/calliope/tutorials/01_flashing_heart_animation.gif) ## Step 4 @fullscreen diff --git a/docs/projects/love-meter.md b/docs/projects/love-meter.md index df09b3a0..84e25a75 100644 --- a/docs/projects/love-meter.md +++ b/docs/projects/love-meter.md @@ -5,7 +5,7 @@ Make a love meter, how sweet! The @boardname@ is feeling the love, then sometimes not so much! Tell everyone who you are. Show you name on the LEDs. -![Love meter banner message](/docs/calliope/tutorials/05_love_meter_animation.gif) +![Love meter banner message](/calliope/tutorials/05_love_meter_animation.gif) ## Step 1 diff --git a/docs/projects/mini-chat.md b/docs/projects/mini-chat.md index c2aaa8a5..4695e152 100644 --- a/docs/projects/mini-chat.md +++ b/docs/projects/mini-chat.md @@ -2,7 +2,7 @@ ## Introduction @unplugged -![Two @boardname@ connected via radio](/docs/calliope/tutorials/06_mini_chat_animation.gif) +![Two @boardname@ connected via radio](/calliope/tutorials/06_mini_chat_animation.gif) Use the **radio** to send and receive messages with other @boardname@. diff --git a/docs/projects/multi-dice.md b/docs/projects/multi-dice.md index 7c3d9b1f..4d79de69 100644 --- a/docs/projects/multi-dice.md +++ b/docs/projects/multi-dice.md @@ -2,7 +2,7 @@ ## Introduction @unplugged -![Multiple @boardname@ throwing a dice](/docs/calliope/tutorials/10_multi_dice_animation.gif) +![Multiple @boardname@ throwing a dice](/calliope/tutorials/10_multi_dice_animation.gif) Build a multi-player dice game using the **radio**. The **radio** blocks let you send wireless messages between a @boardname@ and another @boardname@. diff --git a/docs/projects/name-tag.md b/docs/projects/name-tag.md index c2cae4d2..3f32ade3 100644 --- a/docs/projects/name-tag.md +++ b/docs/projects/name-tag.md @@ -4,7 +4,7 @@ Tell everyone who you are. Show you name on the LEDs. -![Name scrolling on the LEDs](/docs/calliope/tutorials/02_nametag_animation.gif) +![Name scrolling on the LEDs](/calliope/tutorials/02_nametag_animation.gif) ## Step 1 @fullscreen @@ -20,7 +20,7 @@ basic.forever(() => { Look at the simulator and make sure it shows your name on the screen. -![Name scrolling on the LEDs](/docs/calliope/tutorials/02_nametag_animation.gif) +![Name scrolling on the LEDs](/calliope/tutorials/02_nametag_animation.gif) ## Step 3 @fullscreen diff --git a/docs/projects/rock-paper-scissors.md b/docs/projects/rock-paper-scissors.md index 7a3465f6..3fc332ed 100644 --- a/docs/projects/rock-paper-scissors.md +++ b/docs/projects/rock-paper-scissors.md @@ -2,7 +2,7 @@ ## Introduction @unplugged -![Animation of the Rock Paper Scissors game](/docs/calliope/tutorials/07_stone_paper_scissors_animation.gif) +![Animation of the Rock Paper Scissors game](/calliope/tutorials/07_stone_paper_scissors_animation.gif) Use the accelerometer and the screen to build a **Rock Paper Scissors** game that you can play with your friends! diff --git a/docs/projects/smiley-buttons.md b/docs/projects/smiley-buttons.md index 43257e76..271560f6 100644 --- a/docs/projects/smiley-buttons.md +++ b/docs/projects/smiley-buttons.md @@ -5,7 +5,7 @@ Code the buttons on the @boardname@ to show that it's happy or sad. (Want to learn how the buttons works? [Watch this video](https://youtu.be/t_Qujjd_38o)). -![Pressing the A and B buttons](/docs/calliope/tutorials/03_smiley_button_animation.gif) +![Pressing the A and B buttons](/calliope/tutorials/03_smiley_button_animation.gif) ## Step 1 @fullscreen diff --git a/docs/projects/snap-the-dot.md b/docs/projects/snap-the-dot.md index 91ba3222..715c7260 100644 --- a/docs/projects/snap-the-dot.md +++ b/docs/projects/snap-the-dot.md @@ -2,7 +2,7 @@ ## Introduction @unplugged -![Animation of the snap the dot game](/docs/calliope/tutorials/09_snap_the_dot_animation.gif) +![Animation of the snap the dot game](/calliope/tutorials/09_snap_the_dot_animation.gif) Snap the dot is a game of skill where the player has to press **A** exactly when the dot reaches the center of the screen. diff --git a/editor/extension.tsx b/editor/extension.tsx index 0c838415..30d282db 100644 --- a/editor/extension.tsx +++ b/editor/extension.tsx @@ -897,7 +897,7 @@ function webUsbPairDialogAsync(confirmAsync: (options: any) => Promise):
{lf("First time here?")}
{lf("You must have version 0249 or above of the firmware")}
- +
{lf("Check your firmware version here and update if needed")} @@ -909,7 +909,7 @@ function webUsbPairDialogAsync(confirmAsync: (options: any) => Promise):
- +
@@ -924,7 +924,7 @@ function webUsbPairDialogAsync(confirmAsync: (options: any) => Promise):
- +
@@ -990,7 +990,7 @@ function showUploadInstructionsAsync(fn: string, url: string, confirmAsync: (opt
- +
@@ -1005,7 +1005,7 @@ function showUploadInstructionsAsync(fn: string, url: string, confirmAsync: (opt
- +
diff --git a/faviconDescription.json b/faviconDescription.json index d4eb3879..a3fa76c9 100644 --- a/faviconDescription.json +++ b/faviconDescription.json @@ -1,6 +1,6 @@ { "masterPicture": "docs/static/microbit.simplified.svg", - "iconsPath": "/docs/static/icons", + "iconsPath": "/static/icons", "design": { "ios": { "pictureAspect": "backgroundAndMargin", diff --git a/libs/core/motors.cpp b/libs/core/motors.cpp index 6e2f1903..c6e2733b 100644 --- a/libs/core/motors.cpp +++ b/libs/core/motors.cpp @@ -27,6 +27,7 @@ namespace motors { */ //% blockId=motor_on block="motor on at %percent" //% parts=dcmotor weight=90 blockGap=8 + //% percent.shadow="speedPicker" void motorPower(int power) { uBit.soundmotor.motorOn(power); } @@ -48,6 +49,7 @@ namespace motors { * Controls two motors attached to the board. Switches to dual-motor mode! */ //% blockId=block_dual_motor block="motor %motor|at %percent" + //% percent.shadow="speedPicker" //% weight=80 void dualMotorPower(Motor motor, int duty_percent) { switch(motor) { diff --git a/libs/core/pinscompat.ts b/libs/core/pinscompat.ts index aa20b6e9..2a728f78 100644 --- a/libs/core/pinscompat.ts +++ b/libs/core/pinscompat.ts @@ -125,13 +125,13 @@ namespace pins { * Pin P1 */ //% fixedInstance whenUsed - export const P1: PwmPin = new MicrobitPin(DigitalPin.P1); + export const P1: AnalogInPin = new MicrobitPin(DigitalPin.P1); /** * Pin P2 */ //% fixedInstance whenUsed - export const P2: PwmPin = new MicrobitPin(DigitalPin.P2); + export const P2: AnalogInPin = new MicrobitPin(DigitalPin.P2); /** * Pin P3 diff --git a/libs/core/shims.d.ts b/libs/core/shims.d.ts index e8172511..6f89f2d4 100644 --- a/libs/core/shims.d.ts +++ b/libs/core/shims.d.ts @@ -599,7 +599,8 @@ declare namespace motors { * @param power %percent of power sent to the motor. Negative power goes backward. eg: 50 */ //% blockId=motor_on block="motor on at %percent" - //% parts=dcmotor weight=90 blockGap=8 shim=motors::motorPower + //% parts=dcmotor weight=90 blockGap=8 + //% percent.shadow="speedPicker" shim=motors::motorPower function motorPower(power: int32): void; /** @@ -613,6 +614,7 @@ declare namespace motors { * Controls two motors attached to the board. Switches to dual-motor mode! */ //% blockId=block_dual_motor block="motor %motor|at %percent" + //% percent.shadow="speedPicker" //% weight=80 shim=motors::dualMotorPower function dualMotorPower(motor: Motor, duty_percent: int32): void; } diff --git a/sim/visuals/microbit.ts b/sim/visuals/microbit.ts index f9dcb3b3..19e79fd5 100644 --- a/sim/visuals/microbit.ts +++ b/sim/visuals/microbit.ts @@ -145,622 +145,602 @@ namespace pxsim.visuals { } `; const BOARD_SVG = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ` const pinNames = [ "BTN_A", "BTN_B", @@ -768,7 +748,7 @@ namespace pxsim.visuals { "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_P18", "C_P1", "C_P3", "C_P5", "C_P7", "C_P9", "C_P11", "C_P13", "C_P15", "C_P17", "C_P19", - "M_GND1", "M_GND2", "M_OUT1", "M_OUT2", "M_VM", + "M_GND1", "M_GND2", "M_GND3", "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" ]; @@ -778,7 +758,7 @@ namespace pxsim.visuals { "GND", "GND", "GND", "GND", "+3v3", "+3v3", "C0", "C2", "C4", "C6", "C8", "C10", "C12", "C14", "C16", "C18", "C1", "C3", "C5", "C7", "C9", "C11", "C13", "C15", "C17", "C19", - "GND", "GND", "MOTOR B", "MOTOR A", "MOTOR VM", + "GND", "GND", "GND", "MOTOR B", "MOTOR A", "MOTOR VM", "GND", "+3v3", "C18, I2C - SDA", "C19, I2C - SCL", "C16, Serial - RX", "C17, Serial - TX", "+3v3", "GND" ]; @@ -1009,6 +989,10 @@ namespace pxsim.visuals { "M_GND2": [ 156.46077728271484, 141.70752716064453 + ], + "M_GND3": [ + 168.83547210693360, + 141.70752716064453 ], "M_OUT1": [ 144.08607482910156,