+21622886281
KY-018 Micro:bit Project

Automatic lighting system with Micro:bit

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:

Mounting(1)

Mounting (2)

Makecode program

Here is the makecode program of the automatic lighting system:




1 commentaire

AsepaEnali 10-02-2222

In my opinion the theme is rather interesting. I suggest all to take part in discussion more actively.


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top