Theory
📟⚙️ 10. Light: Making a light meter
🔦 Welcome to “Light Craft”! 🌟
🔍 Explore the world of light & technology with micro: bit
🎨 Unravel secrets of light through code & electronics
🌌 Create mesmerizing night lights & dynamic flashing lights
👩💻 Beginner-friendly or for experienced coders
🤝 Hands-on experience in sensing & manipulating light
🌟 Comprehensive exploration of light using micro: bit
🌈 Shape & control the glow with micro: bit
✨ Let’s begin this luminous adventure! 🚀
Making a light meter:
🔆 Activity: Light Sensor Exploration
- 🤖 Using Micro: bits built-in light sensor.
- 💡 LEDs on Microbit function as sensors and lights.
- 🔄 6 LEDs take light readings.
- 📊 System calculates average to gauge room light.
- 🏠 Indicates room brightness level.
🔆 Light sensors used in many devices
- Turn on/off based on darkness.
- Night lights, mobile phones utilize them.
👩💻 Start at makecode.microbit.org
- Create new project.
- Delete ‘on start’ and ‘forever’ blocks.
🔴 Create and define variable
- Variable = ‘level’
- Set initial value to 0
🟣 Define variable
- Use ‘light level’ command from purple input menu.
Next, we need to tell the system when we want this to happen. Let’s use the
- 🔘 Locate “on button A pressed” command.
- 🔍 Found in the purple menu.
- 🖱️ Click and drag “on button A pressed” to your screen.
- 🔧 Place “set level to light level” block underneath.
- 🔵 Go to the basic menu.
- 🔄 Drag ‘show number’ under ‘set level to light level’ command.
- 🔄 Replace ‘0’ with ‘level’ in red variables menu.
- 🖼️ Drag ‘level’ command to replace ‘0’.
📥 Download programme onto Micro: bit.
🅰️ Press A button
- 💡 Reading of 0 = pitch black
- 💡 Reading of 255 = really bright
- 🏠 Find darkest room & brightest room
- 🔦 Shine torch on Microbit
- 🔍 Move torch closer/further from LEDs