Created
October 26, 2015 15:26
-
-
Save jazzyjackson/28fa0aaac29a8b1ba432 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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