I was hoping someone would help me out with my code. For some reason, the two sections, the microphone, and proximity sensor don't work together. With everything untouched and uncommented, the proximity sensor section only works. I would have to comment out that section for the microphone section to work. Is there any reason why this is happening? Is there a possibility that this can be fixed?
int soundDetectedPin = 8; // Use Pin 10 as our Input
const int in_1 = 8 ;
You appear to be using pin 8 for two different things. What is actually connected to it ?