Browse our open source example apps to accelerate your wireless IoT project.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
homechevron_rightExample Appschevron_rightAcceleratorschevron_rightA Better Mouse Trap

A Better Mouse Trap

  • LoRa
  • SMS Notifications

Warning: This project uses Sparrow, a Blues product that is no longer under active development. We are working on updating this project to the successors of Sparrow: Notecard LoRa and the LoRaWAN Starter Kit . In the meantime, if you would like assistance building a Better Mouse Trap feel free to reach out on our community forum .

A smarter mouse trap with SMS alerting.

Find the complete story in the detailed Hackster.io writeup .

Mouse wearing a helmet grabbing cheese from a trap

A Better Mousetrap is a humane mousetrap that will alert you with an SMS when it has caught a mouse.

Finished trap on a concrete floor

You will need

Parts

  • Victor M333 Humane Mouse Trap
  • Blues WiFi + LoRa Dev Kit (Sparrow)
  • Clear Polycarbonate Sheet 1/16-in
  • M3-threaded Nylon Standoff Kit

Tools

  • Hand Drill
  • 1/2 inch Drill Bit
  • 1/8 inch Twist Drill

Hardware Setup

Modifying the Mousetrap

I used a LoRa-based Blues Sparrow Development Kit which has a passive infrared (PIR) motion sensor on each sensor node. To allow the PIR sensor to see into the trap, I cut a 1/2” hole in the lid of the Victor M333 Mousetrap. To locate the circuit board securely, I cut four 1/8” holes to receive M3-threaded nylon standoffs.

Side view of Victor trap surmounted by the motion sensor

Sparrow Setup

Follow the Sparrow quickstart. Including:

  • Plugging in some QWIIC connectors, setting a few dip switches
  • Pressing a few pair buttons
  • Setting your wifi credentials {"req":"card.wifi","ssid":"<ssid name>","password":"<password>"}

Firmware

The Sparrow kit's PIR sensors and factory firmware are perfect to detect motion in a mousetrap like this.

When the Sparrow sensor detects motion, it creates a message. The Sparrow gateway, thanks to the onboard Notecard, forwards the message through Wi-Fi to my home router.

View inside the trap showing underside of lid Sparrow Gateway wiring and logical data path from Lora Radio Signal to Sparrow essentials board, to qwiic i2c cable, to notecarrier, to notecard, to wifi

Cloud Setup

  • Sign up for a free account on Notehub.io , and create a new project.
  • Configure the Notecard on the Sparrow Gateway with your Notehub ProductUID {"req":"hub.set", "product":"com.your-company.your-name:your_product", "mode":"continuous"}

SMS Alerts

Notehub doesn’t have native SMS alerts yet, but it does allow you to route messages to any other cloud services or HTTPS API endpoint that your heart desires. I used Twilio, an inexpensive SMS service, to send message to my phone when there is motion in the trap.

To correctly format the request for the Twilio HTTP API I followed the Blues Twilio SMS Guide and modified the JSONata expression to tell me which mousetrap (Garage, Basement, etc.) saw motion based on the unique ID of the Sparrow sensor node I affixed to each trap.

Data path from Wi-Fi to Notehub.io and JSONata transformation into SMS format

System Test

To trigger the PIR sensor, flip the trap upside down and back upright. You should see an event on [Notehub.io] and an SMS message on your phone.

Notehub.io event screenshot

Route to Twilio SMS Service

Phone Screenshot of SMS

Blues Community

We’d love to hear about you and your project on the Blues Community Forum .

On This Page

  • You will need
    • Parts
    • Tools
  • Hardware Setup
    • Modifying the Mousetrap
    • Sparrow Setup
  • Firmware
  • Cloud Setup
  • SMS Alerts
  • System Test
    • Blues Community

Resources

  • GitHub
  • Hackster
  • Request More Info
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up