Chapter 11

Building a Tweeting Pet Door

In This Chapter

arrow Using Hall-effect sensors

arrow Attaching an Ethernet shield to your Arduino

arrow Using the Twitter library

arrow Sending a tweet

With everyone sending tweets these days, it only makes sense that your pet should be able to do the same! This project provides a (somewhat) credible excuse to create a Twitter account for your pet and has the practical benefit that you can see when your pet is in or out, even when you’re not at home. I have an indoor/outdoor cat, who comes and goes as he pleases. Living in the city, we sort of want to be sure that he is safe and know what he is up to at any given time. What better way than to use the Internet to provide a data feed of his comings and goings?

In this project, you modify your pet door with sensors that detect when a magnet passes by them. A magnet mounted to the pet door flap triggers these sensors when your cat or dog (or badger) is entering or leaving. Your Arduino uses this signal to select a random message and sends this directly to Twitter as a tweet. You won’t need to leave a computer connected ...

Get Arduino Projects For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.