Skip to content

Instantly share code, notes, and snippets.

@jazzyjackson
Created October 20, 2015 16:22
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/8996d6519b7cd0cbf965 to your computer and use it in GitHub Desktop.
Save jazzyjackson/8996d6519b7cd0cbf965 to your computer and use it in GitHub Desktop.
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <JQ6500_Serial.h>
JQ6500_Serial mp3(2,3);
void setup(){
mp3.begin(9600);
mp3.reset();
pinMode(A0, INPUT_PULLUP);
pinMode(6, OUTPUT);
digitalWrite(6, LOW);
}
void loop(){
if(analogRead(A0) < 500){
mp3.play();
delay(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment