Introduction: Bibble: a Smart Desk Light for Roommates

The Bibble is a desk light designed to let your loved ones know where you are (or at least where you're scheduled to be). The lantern can sit on their desk, softly glowing a particular colour, depending on whether you are at home, school/work, or out. It uses IFTTT integration to search for keywords in your Google Calendar, triggering your NeoPixels to change colour.

The code for this project is built upon the code for the Smart Toilet Light! Check out the project here.

Step 1: Parts, Tools, Supplies

To make your own Bibble, you will need the following tools and materials:

Supplies

Tools

  • Soldering Iron
  • Wire Strippers/Cutters
  • X-Acto Knife
  • Cutting Mat
  • White Glue

Optional

  • If you're using Heat Shrink Tubing, you'll need a Heat Gun or substitute.

Step 2: Wiring Diagram

NeoPixels don’t require resistors, as each has its own internal circuitry. Each NeoPixel also uses a maximum of 60mA, and if we follow the Adafruit Neopixel Überguide,we can get the “rule of thumb” power supply rating in Amps.

4 NeoPixels × 60 mA = 240mA ÷ 1,000 = 0.24A

The HUZZAH can be powered with either a MicroUSB cable (which will regulate your 5V supply to 3.3V) or a 4.2/3.7V Lithium Polymer (Lipo/Lipoly) or Lithium Ion (LiIon) battery via the JST jack.

Since the Bibble is a freestanding object, I chose to power it with a MicroUSB cable (wiring diagram above). Solder the wires to the HUZZAH as indicated in the diagram above!

**As per the diagram, your NeoPixels have to be soldered at the open end of the arrow (circled above)**

Step 3: Setting Up Your HUZZAH, IFTTT, Code

As mentioned earlier, I used the code from The Smart Toilet Light as a basis. His explanation is pretty straightforward, including his integration with IFTTT, but I'll walk you through how I did it here:

1. Setting up the Adafruit Feather HUZZAH ESP8266

It's super helpful to read through Adafruit's guide thoroughly for your own understanding, but for the purposes of this project you can skip to:

The Arduino IDE Section

  • Install Arduino IDE 1.6.8 or greater
  • Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into the Additional Board Manager URLs field in the Arduino v1.6.4+ > Preferences.
  • Use the Board manager to install the ESP8266 package
  • Go into your Tools dropdown and make sure your settings are as follows:
    • Board: “Adafruit HUZZAH EDP8266”
    • Flash Size: “4M (3M SPIFFS)”
    • CPU Frequency: “80 MHz”
    • Upload Speed: “115200”

2. Set up Adafruit IO

Adafruit IO is currently a beta system that allows you to make data connections. We’re going to use the feeds feature for this project! If you want to know more about how it works, visit Adafruit IO Basics: Feeds, but for now, all you need to do is:

3. Set up your IFTTT

From Wikipedia, "IFTTT is a free, web-based service that allows users to create chains of simple conditional statements, called "applets", which are triggered based on changes to other web services such as Gmail, Facebook, Instagram, and Pinterest. IFTTT is an abbreviation of "If This Then That". To set up your IFTTT, do the following:

  • Sign up for an account
  • Click My Applets and Create a New Applet
  • Click “this” and select Google Calendar
  • Use “Event from search starts” and type in your keyword, whether it is work, home, class etc. to create a trigger
  • Click “that” and select Adafruit IO
  • Select “Send data to Adafruit IO
  • Select your calendar feed and write the keyword you previously chose as data to save. Ensure it’s CAPITALIZED as this is necessary for Adafruit to understand the prompt. Keep in mind that this keyword has to be included in the title, description, or location of your Google Calendar event!

Step 4: NeoPixel Test

I started my process by testing the NeoPixels to ensure that everything is working. NeoPixels can be a little tricky, so I’d recommend going through the Überguide for full comprehension.

Install Adafruit_NeoPixel via the Library Manager

  • Go to Sketch > Include Library > Manage Libraries > Adafruit NeoPixel by Adafruit
  • Load the RGBW strandtest via File > Examples > Adafruit Neopixel > RGBW strandtest
  • Change the number of Neopixels to 4
  • Ensure that you’re connected to the correct pin
  • We have to make a couple changes to the code as the gamma correction doesn’t actually work with the HUZZAH, so make sure to delete the following:
int gamma[] = {<br>    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,
    1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,
    2,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  4,  5,  5,  5,
    5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  9,  9,  9, 10,
   10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16,
   17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25,
   25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36,
   37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50,
   51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68,
   69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89,
   90, 92, 93, 95, 96, 98, 99,101,102,104,105,107,109,110,112,114,
  115,117,119,120,122,124,126,127,129,131,133,135,137,138,140,142,
  144,146,148,150,152,154,156,158,160,162,164,167,169,171,173,175,
  177,180,182,184,186,189,191,193,196,198,200,203,205,208,210,213,
  215,218,220,223,225,228,231,233,236,239,241,244,247,249,252,255 };
  • Replace all instances of gamma[ j ] with j
  • Upload, and see all your NeoPixels light up! If you experience any issues, use a multimeter to check that your pixels are soldered correctly, and use the Überguide to troubleshoot.

Step 5: The Code

  • Download the attached sketch code
  • Change the wifi credentials (WLAN_SSID + WLAN_PASS) to reflect your own wifi name and password.
#define WLAN_SSID       "...WiFiName..."    // Your WiFi AP name.
#define WLAN_PASS       "...Password..."     // Your WiFi AP password.
  • Change the AIO_USERNAME + AIO_KEY to reflect your own. You can find your key by clicking the key button on the top right of your IO homepage (See above image)
#define AIO_USERNAME    "...Username..." // Adafruit IO username (see  http://accounts.adafruit.com).<br>#define >#define AIO_KEY         "...Key..."      // Adafruit IO key
  • Compile and upload!
  • Having issues? Make sure that you have the correct port selected until Tools > Port > [whatever it is for you... on my computer it's

    SLAB_USBtoUART

    , but for many of my friends it's COM3 / COM4]
  • You can also experiment with the colours assigned to your keywords by editing the /*NEOPIXEL*/ section of the code.
  • The keyword section is also commented with //KEYWORD, so ensure to change the words to reflect those that you’ve activated through IFTTT and IO
  • Click on the Serial Monitor to ensure that your sketch is connecting properly to wifi
  • Manually push data to your feed using the blue + depicted above to test! Remember to CAPITALIZE all prompts so that your Arduino can recognize it.

Some FYIs:

I mentioned that this project was heavily inspired by the Smart Toilet Light, but Arduino has made a number of updates since Tony published the project earlier this year. Namely, there is no longer support for the PROGMEM variable!

Step 6: Form + Material

The Bibble lamp is very simple to assemble!

  1. Use a coping saw to cut the lip off the globe
  2. Sand it down to get a smooth edge
  3. To diffuse your lights, paint the globe using frosted glass spray paint (I used 3 coats!)
  4. Cut a hole for the Micro USB cable to connect to your HUZZAH. Make sure it sits high enough on the globe that your wire won’t be inhibited by the wooden bowl
  5. You’re all set! If you’d like, you can glue down the globe to the wooden bowl. I like to keep it unattached in case I ever want to switch out my Micro USB cable.

Step 7: All Done!

See the Bibble in action!

I gifted my Bibble to my roommate, with it linked to my Google Calendar. Gift yours (it’s nearly the holiday season) to easily keep in touch with your friends and family.

Thanks for reading! I’d love to hear any feedback and comments you have. If you make your own Bibble, please share your photos in the comments below.

Comments

author
chanhui2000 (author)2017-01-01

hello I have some questions about this,can you help me.

author

Hi! Send me a message with your question?

author
Swansong (author)2016-12-08

This is neat :) I'm sure a lot of long distance friends and family members would love this!

About This Instructable

2,565views

40favorites

License:

More by bernicejywong:Bibble: A Smart Desk Light for Roommates
Add instructable to: