Now that we have the sensor set up, it's time to set up a counter to count each time the beam is broken. Then when that number reaches 25 (the capacity of a bin), I want to send an email notification that the bin is full.

What is IFTTT?

From the IFTTT site:

IFTTT is short for "If This Then That" and allows you to do more with hundreds of the apps and devices you love, including TwitterDropboxEvernoteNestFitbitAmazon Alexa, and Google Assistant.

Basically, the data feed from the IR sensor may be connected to Google Sheets to record the count of beam breaks. Then when 25 beam breaks are reached, that data from the spreadsheet may be used to send an email notification. Handy!

Create an IFTTT Account

If you don't have one already, head to the IFTTT website and create an account. It's free to create a basic account.

Create a new Google Sheet

If you don't already have a Gmail account, set one up now to access Google Sheets.

Then head to and open a new spreadsheet.

  • Once in Google Drive, click the "New" button on the top left of the screen
  • Then select "Google Sheets"

Step #1: Record and count each time the beam is broken

Create a New IFTTT Applet

From the IFTTT home page, click the "create" button in the top right corner of the screen. 

  • First, add the conditional "if". We want to record each time the beam is broken.
  • Click the "Add" button.
  • Search "Adafruit" from this list of services.
  • Choose the "Monitor a feed on AdafruitIO" option.
  • Next, select the feed created automatically from WipperSnapper. It should show up as whatever you named your board in WipperSnapper earlier.
  • The relationship should be "equal to" the value 0.
  • This means that each time the value of the IR sensor is 0 (which happens when the beam is broken), then do the next thing (which we'll add next).
  • Click "create trigger"
  • Now click "Add" next to "Then That"
  • Do a search for "sheets" and select the Google Sheets service.
  • Then select the "add row to spreadsheet option"
  • Enter the name of your spreadsheet
  • Detail how you'd like to format each row. We'll record a 1 (so we can add up the actions) as well as a timestamp for each row.
  • Click "Add an ingredient" and select the "created at" option.
  • Detail the Drive folder path where the spreadsheet is located. If your file is not located in a folder, create one and add the name of it here.
  • Click "create action"

Before this page gets too long, the mechanism for counting the beam breaks and sending the email notification will be discussed on the next page.

This guide was first published on Nov 10, 2021. It was last updated on Mar 08, 2024.

This page (IFTTT Set Up Part 1) was last updated on Mar 08, 2024.

Text editor powered by tinymce.