Welcome to MicroBit labs! Make sure to have Bluetooth on and ScratchLink installed.
CREDIT @Goldking9- Code