Purpose of this project:
In this project an automatic lighting system with Micro:bit will be realized. It consists of turning on an LED lamp when the room becomes dark and turning it off otherwise.. It mainly uses a light sensor KY-018.
Required components
- Micro:bit board
- light sensor KY-018
- 1 resistance 220Ω
- 1 red LED
- connecting wires
- GPIO expansion board
Mounting
To perform the assembly:
- the red LED terminal (+) can be connected to pin P0 of the Micro:bit
- the red LED terminal (-) to pin GND of the Micro:bit
- the DO pin of the light sensor to pin P1 of the Micro:bit board.
- the VCC pin of the light sensor at the 3.3V pin of the Micro:bit board.
- GND pin of light sensor to GND pin of Micro:bit board .
The mounting methods are numerous and here are some examples:
Makecode program
Here is the makecode program of the automatic lighting system:
AsepaEnali 10-02-2222
In my opinion the theme is rather interesting. I suggest all to take part in discussion more actively.