Projects / Busy light for video calls

Busy light for video calls

Beginner1.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. PICO

    Wire the red light

    Long leg through 220 ohms to GP14, short leg to GND.

  2. PICO

    Wire the green light

    Long leg through 220 ohms to GP15, short leg to GND.

  3. PICO

    Wire the button

    GP13 to GND.

  4. PICO

    Run the program

    The green light comes on.

  5. PICO

    Press the button

    Red, then blinking red, then green again.

  6. PICO

    Hold the button for a second

    The lights go dim, hold again for bright.

  7. PICO

    Save as main.py

    So it starts on power-up.

In short

How do you build a busy light for video calls?

A Pico drives a red and a green light by the door with one button that steps through free, busy and do-not-disturb, so people know when you are on a call. You need Raspberry Pi Pico H, LED 5 mm red, LED 5 mm green, Resistor 220 Ω × 2, Tactile push button 6 mm and Breadboard 830 Tie Points. It takes 7 steps and about 90 minutes.

Level
Beginner
Time
About 90 min
Parts
6

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Red LED long leg220 ohm resistor to Pico GP14 pin 19Busy light
Red LED short legPico GND pin 18Return
Green LED long leg220 ohm resistor to Pico GP15 pin 20Free light
Green LED short legPico GND pin 18Return
ButtonPico GP13 pin 17 and GND pin 18Steps the state, hold to dim

Code

This is a small sign that shows what you are doing. The green light means you are free, a steady red light means you are busy and a blinking red light means do not disturb. One button steps through the three states, and holding it for a second switches between bright and dim, which is useful in the evening. The lights are driven with PWM, switching them on and off a thousand times a second so fast that the eye sees only the average brightness, which lets the program dim them without extra parts. Each LED has a 220 ohm resistor to limit the current, and the resistor must always be in series with the LED. The program works by hand and does not connect to anything, so there is no network and no account involved. Put the lights outside the door of the room, or on a shelf where the family can see them, and fix the board and cable so that they cannot be pulled off.

from machine import Pin, PWM
import time

red = PWM(Pin(14))
green = PWM(Pin(15))
red.freq(1000)
green.freq(1000)
button = Pin(13, Pin.IN, Pin.PULL_UP)

LEVELS = [65535, 6000]                              # bright and dim for the evening
level = 0
state = 0                                           # 0 free, 1 busy, 2 do not disturb (blinking)
NAMES = ["Free", "Busy", "Do not disturb"]

def show():
    on = LEVELS[level]
    if state == 0:
        red.duty_u16(0)
        green.duty_u16(on)
    elif state == 1:
        red.duty_u16(on)
        green.duty_u16(0)
    else:
        blink = (time.ticks_ms() // 400) % 2        # red blinks twice a second or so
        red.duty_u16(on if blink else 0)
        green.duty_u16(0)

print("Press: next state. Hold for one second: bright or dim.")
show()
while True:
    if button.value() == 0:
        pressed_at = time.ticks_ms()
        while button.value() == 0:
            time.sleep_ms(10)
        held = time.ticks_diff(time.ticks_ms(), pressed_at)
        if held >= 1000:
            level = 1 - level                        # long press changes the brightness
            print("Dim" if level else "Bright")
        elif held > 30:
            state = (state + 1) % 3
            print(NAMES[state])
    show()
    time.sleep_ms(20)

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
StartGreen on
Press onceRed on
Press againRed blinks
Press againBack to green
Hold the buttonDim, hold again for bright

If it does not work

A light never comes on

Check the long leg is towards the resistor and the pin.

Both lights stay off

Check the GND wires and that the program is running.

Button needs several presses

Check the button wires are firm.

Dim is too dim

Raise the second number in LEVELS.

Nothing after unplugging

Save the program as main.py on the Pico.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the busy light for video calls?

Raspberry Pi Pico H, LED 5 mm red, LED 5 mm green, Resistor 220 Ω × 2, Tactile push button 6 mm and Breadboard 830 Tie Points.

How long does the busy light for video calls take to build?

About 90 minutes for a beginner maker, in 7 steps.

How do I know the busy light for video calls works?

Start: Green on. Press once: Red on. Press again: Red blinks.

A light never comes on: what should I check?

Check the long leg is towards the resistor and the pin.

Both lights stay off: what should I check?

Check the GND wires and that the program is running.

Button needs several presses: what should I check?

Check the button wires are firm.

Dim is too dim: what should I check?

Raise the second number in LEVELS.