Tweeting Attendant

We work in a smallish office of (typically) 15 people. When we first moved into the current location, two shared restrooms seemed to be plenty; however, as the number of people has increased and we have more frequent visits from co-workers that typically work remotely, there are many times when a restroom just isn't available. You may expect a line at the restroom when you're at the movies or a sporting event, but at work?

We had originally planned to create a notification system that would work with our corporate instant messaging system to show the 2 restrooms as contacts that were either Available or Busy. When we heard about the Adafruit Make It Tweet Challenge, we switched gears and the Tweeting Attendant was born!

It is a basic system with a magnetic switch connected to a battery powered XBee module on one end and a Netduino Plus and XBee shield on the other.

The battery powered XBee module is an endpoint that is set up for one second polling of digital pin 3 which is connected to the magnetic switch and configured for cyclic sleep to conserve battery power.

The Netduino Plus and XBee shield monitors the incoming data from the endpoint and sends a tweet when the pin state changes (i.e. the door is opened or closed). In order to prevent unwanted tweets due to the switch bouncing, there is a minimum delay of 15 seconds between change notifications.

Parts List
Netduino Plus
XBee x 2 (we're using Series 2 modules) and some method for programming them
SparkFun XBee Explorer Regulated
SparkFun XBee Shield
Arduino Stackable Header Kit
Adafruit Magnetic Contact Switch
Battery holder (ours is from our local electronic parts shop)
Project box of your choice (also from our local electronic parts shop)
Headphone jack and plug (or some other type of connector to connect the switch to the box)
Magnets, Velcro, or some other method of attaching the finished project box within reach of the door sensor

You will also need the Attendant software for the Netduino Plus which can be found at

You can see the current activity at!/RoomAttendant. Later we'll be adding another endpoint for the other restroom.



    • Epilog X Contest

      Epilog X Contest
    • Remix Contest

      Remix Contest
    • Organization Contest

      Organization Contest

    7 Discussions

    You could mod this further by adding an RFID reader into the mix, and make your colleagues endure "the walk of shame" by tweeting how long each individual has been spending in the restroom, or swiftly identify the guilty party when someone commits a crime against the clean air act!


    2 replies

    Ha! Awesome ideas, but I don't think I could get away with it. Your comment did spark a lot of additional suggestions around the office. My favorite so far was to prevent exiting if the toilet paper holder was empty (although I'm guessing that borders on being illegal).


    7 years ago on Introduction

    I take it you are using the 3.3V regulator on the Explorer to run off 3x AA. What is the battery life like on the sleep cycle you are using?

    1 reply

    Somewhere between 3 and 4 weeks. We're planning to revisit this soon and I hope to optimize the sleep cycles a bit more. We are possibly updating a little too frequently right now.