⬡ AIR · Leaving Land · Lesson 2 of 5 ⬡
MICRO:BIT LIGHT METER
Turn the LED screen into a sensor that reads the light around you.
📢 The New Horizon has left land. Below deck there are no windows, so how does the crew know whether it is bright day or full dark outside? Your micro:bit can answer that, because the same LED screen that shows pictures can also read the light falling on it.
Open your worksheet
Click the assignment link on this page to open your own copy of the worksheet in Google. It has the build steps and the questions you will answer.
Build the light meter
Follow the worksheet to build your light meter in MakeCode, then download it to your micro:bit.
Test it in two places
Hold it under the classroom lights, then cup your hand over the screen. Watch the number change. If it does not change, check that you are reading light level and not something else.
Answer and turn in
Answer every question on the worksheet and turn it in here.
Do not see a worksheet when you open this assignment? Ask your teacher for it before you start.
🔦 You have done half of this already
In Coding Adventures you wired inputs to outputs: press button A, show a picture. The light sensor is just another input.
The only new part is what comes back. A button gives you pressed or not pressed. The light sensor gives you a number from 0 to 255, so your code has to decide how dark is dark enough.
✅ By the end of this lesson:
✓ Built my light meter and downloaded it to the micro:bit
✓ Tested it in bright light and with the screen covered
✓ Answered every question and turned in my worksheet
📢 El New Horizon ya salió de tierra. Abajo, en la bodega, no hay ventanas, entonces ¿cómo sabe la tripulación si afuera es de día o ya es de noche? Tu micro:bit te lo puede decir, porque la misma pantalla de LEDs que muestra dibujos también puede leer la luz que le cae encima.
Abre tu hoja de trabajo
Haz clic en el enlace de la tarea en esta página para abrir tu propia copia de la hoja de trabajo en Google. Ahí vienen los pasos y las preguntas que vas a contestar.
Construye el medidor de luz
Sigue la hoja de trabajo para armar tu medidor de luz en MakeCode y descárgalo a tu micro:bit.
Pruébalo en dos lugares
Ponlo debajo de las luces del salón y luego tapa la pantalla con la mano. Fíjate cómo cambia el número. Si no cambia, revisa que estés leyendo light level y no otra cosa.
Contesta y entrega
Contesta todas las preguntas de la hoja de trabajo y entrégala aquí.
¿No ves ninguna hoja de trabajo al abrir esta tarea? Pídesela a tu maestra antes de empezar.
🔦 Ya hiciste la mitad de esto
En Coding Adventures conectaste entradas con salidas: aprietas el botón A y sale un dibujo. El sensor de luz es otra entrada más.
Lo único nuevo es lo que regresa. Un botón te dice apretado o no apretado. El sensor de luz te da un número del 0 al 255, así que tu código tiene que decidir qué tan oscuro cuenta como oscuro.
✅ Al final de esta lección:
✓ Construí mi medidor de luz y lo descargué al micro:bit
✓ Lo probé con mucha luz y con la pantalla tapada
✓ Contesté todas las preguntas y entregué mi hoja de trabajo