Skip to content

Instantly share code, notes, and snippets.

@jazzyjackson
Created October 26, 2015 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazzyjackson/28fa0aaac29a8b1ba432 to your computer and use it in GitHub Desktop.
Save jazzyjackson/28fa0aaac29a8b1ba432 to your computer and use it in GitHub Desktop.
#include <PCM.h>
const unsigned char ghost[] PROGMEM = {
131, 128, 128, 124, 124, 124, //your sound here
};
void setup(){
pinMode(A0, INPUT_PULLUP);
}
void loop()
{
if(digitalRead(A0) == LOW){
startPlayback(ghost, sizeof(ghost));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment