proximity sensor + electret microphone = no compatible??
hey guys,
i having trouble when connect , infrared proximity sensor (http://www.sparkfun.com/products/242) , preamplified electret microphone (http://www.sparkfun.com/products/9964).
when connect sensors separately, work perfect, when connect both electret microphone reads signal of 1023 (5v) @ time.
do have voltage different power sources? weird.
thanks,
here leave electret mic sketch read signal if necessary.
i having trouble when connect , infrared proximity sensor (http://www.sparkfun.com/products/242) , preamplified electret microphone (http://www.sparkfun.com/products/9964).
when connect sensors separately, work perfect, when connect both electret microphone reads signal of 1023 (5v) @ time.
do have voltage different power sources? weird.
thanks,
here leave electret mic sketch read signal if necessary.
code: [select]
const int micpin = a2;
int valuemic = 0;
int valuemicmax = 512;
int valuemicmin = 512;
void setup() {
serial.begin(9600);
}
void loop() {
(int =0; < 100; i++){
valuemic = analogread(micpin);
if (valuemic > valuemicmax){
valuemicmax = valuemic;
} else {
if (valuemic < valuemicmin){
valuemicmin = valuemic;
}
}
}
valuemic = valuemicmax-valuemicmin;
serial.println(valuemic);
valuemicmax = 512;
valuemicmin = 512;
}
how wiring them exactly? code doesn't mention proximity sensor.
Arduino Forum > Using Arduino > General Electronics > proximity sensor + electret microphone = no compatible??
arduino
Comments
Post a Comment