Using Camera in the MakeCode Micro:Bit Simulator

I am planning to make a face Recognition system using makeCoder micro:bit for a coding competition. Now, in the competition, it will be convenient to send the simulator code and demonstration other than hardware. So are there any ways in which I can access the computer camera for the Face Recognition and perform the demonstration in the simulator itself?

This isn’t using MakeCode, but the “How to Train Your Robot” curriculum, which is described here: , has a Scratch-based editor that uses the micro:bit and can do webcam image recognition.

To go to the Scratch blocks:

They can use the Web cam and Google’s Teachable Machine for image recognition. You can use just the Scratch environment if you want to demonstrate things entirely in a simulation.

If you want it to interact with a real micro:bit but not use the CuteBot robot that the blocks are designed for, you can change the code and make it do other things. You can download the micro:bit .hex files from here: and open them in MakeCode. Then remove/replace the CuteBot blocks with the code you want the micro:bit to do for that “command”.
Here’s the code that works for a V2 micro:bit: .