Project tutorial
NERD ALERT! // Smart Doorbell with Arduino

NERD ALERT! // Smart Doorbell with Arduino

We needed a doorbell for our office's freight elevator.

  • 14 respects

Components and supplies

Ph a000066 iso (1) ztbmubhmho
Arduino UNO
Grove 20starter 20kit 20plus 20  20intel c2 ae 20iot2 01
Seeed Grove starter kit plus for Intel Edison
We just need the Buzzer and RGB Backlit LCD modules, as well as the Base Shield with Arduino headers.
09181 03 l
SparkFun Big Red Dome Button
Any ol' button will do.

About this project

We needed a doorbell for our freight elevator. I'm pretty much the only one who uses the freight elevator. So, a NERD ALERT seemed in order...

This one uses a red-backlit LCD display, showing "NERD ALERT!", as well as a typical siren noise, to indicate that somebody needs to come rescue me when I push the button in the elevator.


The circuit

I wanted something quick and dirty to shove in a cardboard box; it didn't need to be small or pretty, and so I used an Arduino 101 with a Seeed Grove kit. (An Uno would do just fine, and work the same way.)

After plugging the Grove base shield into my Arduino, I plugged the buzzer module into pin D3, and the RGB backlit LCD module into an I2C port. I wanted the button to be simple, since I have to run cable all the way from the door to the inside wall-mounted module, so I used a regular button with two wires attached to pin D2 (on the Arduino's standard female headers) and GND. Condensed version:

  • Buzzer module > D3 port
  • LCD module > I2C port
  • Button > Arduino pins D2, GND

Make sure you have the Grove LCD shield set to 5V! If it's on 3V3, the text doesn't show up – just the backlight.

I'm powering the whole thing with a 12V wall plug that feeds into the Arduino's barrel jack. I don't want to use a perfectly good USB cable for something that's just gonna stay plugged into the wall. ¯\_(ツ)_/¯

The code

I cobbled together something fairly disgusting from the Seeed Grove Kit examples on GitHub; you can download my code below. I did have to download and install the Arduino library for the LCD. (To do this, unzip the file and place it in your /Arduino/libraries folder.)

I figured that an alternating minor third (A-C-A-C-A-C...) would do for a siren noise, and I didn't really care what pitch or octave it ended up being, so it's probably a little inaccurate. Being fairly low-pitched, this is actually not that annoying. I may have to do better.

I used the INPUT_PULLUP mode for the button, because that means I don't have to stick a pullup or pulldown resistor in my circuit; it's all handled onboard by the Arduino.

When the button is pushed, the LCD scrolls "NERD ALERT!" on both lines, and it lights up with a red backlight.

Wrapping up

Altogether, this build took me about an hour to debug. Then, I just stuffed the main bits into a cardboard box, ran the button wire to the elevator, and mounted both to their respective walls.


NERD ALERT doorbell codeC/C++
Cobbled together from a couple of Seeed Grove kit examples. Extremely annoying.
  Cobbled together from Grove_Buzzer and Grove_RGB_Backlit_LCD examples
  in the Seeed Grove Kit repo:

  See the full project at

#include <Wire.h>
#include "rgb_lcd.h"

rgb_lcd lcd;
const int buttonPin = 2;     // the number of the pushbutton pin
int buttonState = 0;         // variable for reading the pushbutton status

int speakerPin = 3;          // Grove Buzzer connect to D3
int length = 2;             // the number of notes
char notes[] = "ca"; // a space represents a rest
int beats[] = { 4, 4 };
int tempo = 50;

const int colorR = 255;
const int colorG = 0;
const int colorB = 0;

void playTone(int tone, int duration) {
    for (long i = 0; i < duration * 1000L; i += tone * 2) {
        digitalWrite(speakerPin, HIGH);
        digitalWrite(speakerPin, LOW);

void playNote(char note, int duration) {
    char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
    int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };

    // play the tone corresponding to the note name
    for (int i = 0; i < 8; i++) {
        if (names[i] == note) {
            playTone(tones[i], duration);

void setup() 
    // initialize the pushbutton pin as an input:
    pinMode(buttonPin, INPUT_PULLUP);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    lcd.setRGB(0, 0, 0);

    pinMode(speakerPin, OUTPUT);

void loop() 
    buttonState = digitalRead(buttonPin);

    if (buttonState == LOW) {
      lcd.setRGB(colorR, colorG, colorB);
      lcd.print("NERD ALERT! ");
      for (int i = 0; i < length; i++) {
        if (notes[i] == ' ')
            delay(beats[i] * tempo); // rest
            playNote(notes[i], beats[i] * tempo);
        // pause between notes
        delay(tempo / 2);
    } else {
      lcd.setRGB(0, 0, 0);



Similar projects you might like

Smart Doorbell

Project showcase by Kaustubh Agarwal

  • 150 respects

Smart Home - Smart Rules using ARTIK Cloud & Photon

Project tutorial by Raghavendra Ponuganti

  • 18 respects

Smart Parking System

Project in progress by Md. Khairul Alam

  • 147 respects

Smart Blinds

Project tutorial by Froz3nArcher

  • 69 respects

Octopod: Smart IoT Home/Industry Automation Project

Project tutorial by Saksham Bhutani

  • 56 respects

Smart Battery Charger Multiplexer with Smart Display

Project tutorial by leonzak

  • 25 respects
Add projectSign up / Login