Microbit: Blink and Breath (LED Module)

Overview In this project, we combine project 2 and project 3. You will learn how to control the LED on the module to blink two times, then breath two times, circularly. This time we use keyestudio 3W LED module, which has high brightness and can be used as illumination.

Component Required

  • Micro:bit main board*1
  • Keyestudio Micro bit Sensor V2 Shield*1
  • USB Cable*1
  • Keyestudio PIR Motion Sensor*1
  • Keyestudio 3W LED Module*1
  • Dupont jumper wire*3

Component Introduction
Keyestudio 3W LED Module:
This LED module is of high brightness because its lamp beads are 3w. You can apply this module to Arduino or other projects, ideal for Robot or search and rescue application.

For example, intelligent robots can use this module for illumination purposes.
Please note that the LED light can’t be exposed directly to human eyes for safety concerns.


Specifications (3W LED Module)

  • Color temperature: 6000~7000K
  • Luminous flux: 180~210lm
  • Current: 700~750mA
  • Power: 3W
  • Light angle: 140 degree
  • Working temperature: -50~80℃
  • Storage temperature: -50~100℃
  • High-power LED module, controlled by IO port of the microcontroller
  • IO Type: Digital
  • Supply Voltage: 3.3V to 5V

DBFamily vlogs
You can also visit our youtube channel for even more interesting videos at the following link.

GitHub Repo:
You can access the code repo at GitHub at the following link.

Javascript code block

let val = 0
basic.forever(function on_forever() {
    while (val < 1024) {
        val = val + 2
        pins.analogWritePin(AnalogPin.P0, val)
    while (val > 0) {
        val = val - 2
        pins.analogWritePin(AnalogPin.P0, val)

Python code block

val = 0

def on_forever():
    global val
    while val < 1024:
        val = val + 2
        pins.analog_write_pin(AnalogPin.P0, val)
    while val > 0:
        val = val - 2
        pins.analog_write_pin(AnalogPin.P0, val)

Hope you will enjoy the project, see you in the next post.
Abdulsamad & Dad

Author: Danyal
I'm skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting danya.dk