About This Project
Trigger a light automatically when the PIR sensor detects motion. This project belongs to Chapter 26 (Infrared Motion Sensor) of the Freenove Ultimate Starter Kit for micro:bit (FNK0045). Open the official guide above for the full wiring diagram, MakeCode blocks and MicroPython code.
🔧 This project is hosted on docs.freenove.com. Click the button above to open the full guide with circuit diagrams, block code and Python code. Everything you need — wiring, code and explanations — is on that page.
What You Will Learn
- Trigger a light automatically when the PIR sensor detects motion.
- Wire a real circuit on a breadboard using the infrared motion sensor components.
- Follow official wiring diagrams and choose between block code or Python (MicroPython).
How to Get Started
1. Click Open Official Freenove Guide above to go to the official documentation page.
2. Check the component list and wire up the circuit exactly as shown in the diagram.
3. Choose MakeCode (block code) or Python with Mu — both are provided on the page.
4. Flash the code to your micro:bit and test the circuit, adjusting wiring if needed.
5. Read the code explanation on the page to understand exactly how it works, then try the extensions.