Skip to content

Teensy automation

Don’t get me wrong, I think screensavers are a nifty invention.  However, they can be a major hassle.  Every time I sit down in front of my computer, I’m faced with the arduous task of wiggling the mouse in order to get rid of the screensaver.  This got me thinking… If only there were some way to automate this task.   Now thanks to the Teensy USB board and a spare Parallax PIR motion sensor I had floating around, I have a solution to this problem.  The Parallax sensor is low cost ($10) and pretty much ready-to-use out of the box.  Keith Neufeld has an excellent, detailed write-up of the motion sensor on his blog, along with some revealing pics of all the naughty bits. The sensor is very low power (<100uA) and can operate from a 3.3V to 5V power supply.  It has a single logic output pin which transitions to high when motion is detected, so it could not be any easier to interface.  I connected its power to the Teensy board and wired the output to a GPIO pin on the Teensy board and made a quick hack of the Teensy usb mouse example so that it polls the PIR sensor and wiggles the mouse cursor when  it detects motion after no motion is detected for 10 minutes.  Now whenever I sit down at the machine, the board automatically wakes up the screensaver, saving me from the laborious toil of moving the mouse and all of its associated hazards.

Here are some pictures of the Teensy, now with pins (soldered in pointing upwards) and  interfaced to the PIR motion sensor, also in a custom enclosure.

Post a Comment

You must be logged in to post a comment.