Hi @greszkev,
Great question! The documentation for onBoardEvent() says
onBoardEvent()
works very similar toonEvent()
in App Lab, but responds to input from the left button, right button, toggle switch, sound sensor, light sensor, temperature sensor, and accelerometer components on the board. The buttons, switch, and sensors all have different events they can respond to.
(emphasis added by me)
I’m assuming the microphone is the sound sensor, and the compass may be the accelerometer? I do not have a micro:bit in front of me to test it out.
I did some digging on the forum (Thread 1 and Thread 2). Unfortunately it looks as though the Code.org environment does not support playing sound, or at least it did not a few years ago. If you do some experimenting & find out otherwise, please let us know!
Best,
–Michael K.