The Kitronik Microbit Lamp allows demonstrations or student projects for simple code to operate the lamp once the light reading falls below a certain level. By setting the threshold accordingly, it can be tested by placing it near to a light or by shining a torch towards or away from the light sensor that sits at the top of the small device. It easily affixes to the microbit using some provided mini bolts/nuts.
The affixing of the microbit would be better done in advance of students using this project.
One simple way to use this would be in 'projection' mode in which pupils come to the front to drag/drop the code blocks and another pupil gets to try it out.
https://www.kitronik.co.uk/5643-lampbit-street-light-for-bbc-microbit.html
Example Code:
https://makecode.microbit.org/_fgEa2sUbsDJd