Step 1 is to get your Funhouse set up and online in the Adafruit IO WipperSnapper Devices page. Follow the instructions in the FunHouse product learn guide, on the WipperSnapper Setup page.
We'll get then PIR motion sensor setup within WipperSnapper, and then add the DotStar LED lights for output.
- From the WipperSnapper page, click "New Component"
- Search for "PIR Sensor" then select the PIR sensor component
- Name the sensor
- Select "PIR Sensor" for the PIR Sensor pin
- choose the "On Change" option for the return interval. This means that the sensor will ping out data only when it is triggered (aka when Cujo the turtle moves)
- Next we'll add the DotStar LEDs. Click the New Component button again.
- Search for DotStar and select the component.
- On the configuration page leave the default pins selected, but change the Number of Pixels from 1 to 5. The Color Order should be BRG.
Create a Feed for the PIR sensor
Now that the FunHouse is connected to WipperSnapper and the PIR sensor and LED are set up, it's time to create a feed. Why? The sensor data needs a home. When the sensor is tripped, we want to send a message to this new feed documenting that movement was detected at a given time.
- In the top pane, click "Feeds"
- Then click "New Group"
- Create a new feed group and call it "WipperSnapper" or whatever you'd like
- Click the group name in the feeds list page to go there before creating a feed, but in future you can use the + button at the end of the row to directly add a feed to the group.
- Within the new feed group, click "new feed" and enter the details about the feed.
- Click "create"
Set up the Actions
Now that we have a home for our data, we need to point the data to that home when certain events happen. Now it's time to define those events with actions. Here are the actions we'll create:
- Send a message "Turtle moved!" to the motion sensor feed each time the sensor has been activated.
- Send a message "Turtle is still" to the motion sensor feed when there is no longer any movement.
- Set the LED to ON when the sensor is triggered
- Set the LED to OFF when the sensor is not triggered.
- In the top navigation pane, click "Actions"
- A searchable list of actions appears, with status information at the end of each row.
- Click "New Action" in the top left of the page
- Choose a name and optional description then click Create.
First up we want to send a message "Turtle moved!" to the motion sensor feed each time the sensor has been activated.
Drag a trigger block, the one which says "When gets data matching = 0", from the toolbox and into the Triggers: section of the workspace. Update the feed dropdown to select the motion sensor, and change the operator from equals (=) to instead be "greater than" (>).
Next add a Set Feed block to the Actions: section of the root block on the diagram. Alter the feed to point to the "Motion Sensor Activated?" feed, and the value to be Turtle Moved!.
Your diagram should now look like this:
-
Triggers: When
motion sensorgets data matchinggreater than0 -
Actions:
Set FeedMotion sensor activated?to valueTurtle moved! - Hit save, and choose Enable and Save (asked the first time, or if the action is disabled when saving).
Create another action for when the turtle is still:
-
Triggers: When
motion sensorgets data matchingequals0 -
Actions:
Set FeedMotion sensor activated?to valueTurtle is still - Hit save, and choose Enable and Save (asked the first time, or if the action is disabled when saving).
Create two more reactive triggers for the LED:
- Create a new action for turning the LEDs on, almost duplicating the previous action.
-
Triggers: When
motion sensorgets data matchinggreater than0 -
Actions:
Set FeedFunHouse DotStarsto value#FFFFFF - Hit save (and choose enable if asked)
- Create the new "LED off" action
-
Triggers: When
motion sensorgets data matchingequals0 -
Actions:
Set FeedFunHouse DotStarsto value#000000 - Hit save (and enable if asked)
Why create LED actions?
This lets us know if the motion sensor is properly working when in the calibration step which is coming up soon.
Next up we'll set up the dashboard so we can get some visual feedback on the data.
Page last edited July 08, 2025
Text editor powered by tinymce.