The print statements is not related to my problem. My problem is that I need a digital pin to ground to trigger a sound on the MP3 Trigger. Then obviously go high to not trigger it more than once. As long as the pin is at ground, the sound loops.
So basically:
void setup(){
int pin = 7 //the pin to trigger
pinMode(pin,OUTPUT);
digitalWrite(pin,HIGH); //so it doesn't trigger until a voice command is given
}
void loop(){
if (command == true) //if I say this command, set this pin to ground
digitalWrite(pin,LOW); //set pin to ground so it will trigger a sound on the MP3 Trigger
digitalWrite(pin,HIGH); //set pin high to make the sound only once instead of it looping.
}
The problem is that setting the pin low like this doesn't cause the MP3 trigger to do anything. I cannot remember how I got it to work yesterday, but I did get it to trigger properly, but the sound kept looping so I added digitalWrite(pin,HIGH) to stop it. When I do that it doesn't work at all. I even added a delay() of up to several seconds between digiatlWrite(pin,LOW) and digitalWrite(pin,HIGH) but it doesn't trigger.
I don't know, I guess I will have to keep tinkering.