Hi
if i use the Micro:Bit Edge Connector extension in a MakeCode Arcade project - as soon as i call any of the blocks the code freezes…
This was first reported over a year ago on GitHub…
opened 01:52PM - 28 Jul 21 UTC
bug
p2
extension
hardware
**Describe the bug**
edge connection extension blocks freezes code
**To Repr… oduce**
import the edge connection blocks in to arcade for using the pins from BBC micro:bit
The test code I was using was as follows
```
controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
pins.P2.digitalWrite(true)
pause(500)
pins.P2.digitalWrite(false)
pause(500)
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
music.baDing.play()
})
let mySprite = sprites.create(img`
. . . . . . . . . . b 5 b . . .
. . . . . . . . . b 5 b . . . .
. . . . . . b b b b b b . . . .
. . . . . b b 5 5 5 5 5 b . . .
. . . . b b 5 d 1 f 5 5 d f . .
. . . . b 5 5 1 f f 5 d 4 c . .
. . . . b 5 5 d f b d d 4 4 . .
. b b b d 5 5 5 5 5 4 4 4 4 4 b
b d d d b b d 5 5 4 4 4 4 4 b .
b b d 5 5 5 b 5 5 5 5 5 5 b . .
c d c 5 5 5 5 d 5 5 5 5 5 5 b .
c b d c d 5 5 b 5 5 5 5 5 5 b .
. c d d c c b d 5 5 5 5 5 d b .
. . c b d d d d d 5 5 5 b b . .
. . . c c c c c c c c b b . . .
. . . . . . . . . . . . . . . .
`, SpriteKind.Player)
forever(function () {
controller.moveSprite(mySprite, 100, 100)
})
```
The sprite moves around, buzzer beeps when button A is pressed. on pin2 we have a small motor controlled via a FET. I expected the pin to go high wait and go low, to turn the motor on and off after 500 milliseconds. Once I press button B the code locks up and can not control the sprite or sound the buzzer.
I'm using the digital write high and low blocks as could not find the default pin for the vibrate block with regards to using the micro:bit hardware
Anyone know if any progress on this has or will be made please?
I have projects in “standard” MakeCode for Micro:Bit that i should like to enhance using MakeCode Arcade but to do this i will need access to the pins on the Edge Connector from within Arcade
Thanks