E1c26033 3dfe 4809 b9ff 4f1c1c831658


Virtual dad

by jdany

Published on November 28, 2015

Put the 'Wireless transmitter + Sound trigger + Arduino' circuit in dad's office. Put the 'Wireless receiver + mp3 player + speaker' circuit in kids' play room. Copy dad's message (e.g. 'Too loud!') to mp3 player. Modify the value of 'dadToleranceLevel' in the following Arduino sketch if needed:

int xmitter = 5;
int soundsensor = A1;

char buf[50];
int onCount = 0;

int dadToleranceLevel = 5;  //higher number == higher tolerance

void setup()
  pinMode(xmitter, OUTPUT);

void loop()
  int bSoundOn = digitalRead(soundsensor);

  if (bSoundOn)
    sprintf(buf, "sound on, cnt %d", onCount);
    if (onCount > dadToleranceLevel)
      sprintf(buf, "sound still on, cnt %d", onCount);
      digitalWrite(xmitter, HIGH);
      onCount = 0;
    sprintf(buf, "sound off");
    analogWrite(xmitter, 0);
    onCount = 0;


Duration: 1 hr

Related Projects

Sound Triggered Bubble Machine

Make a bubble machine triggered by sound! When you make a sound, a huge bubble is created! :D Watch video and learn how ...

Arduino Basics 4

Blinky's revenge: http://discuss.littlebits.cc/t/introduction-to-arduino-programming-4-blinkys-revenge/22240As in the other t...


INVENT A CREATURE THAT CRAWLS ACROSS THE CARPET like a hungry inchworm racing for an apple. See how quickly it can creep arou...