-

The cloudBit + IFTTT

What is IFTTT?

ifttt-logo-large

IFTTT (If This Then That) is a service that lets you connect to different web apps and select IoT products through simple conditional statements. You can use IFTTT in conjunction with the cloudBit to send and receive information from your littleBits circuit.

 cloud1-0714-de

 

How do I get started using IFTTT with the cloudBit?

1. Create a littleBits account if you haven’t done so already.

2. Next, you will need to set up your cloudBit in Cloud Control.

3. Make an IFTTT account

4. Go to the littleBits channel and click activate. Then you will have to enter your littlebits account information in order to start using littleBits with IFTTT.

5. Start creating recipes!

 

How it works:

CHANNELS

IFTTT is made up of a growing library of channels. These channels are the building blocks of the IFTTT system, and each participating web app/IoT product has one. For example, littleBits, Gmail, Instagram, and Phillips Hue each have a channel on IFTTT, just to name a few. Each channel has its own set of triggers and actions.

 Screen Shot 2015-01-06 at 11.20.41 AM

 

RECIPES

Recipes allow you to control how one IFTTT channel works with any other IFTTT channel. Recipes use the triggers and actions found in each channel to make simple IF/THEN [or THIS/THAT] statements that create interactions between web apps and IoT products. The triggers are the “THIS” portion of the recipe and the actions are the “THAT” part of the recipe.

Screen Shot 2015-01-06 at 11.22.44 AM

*** Note: Most IFTTT recipes check for new trigger data every 15 minutes or faster. However, this means that not all interactions will happen immediately, and that you may have to wait up to 15 minutes to see any action. Many recipes don’t need real-time trigger data, but if you want a quicker interaction, scroll down to the “Try these channels” section in this post.

Check out IFTTT’s FAQ for detailed information about channels, recipes, and more!

 

What can you do with the littleBits Channel?

The littleBits channel has one trigger and two action options.

Screen Shot 2015-01-05 at 10.26.54 AM

TRIGGER

The IFTTT trigger is activated when your cloudBit receives an input signal from another littleBits module. For example, if you set up this circuit: usb power + button + cloudBit, the press of the button will trigger your IFTTT recipe. Of course you can use any littleBits input in place of the button, but note that if you are using a sensor, you need just over 80% voltage to trigger the cloudBit. You can see how much voltage is passing through your circuit by placing a number+ module [in read mode: volts] after your sensor. You could also place a threshold module after the sensor to adjust the point at which it triggers the rest of your circuit. Check out the Threshold Tips & Tricks to learn more about how to use the threshold module.

 

ACTIONS

The “Activate output” action does just what it says. When an IFTTT recipe is triggered [ex: IF I am tagged on Facebook…], THEN the cloudBit will activate your circuit for 3 seconds. Simple as that!

However, if you want to have a little more control over the cloudBit’s output, you can use the action, “Set output level”. This action allows you to set the duration and voltage level that the cloudBit outputs to your circuit. The output duration can be anywhere from 1-30 seconds, or forever. The output voltage is a percentage that can be set anywhere between 0 – 100%. This action is great to use with certain Bits, namely the servo, the number module, the bargraph, the IR transmitter, or the Arduino.

 

The following diagrams show how the cloudBit and IFTTT interface in our SMS doorbell + answering machine project.

cloudBit_input-case cloudBit_output-case

 

BITS THAT WORK WELL WITH “SET OUTPUT LEVEL” ACTION

+++ servo –  In turn mode, the servo acts as a pointer that changes position based on the amount on voltage it receives. For example, in the following Cloud Box project,  antoinepch uses 4 IFTTT recipes [with a single cloudBit], each with a different voltage output, to visually depict weather conditions using the servo as a pointer.

[ex: If current condition changes to snow, then set cloudbit output for 0 – If current condition changes to rain, then set cloudbit output for 35 – If current condition changes to cloudy, then set cloudbit output for 65 – If current condition changes to clear, then set cloudbit output for 100]

large_filled_IMG_0163

+++ bargraph and number modules – These modules are great for outputting variable visual or numerical information. If you want to visualize the voltage output with LEDs, the bargraph is a great bet. When you send out different volatge percents from IFTTT, you will see that the number of LEDs will chnage on the bargraph. A fun example of how you could use the bargraph is to use the IFTTT location channles to trigger different output volatges based on your location – if you are at home, 5 LEDs are lit, when you are at work, 3 LEDs are lit, and when you are at the beach, 1 LED is lit.

If you want your circuit to read the voltage or voltage percentage output from the cloudBit, use the number module in “read mode”. You can also use the number module in count mode to record information, like how many times you were mentioned in a tweet or how many times your mom emailed you in the past few hours ;).

+++ IR transmitter – The IR transmitter has 4 channels, each which is triggered by a certain voltage range. This means you can control different AC Switches with IFTTT recipes. For example, we made a Christmas tree with 3 strings of lights [each on a different AC Switch). Using IFTTT tagged SMS as an action, we were able to control each string of light with tagged text messages that were set to send out different voltage percentages to the IR transmitter.

large_filled_Picture_27

+++ Arduino –  The Arduino module works well with variable voltages. The module is able to read an incoming voltage and decide what happens to the rest of your circuit based on whatever program you write. With the “Set output” action, you can send any voltage percentage of your choosing to the Arduino.

 

Try these channels

We find the following channels particularly useful and fun for littleBits projects.

1. SMS Channels

Use the iOS and Android SMS channels to send text messages to your cloudBit and activate your circuit. You can also create recipes that tell your cloudBit circuit to send text messages to your phone. When sending a tagged text message, you could specify variable voltage and duration outputs for your cloudBit, like we did with the christmas tree to turn on/off different colored lights.

***Note that the SMS channel will only work with the phone number you activate the channel with.

***Note that you are limited to 100 SMS interactions per month.

2. Pushover Channel

We’ve found that receiving text notifications can be slow with the SMS channels. Pushover seems to be much quicker if you want to be alerted quickly when your littleBits circuit is triggered.

3. Google Drive Channel

Log information on a google spreadsheet when your littleBits circuit is triggered. The action, “Add row to spreadsheet” is great for logging data data like when or how many times your dog barked during the day while your were at work. In the “formatted row” section, use the ingredients to add times [TurnedOnAt] or type in your own message to add text.

4. Location Channels

There are location channels for both iOS and Android devices that trigger when you enter or exit an area that you specify. These are great for triggering actions on the littleBits channel. For example, IF you enter a certain area, THEN activate my littleBits circuit [i.e. play an mp3 file on my littleBits music machine].

5. Date & Time

This channel is great for automating your littleBits circuits. You can set times, days of the week, etc… Make a littleBits fish feeder and create a recipe to drop fish food every day at 10am.

6. Space Channel

This channel is too awesome not to mention. The space channel triggers when the ISS passes over a location you specify, a new astronaut enters space, or if there is breaking news from NASA. Create a physical notification with a littleBits circuit – make a DIY version of the ISS and have it light up and play sound clips when the ISS is above your house!

 

Click here for more IFTTT + littleBits recipe ideas

 

Need help or have specific questions?

Visit our forum!

 

More Tips & Tricks

Tips & Tricks
CodeKit Tips & Tricks

Get all the tips & tricks for your new Code Kit in one place

Tips & Tricks
Friday’s Tips & Tricks: The Roller Switch

The roller switch is similar to a button. Push to turn on, release to turn off (or vice versa). When you want to turn on your circ...

Tips & Tricks
Storage Solutions for the Pro Library

This Tips and Tricks is all about how to install and customize your Pro Library! We’ll show you how to mount your Pro Librar...