You can find several ready-made projects to try here: https://makecode.microbit.org/projects
There is plenty of documentation for all of the code to be found here: https://makecode.microbit.org/reference
Many of the snippets below are based on the projects in the link above, with some additional features.
You can run the Makecode editor using this link: https://makecode.microbit.org
Click the 'New Project' button, then switch from 'Blocks' to 'Javascript', remove all lines (if any) then copy 'n' paste the code from a snippet below, then click 'Download' and 'Save As' or 'Save' (depending on your browser) and store the code on your Micro:bit.
They are saved as Javascript, because there is no easy way to store Block based code, but once you copy 'n' paste the Javascript into your Makecode editor, you can usually switch back to Blocks mode again.
// when button A is pressed input.onButtonPressed(Button.A, function () { radio.setTransmitPower(1) radio.setGroup(12) started = 1 }) // when button B is pressed input.onButtonPressed(Button.B, function () { clock = Math.randomRange(0, 8) started = 0 basic.showNumber(clock) }) // when a number is received on radio radio.onReceivedNumber(function (receivedNumber) { if (started == 1) { // advance clock to catch up neighbors clock += 1 } }) // when microbit is first started let started = 0 let clock = 0 clock = Math.randomRange(0, 8) started = 0 basic.showNumber(clock) // this loop runs continuously after microbit is started basic.forever(function () { if (started == 1) { // if clock hits noon, flash the screen if (clock >= 8) { // notify neighbors radio.sendNumber(0) // flash game.addScore(1) // wait for 2 ticks basic.pause(200) // reset the clock clock = 0 } else { // just wait a bit basic.pause(100) // increment the clock clock += 1 } } })