Control DC motor and servo motor to collect an object.
Use micro:bit to detect light level
Calculate threshold value
Collect ambient light intensity data applied to the LED. Returns value in a range of 0 (dark) to 255 (bright).
If the returned value of condition check is TRUE, then perform the following actions. Otherwise, continue the following check of conditions.
Return TRUE or FALSE based on the comparison of data provided.
Light Level
A light sensor generates an output signal indicating the intensity of light.
The light sensor is a passive sensor that convert this “light energy” into an electrical signal output. Light sensors are more commonly known as “Photoelectric Devices” or “Photo Sensors” because they convert light energy (photons) into electricity (electrons).
Micro:bit are using some light-emitting diodes or LEDs on the micro:bit to detect light. LEDs can be used in Reverse. If you shine a light on an LED, it will produce a very small amount of current and we can use that to crudely measure how bright a room is.