Hi! I am a newbie to the arduino and I have been trying to connect both the ultrasonic sensor and the sound sensor on one breadboard. In the serial monitor the microphone returns constant value of 1023, but the ultrasonic sensor works fine. I tested them separately, they work fine by themselves. Could someone please tell how to connect them properly on a breadboard? It seems like the connection is causing athe problem.
upd. here is the diagram, I am sorry for the inconvenience. instead of the red sensor I am using the pinned one.
Your sketch will tell you. Look for trigPin and echoPin and outPin (whatever you are using for audio out). Connect the pins of your sensors according to your sketch to the pin numbers of your Arduino. Might be 3, 2 and A3.
Well I checked it and tried to correct it and now the values of the sound sensor are starting around 400 and keep falling until 340~ and it doesn't react to the sound. neither the led in the sensor nor the serial monitor
Do you mean adjusting the potentiometer? I didn't try it yet. My teacher told me I can try setting the pin of the sound sensor on HIGH permanentely, and actually the LED on the sensor began working coherently(when I make a sound it blinks, but before this adjustment it didn't work at all), but not the serial monitor output, it still the same descending values
Oh, the module you post is not the same as the schematic. The module you have will only produce a 1 or a 0 depending upon the R setting of the pot. The module you have is the wrong module for reading analog values.