Introduction: Astley-izer

About: I make projects, they have names. Some are obscure and some straightforward. Form or Function; I go either way. Battery powered or edible, I love making things.
A Rick Roll for real life.  If you somehow missed the internet meme of Rick-rolling, this).  I want to take this meme from the internet to the real world. Enter my trusty wave shield and PIR sensor.  A real easy build and software mash-up.   


Arduino Uno
Adafruit WaveShield
Parallax PIR
Some wire
A project Case

How to:  Download "Never Gonna give you up", covert the file as per Ladyada's instructions for the wave shield(Must be .WAV at 16bits and 22hertz), Connect the PIR to 5volts, Ground and Digital Pin6 on the wave shield.  Upload provided code to the arduino, place the wave shield on it, throw it in a discreet case.  Voila you're done.   Now go Astley up the place.  

One other RickRoller out there, this one uses a timer and more electronic gadgetry.  Mine is ridiculously easy and fun for messing around with random strangers.  I've rickrolled some random people so far,  Most don't find it nearly as funny as I do.  

Yay Video.  Sorry but all I have right now is built in laptop webcam.  Doing the best I can with what I got.  Put a laser cutter in my hands and I'll Make something EPIC.  Hint, Hint.  

I rick-rolled my girlfriend half a dozen times tonight in our small Residence Inn suite.    My joy was uncontained. The surprise is everything.  Sorry I didn't capture her delight at being pranked.    It's tough to leave video running for hours to capture the few moments when someone will walk by my Astley traps.  But I assure you, its worth the staking out some place. 

THE CODE:  Credit where its due, left some for Kristian Gohlke,  LadyAda also gets mad props for being so Amazing!  Thx Limor.  I couldn't have begun to do this without your products, awesome code and inspiration attitude. 
/* * ////////////////////////////////////////////////// * //making sense of the Parallax PIR sensor's output * ////////////////////////////////////////////////// * * Switches a LED according to the state of the sensors output pin. * Determines the beginning and end of continuous motion sequences. * * @author: Kristian Gohlke / krigo(_) / * @date:   3. September 2006 * * kr1 (cleft) 2006 * released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license * * * * The Parallax PIR Sensor is an easy to use digital infrared motion sensor module. * ( * * The sensor´s output pin goes to HIGH if motion is present. * However, even if motion is present it goes to LOW from time to time, * which might give the impression no motion is present. * This program deals with this issue by ignoring LOW-phases shorter than a given time, * assuming continuous motion is present during these phases. *
#include "util.h"
#include "wave.h"

AF_Wave card;
File f;
Wavefile wave;

int calibrationTime = 30;	  //the time we give the sensor to calibrate itself (10-60 secs according to the datasheet)longunsignedint lowIn;	   //the time when the sensor outputs a low impulselongunsignedint pause = 5000;  //the amount of milliseconds the sensor has to be low before we assume all motion has stoppedboolean lockLow = true;
boolean takeLowTime;

int pirPin = 6;    //the digital pin connected to the PIR sensor's outputint ledPin = 13;

  pinMode(pirPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  digitalWrite(pirPin, LOW);

  //give the sensor some time to calibrate
  Serial.print("calibrating sensor ");
    for(int i = 0; i < calibrationTime; i++){
    Serial.println(" done");
    Serial.println("SENSOR ACTIVE");
     if (!card.init_card()) {
 if (!card.open_partition()) {
 if (!card.open_filesys()) {
 if (!card.open_rootdir()) {


     if(digitalRead(pirPin) == HIGH){
	 digitalWrite(ledPin, HIGH);   //the led visualizes the sensors output pin state
	   lockLow = false;		//make sure we wait for a transition to LOW before any further output is made
	   Serial.print("motion detected at ");
	   Serial.println(" sec");
	   takeLowTime = true;

     if(digitalRead(pirPin) == LOW){
	 digitalWrite(ledPin, LOW);  //the led visualizes the sensors output pin state

	  lowIn = millis();	    //save the time of the transition from high to LOW
	  takeLowTime = false;	 //make sure this is only done at the start of a LOW phase

	 if(!lockLow && millis() - lowIn > pause){  //if the sensor is low for more than the given pause, we assume that no more motion is going to happen
	     lockLow = true;				//makes sure this block of code is only executed again after a new motion sequence has been detected
	     Serial.print("motion ended at ");	//output
	     Serial.print((millis() - pause)/1000);
	     Serial.println(" sec");
	 switch(digitalRead(pirPin) == HIGH){
   case 1:

 void playcomplete(char *name) {
 while (wave.isplaying);

void playfile(char *name) {
 // stop any file already playing
 if (wave.isplaying) {

 f = card.open_file(name);
 if (f && wave.create(f)) {;




    • Fix It! Contest

      Fix It! Contest
    • Halloween Contest 2018

      Halloween Contest 2018
    • Furniture Contest 2018

      Furniture Contest 2018

    7 Discussions

    Oh my meyer taunter, The way you rick roll is dead. Steampunk and AnythingPunk is dead, I'm just beginning. Maybe I'll load some Spice Girls in ur honor tomorrow. Because changing the songs is as easy as copying them to the SD card. And more directly, this is the rebuild. I bet you would like some superfluous nixie tubes huh. Not gonna happen from me. Nixie's for Pixies I say.

    How can you Free me, when I'm freeeeeeee

    Yup, those Pixies are the ones i was referring too. I think Black Francis really blossomed after they broke up. His solo stuff is so much better. "Teenager of the Year" might be my favorite album. Not from that album but still good.