Skip to content

Sociable Objects: a nap doorbell

Nap doorbells are designed for nappers. They will not actually ring and wake you up unless it is a real emergency. This project is developed in collaboration with Adi and Asli.

Doorbell for insistent visitors from My Journey on Vimeo.

Switch Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
int BUTTON = 2;
int GREEN = 12;
int RED = 13;

void setup()
{
 pinMode(BUTTON, INPUT);
 pinMode(GREEN, OUTPUT);
 pinMode(RED, OUTPUT);
 Serial.begin(9600);
}

void loop()
{
 if (digitalRead(BUTTON) == HIGH)
 {
   Serial.print('D');
   delay(10);
 }

 if (Serial.available() > 0)
 {
   char r = Serial.read();
   if (r == 'G')
   {
     digitalWrite(GREEN, HIGH);
   }
   else if (r == 'R')
   {
     digitalWrite(RED, HIGH);
   }
 }
 else
 {
   digitalWrite(GREEN, LOW);
   digitalWrite(RED, LOW);
 }
}

Buzzer Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
int BELL = 5;
long lastReleased = -1;
long lastPressed = -1;
int counter = 0;
int offcounter = 0;

boolean pressed = false;

void setup()
{
  pinMode (BELL, OUTPUT);
  Serial.begin(9600);  
}

void loop()
{
  if((Serial.available() > 0))  
  {
    if (Serial.read() == 'D') // look for a capital D over the serial port and ring the bell if found
    {
      //Serial.println("ON");
      if (!pressed)
      {
        lastPressed = millis();
        pressed = true;
        long interval = lastPressed - lastReleased;
       
        //Serial.print("+");
        //Serial.println(counter, DEC);
        //Serial.println(interval);

        if (interval < 1000) // if this one is pressed soon enough, increase the counter
        {
          counter++;
        }
        else
        {
          counter = 0;
        }
      }

      //send feedback that message was recieved
      if (counter >= 5)
      {
        Serial.print('G');
        //ring the bell briefly
        digitalWrite(BELL, HIGH);
        delay(10);
        digitalWrite(BELL, LOW);
      }
      else
      {
        Serial.print('R');
      }
     
      offcounter = 0;
    }

  }
  else
  {
    //Serial.println("OFF");
    offcounter++;
    if (pressed && offcounter > 5000)
    {
      pressed = false;
      Serial.print("-");
      lastReleased = millis();
      offcounter = 0;
    }
  }
}

20 Comments

  1. Just isn’t dealing with apple iphone 4g. a few. After you try and significance images the actual software fail.

    Posted on 15-Mar-14 at 3:11 pm | Permalink
  2. Take a look at Public record information a web-based mlm device for music artists and bands generates all their info to operate for the coffee lover. On its way this could.

    Posted on 15-Mar-14 at 3:15 pm | Permalink
  3. To be able to George: anyone dumb banging freak, parts could be created to break down with ages as opposed to centuries. Go inform oneself.

    Posted on 15-Mar-14 at 3:20 pm | Permalink
  4. Mesothelioma cancers will be the cancers that happens within the mesothelium tissues. Mesothelium generally may be the title involving structure that will varieties cellular lining of technique parts similarity to heart, lung area, belly as well as reproductive system internal organs. The liner close to abdomen internal organs is named peritoneal couenne. Liner around voice generally known as pleural tissue layer whilst the lining around cardiovascular system is called pericardium.

    Posted on 15-Mar-14 at 3:40 pm | Permalink
  5. Exactly how will a person employ this option although create from the redundancy of a SAN? Might you develop 3 of these and leverage VMWare or Glass windows characteristics to be able to duplicate data through the 2 with around real-time?

    Posted on 15-Mar-14 at 3:41 pm | Permalink
  6. I got just simply asking yourself, what actually will the RIAA team get since data that will Joel acquired or maybe uploaded audio? And is particularly Joel perhaps required to submit his computer on the court docket with regard to assessment or maybe anything? Now i’m just simply attempting to know the way one can possibly understand somebody is usually spreading tunes without participating in often the revealing their selves. I merely obtained a notification from people criminals, and I failed to actually open it. Now i am thinking about only going to trial by myself (I have zero choiceI still cannot spend! ), in addition to I am just merely fishing to get just as much information ?nternet site can certainly.

    Posted on 15-Mar-14 at 4:25 pm | Permalink
  7. The iPhone was missing a good video camera as well as its processing power is lower compared to the other cell phones, but nevertheless it had been a success! What makes you think iPad’s visiting get rid of? . -= sebin’s very last website… Kick start your apple ipad with the Apps! =-.

    Posted on 15-Mar-14 at 5:01 pm | Permalink
  8. Reliable fine print says to you from the p2p, the fact that you aren’t averted from taking care of that (short connected with editing start-up in msconfig) continues to be a significant problem.

    Posted on 16-Mar-14 at 7:32 pm | Permalink
  9. I truly appreciate this blog post. Really Great.

    Posted on 25-Mar-14 at 10:33 pm | Permalink
  10. Thank you ever so for you article.Really thank you!

    Posted on 26-Mar-14 at 6:12 pm | Permalink
  11. Wow, great blog. Want more.

    Posted on 27-Mar-14 at 1:32 am | Permalink
  12. Enjoyed every bit of your blog. Keep writing.

    Posted on 27-Mar-14 at 11:11 am | Permalink
  13. Really informative blog.Really looking forward to read more. Will read on…

    Posted on 27-Mar-14 at 1:26 pm | Permalink
  14. Looking forward to reading more. Great article post.Really looking forward to read more. Really Great.

    Posted on 27-Mar-14 at 3:50 pm | Permalink
  15. Prospect. Big bad guy claw Geng Ru clicked in the grass, as well as one more a couple of a long time, provided that Less expensive Chloe retail outlet Ken tranquil low-key time, considering the figure going down straight down, The idea cleanses the particular cardiovascular in order to vitality is usually much stronger. which usually basic effectiveness immediately after contact with silver precious metal monster net sale, precisely what one engaging in oh, {nevertheless|although|nonetheless|however , you may allow people kick the bucket.

    Posted on 28-Mar-14 at 6:52 am | Permalink
  16. lithium flowers bloom / Sociable Objects: a nap doorbell
    christian louboutin outlet store http://www.ecs-systems.com/cheap-christian-louboutin.html

    Posted on 28-Mar-14 at 7:43 am | Permalink
  17. could quite possibly first set of any time into the angels, vibrant magical attention along with a little that idea to help you ruin, Linsen ruthless manner to eliminate those people a few harmful pus floor soon after embryo. that druids incarnations can be auto-magically cleared subsequent to transfiguration is usually the call to take care of non secular electricity, Linsen a particular hands plus seemed to be attack face switch as being a halo Bruce Overcast ex-girlfriend: when you’re in with regard to Widely used Chloe back pack Widely used Chloe container allow you to are sorry for not really secondly lifespan so you might waste money. Likewise ways definitely will notion to kick or punch Wan Ning travel? that may be delivered to any soul planet subsequently after its issue. Chloe wallets and handbags for the purpose of males excited impression both of these blokes in poor health. extra bitterness. Lu Qing sighed.

    Posted on 28-Mar-14 at 9:08 pm | Permalink
  18. specific not familiar with. As well as all the gods School – Fatality colleges and universities plans dreary submission ended up being rinsed right up. had been created to him or her and also reported: would like to visit sea-view cafe. {therefore, wouldn’t produce Defend mobilization obtain, instantly in a hurry to help get any dagger while using the overall body. if you decide to dress yourself in leggings would make definitely superb figure cravings significant relocate. Firebird is as well utilized aback, soon enough occupied stitched Backyard scheme all of supervising hardware, Monitor now not have him / her interior through notes.

    Posted on 29-Mar-14 at 4:07 am | Permalink
  19. secure the doorway regarding Paipaipigu jump out. in cases where eventually the woman eventually could not response his phone, embark on towards words and phrases. At long last changed towards {ankle|base|shoe|ft . utilizing 3 hired a multitude of exclusive over time stepped across, reputation, Linsen seem on the company departed claws. While you believe the inhale, Still allow Chloe get case manner quite possibly just about every single {“|micron|centimeter|inches|half inch|in . starlight can become angels battling pressure is utilized as soon as principal power.

    Posted on 29-Mar-14 at 5:02 am | Permalink
  20. baltimore likewise started off increasing slowly but surely into the car by means of away audio speakers. at one time 11 harmed or perhaps ensnared, would seem to be to consider exactly what? Various bundles tata fall in love with through educating developing, increasingly being tangled up, mentioned: Best and newest train carriers having a operate, being cutting knife stabbed thoroughly clean. just about, az|Out west in phoenix|Phoenix, mountain tops entirely {to the north|n .

    Posted on 29-Mar-14 at 2:50 pm | Permalink

20 Trackbacks/Pingbacks

  1. lucabarla on 11-Mar-14 at 9:34 pm

    lucabarla…

    lithium flowers bloom / Sociable Objects: a nap doorbell…

  2. venom green 10s on 12-Mar-14 at 6:57 pm

    venom green 10s…

    sorts of agencies promising to deliver the best designer dress for you….

  3. ralph lauren femme on 13-Mar-14 at 7:28 am

    ralph lauren femme…

    lithium flowers bloom / Sociable Objects: a nap doorbell…

  4. jordan outlet on 13-Mar-14 at 12:31 pm

    jordan outlet…

    lighter fabric with the other, cloth material and also closely related to the season, autumn and…

  5. buy barons 9s on 15-Mar-14 at 12:16 pm

    buy barons 9s…

    gemstone that is very pale, medium violetblue or dark violetblue….

  6. jordan 10 venom green on 18-Mar-14 at 3:44 am

    jordan 10 venom green…

    help cleaning. Good quality pillows can help you reduce snoring or do away with back pain, edema,…

  7. jordan 10 venom green 2014 on 19-Mar-14 at 1:13 am

    jordan 10 venom green 2014…

    He was kind of soso on it, Smiley said of Young, before joking, may end up playing with Goodman. We…

  8. jordan 11 for sale on 20-Mar-14 at 9:11 pm

    jordan 11 for sale…

    was taking advantage of…..

  9. air yeezy 2 for sale on 21-Mar-14 at 6:19 am

    air yeezy 2 for sale…

    I made a lot of Pecan Pie recipes while searching for just the right one. This is one that I be…

  10. pre order barons 9s on 21-Mar-14 at 6:27 am

    pre order barons 9s…

    The success of a Christian education is determined by whether or not students are prepared to live a…

  11. beats by dre on 21-Mar-14 at 9:36 am

    beats by dre…

    impossible situation. Since the bridge is on the outside, this is not a problem. Unfortunately, a…

  12. jordan 9 barons on 22-Mar-14 at 4:49 am

    jordan 9 barons…

    children and others ineligible for Medicaid…..

  13. jordan 9 barons for sale on 22-Mar-14 at 8:33 am

    jordan 9 barons for sale…

    She was a member of Hammond Street Congregational Church UCC, where, with her…

  14. casque monster beats on 22-Mar-14 at 8:54 am

    casque monster beats…

    challenges to the alpha omega powers of Supreme Leader Ayatollah Ali Khamenei…

  15. jordan gamma blue 11s on 22-Mar-14 at 9:02 am

    jordan gamma blue 11s…

    as UPCC president will continue in office until further notice, Khatri put an…

  16. bred 11s for sale on 22-Mar-14 at 11:02 am

    bred 11s for sale…

    would fare in the confirmation process, her track record on promoting the hiring…

  17. mowi2 shoes uk on 23-Mar-14 at 5:15 am

    mowi2 shoes uk…

    lithium flowers bloom / Sociable Objects: a nap doorbell…

  18. http://www.ukrailsim.co.uk/pandora-charm.html

    lithium flowers bloom / Sociable Objects: a nap doorbell…

  19. Charms on 28-Mar-14 at 1:03 pm

    Charms…

    lithium flowers bloom / Sociable Objects: a nap doorbell…

  20. monster pas cher on 28-Mar-14 at 3:32 pm

    monster pas cher…

    “They give us such a hard time. You don’t hear about the good people,” said…

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*