Skip to main content
Post Closed as "Needs more focus" by Juraj, Dmitry Grigoryev, Delta_G, MatsK, Glorfindel
added 4 characters in body
Source Link
yaya
  • 1
  • 2

I am working on a final project called sound source localization using Arduino Uno. I want to use two sound sensor to capture a sound. The nature of the sound is clap or speech sound. I want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle. My supervisor said to me you have to store the values on analogRead in two arrays then cross correlation the element of two arrays. But i am struggle the cross correlation part. I will appreciate any help from you guys.

#define LED_NORTH 2
#define LED_SOUTH 4

#define MIC_NORTH A0
#define MIC_SOUTH A2

/* let's said we want to read 100 samples */ 
const unsigned int numReadings = 100;
unsigned int analogVals[numReadings];
unsigned int i = 0;

void setup() {
  Serial.begin(115200);
  pinMode(LED_NORTH, OUTPUT);
  digitalWrite(LED_NORTH, LOW);
  pinMode(LED_SOUTH, OUTPUT);
  digitalWrite(LED_SOUTH, LOW);
}

void loop() {
  int north = analogRead(MIC_NORTH); 
  Serial.printprintln(north);
  int south = analogRead(MIC_SOUTH); 
  Serial.printprintln(south);
  /* take numReadings # of readings and store into array */
  for(unsigned int i = 0; i < numReadings; i++)
  {
    analogVals[i] = analogRead(A0);
    delay(1000); 
  }

I am working on a final project called sound source localization using Arduino Uno. I want to use two sound sensor to capture a sound. The nature of the sound is clap or speech sound. I want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle. My supervisor said to me you have to store the values on analogRead in two arrays then cross correlation the element of two arrays. But i am struggle the cross correlation part. I will appreciate any help from you guys.

#define LED_NORTH 2
#define LED_SOUTH 4

#define MIC_NORTH A0
#define MIC_SOUTH A2

/* let's said we want to read 100 samples */ 
const unsigned int numReadings = 100;
unsigned int analogVals[numReadings];
unsigned int i = 0;

void setup() {
  Serial.begin(115200);
  pinMode(LED_NORTH, OUTPUT);
  digitalWrite(LED_NORTH, LOW);
  pinMode(LED_SOUTH, OUTPUT);
  digitalWrite(LED_SOUTH, LOW);
}

void loop() {
  int north = analogRead(MIC_NORTH); 
  Serial.print(north);
  int south = analogRead(MIC_SOUTH); 
  Serial.print(south);
  /* take numReadings # of readings and store into array */
  for(unsigned int i = 0; i < numReadings; i++)
  {
    analogVals[i] = analogRead(A0);
    delay(1000); 
  }

I am working on a final project called sound source localization using Arduino Uno. I want to use two sound sensor to capture a sound. The nature of the sound is clap or speech sound. I want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle. My supervisor said to me you have to store the values on analogRead in two arrays then cross correlation the element of two arrays. But i am struggle the cross correlation part. I will appreciate any help from you guys.

#define LED_NORTH 2
#define LED_SOUTH 4

#define MIC_NORTH A0
#define MIC_SOUTH A2

/* let's said we want to read 100 samples */ 
const unsigned int numReadings = 100;
unsigned int analogVals[numReadings];
unsigned int i = 0;

void setup() {
  Serial.begin(115200);
  pinMode(LED_NORTH, OUTPUT);
  digitalWrite(LED_NORTH, LOW);
  pinMode(LED_SOUTH, OUTPUT);
  digitalWrite(LED_SOUTH, LOW);
}

void loop() {
  int north = analogRead(MIC_NORTH); 
  Serial.println(north);
  int south = analogRead(MIC_SOUTH); 
  Serial.println(south);
  /* take numReadings # of readings and store into array */
  for(unsigned int i = 0; i < numReadings; i++)
  {
    analogVals[i] = analogRead(A0);
    delay(1000); 
  }
Code formatting.
Source Link
Edgar Bonet
  • 45.2k
  • 4
  • 42
  • 81

iI am working on a final project called sound source localization using arduino unoArduino Uno.i I want to use two sound sensor to capture a sound  .the The nature of the sound is clap or speech sound.i I want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle  .My superviser My supervisor said to me you have to store the values on analogreadanalogRead in two arrays then cross correlation the element of two arrays.but But i am struggle the cross correlation part. iI will appreciate any help from you guys  .

#define LED_NORTH 2 #define LED_SOUTH 4

#define MIC_NORTH A0 #define MIC_SOUTH A2

/* let's said we want to read 100 samples */

const unsigned int numReadings = 100;

unsigned int analogVals[numReadings];

unsigned int i = 0;

void setup() {

Serial.begin(115200);

pinMode(LED_NORTH, OUTPUT);

digitalWrite(LED_NORTH, LOW);

pinMode(LED_SOUTH, OUTPUT);

digitalWrite(LED_SOUTH, LOW);

}

void loop() {

int north = analogRead(MIC_NORTH);

Serial.print(north);

int south = analogRead(MIC_SOUTH);

Serial.print(south);

/* take numReadings # of readings and store into array */

for(unsigned int i=0;i<numReadings;i++) {

analogVals[i] = analogRead(A0);

delay(1000); 

}

#define LED_NORTH 2
#define LED_SOUTH 4

#define MIC_NORTH A0
#define MIC_SOUTH A2

/* let's said we want to read 100 samples */ 
const unsigned int numReadings = 100;
unsigned int analogVals[numReadings];
unsigned int i = 0;

void setup() {
  Serial.begin(115200);
  pinMode(LED_NORTH, OUTPUT);
  digitalWrite(LED_NORTH, LOW);
  pinMode(LED_SOUTH, OUTPUT);
  digitalWrite(LED_SOUTH, LOW);
}

void loop() {
  int north = analogRead(MIC_NORTH); 
  Serial.print(north);
  int south = analogRead(MIC_SOUTH); 
  Serial.print(south);
  /* take numReadings # of readings and store into array */
  for(unsigned int i = 0; i < numReadings; i++)
  {
    analogVals[i] = analogRead(A0);
    delay(1000); 
  }

i am working on a final project called sound source localization using arduino uno.i want to use two sound sensor to capture a sound  .the nature of the sound is clap or speech sound.i want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle  .My superviser said to me you have to store the values on analogread in two arrays then cross correlation the element of two arrays.but i am struggle the cross correlation part. i will appreciate any help from you guys  .

#define LED_NORTH 2 #define LED_SOUTH 4

#define MIC_NORTH A0 #define MIC_SOUTH A2

/* let's said we want to read 100 samples */

const unsigned int numReadings = 100;

unsigned int analogVals[numReadings];

unsigned int i = 0;

void setup() {

Serial.begin(115200);

pinMode(LED_NORTH, OUTPUT);

digitalWrite(LED_NORTH, LOW);

pinMode(LED_SOUTH, OUTPUT);

digitalWrite(LED_SOUTH, LOW);

}

void loop() {

int north = analogRead(MIC_NORTH);

Serial.print(north);

int south = analogRead(MIC_SOUTH);

Serial.print(south);

/* take numReadings # of readings and store into array */

for(unsigned int i=0;i<numReadings;i++) {

analogVals[i] = analogRead(A0);

delay(1000); 

}

I am working on a final project called sound source localization using Arduino Uno. I want to use two sound sensor to capture a sound. The nature of the sound is clap or speech sound. I want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle. My supervisor said to me you have to store the values on analogRead in two arrays then cross correlation the element of two arrays. But i am struggle the cross correlation part. I will appreciate any help from you guys.

#define LED_NORTH 2
#define LED_SOUTH 4

#define MIC_NORTH A0
#define MIC_SOUTH A2

/* let's said we want to read 100 samples */ 
const unsigned int numReadings = 100;
unsigned int analogVals[numReadings];
unsigned int i = 0;

void setup() {
  Serial.begin(115200);
  pinMode(LED_NORTH, OUTPUT);
  digitalWrite(LED_NORTH, LOW);
  pinMode(LED_SOUTH, OUTPUT);
  digitalWrite(LED_SOUTH, LOW);
}

void loop() {
  int north = analogRead(MIC_NORTH); 
  Serial.print(north);
  int south = analogRead(MIC_SOUTH); 
  Serial.print(south);
  /* take numReadings # of readings and store into array */
  for(unsigned int i = 0; i < numReadings; i++)
  {
    analogVals[i] = analogRead(A0);
    delay(1000); 
  }
deleted 32 characters in body
Source Link
yaya
  • 1
  • 2

i am working on a final project called sound source localization using arduino uno.i want to use two sound sensor to capture a sound .the nature of the sound is clap or speech sound.i want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle .My superviser said to me you have to store the values on analogread in two arrays then cross correlation the element of two arrays.but i am struggle the cross correlation part. i will appreciate any help from you guys .

#define LED_NORTH 2 #define LED_SOUTH 4

#define MIC_NORTH A0 #define MIC_SOUTH A2

/* let's said we want to read 100 samples */

const unsigned int numReadings = 100;

unsigned int analogVals[numReadings];

unsigned int i = 0;

void setup() {

Serial.begin(115200);

pinMode(LED_NORTH, OUTPUT);

digitalWrite(LED_NORTH, LOW);

pinMode(LED_SOUTH, OUTPUT);

digitalWrite(LED_SOUTH, LOW);

}

void loop() {

int north = analogRead(MIC_NORTH);

Serial.print(north);

int south = analogRead(MIC_SOUTH);

Serial.print(south);

int values[] = {north, south};

/* take numReadings # of readings and store into array */

for  (unsigned int i=0; i<numReadings; i++i=0;i<numReadings;i++) { analogVals[i] = analogRead(A0);

analogVals[i] = analogRead(A0);

delay(1000); 

}

i am working on a final project called sound source localization using arduino uno.i want to use two sound sensor to capture a sound .the nature of the sound is clap or speech sound.i want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle .My superviser said to me you have to store the values on analogread in two arrays then cross correlation the element of two arrays.but i am struggle the cross correlation part. i will appreciate any help from you guys .

#define LED_NORTH 2 #define LED_SOUTH 4

#define MIC_NORTH A0 #define MIC_SOUTH A2

/* let's said we want to read 100 samples */

const unsigned int numReadings = 100;

unsigned int analogVals[numReadings];

unsigned int i = 0;

void setup() {

Serial.begin(115200);

pinMode(LED_NORTH, OUTPUT);

digitalWrite(LED_NORTH, LOW);

pinMode(LED_SOUTH, OUTPUT);

digitalWrite(LED_SOUTH, LOW);

}

void loop() {

int north = analogRead(MIC_NORTH);

Serial.print(north);

int south = analogRead(MIC_SOUTH);

Serial.print(south);

int values[] = {north, south};

/* take numReadings # of readings and store into array */

for  (unsigned int i=0; i<numReadings; i++) { analogVals[i] = analogRead(A0);

delay(1000); 

}

i am working on a final project called sound source localization using arduino uno.i want to use two sound sensor to capture a sound .the nature of the sound is clap or speech sound.i want to use the cross correlation method to estimate the time delay between the microphones then find the position and angle .My superviser said to me you have to store the values on analogread in two arrays then cross correlation the element of two arrays.but i am struggle the cross correlation part. i will appreciate any help from you guys .

#define LED_NORTH 2 #define LED_SOUTH 4

#define MIC_NORTH A0 #define MIC_SOUTH A2

/* let's said we want to read 100 samples */

const unsigned int numReadings = 100;

unsigned int analogVals[numReadings];

unsigned int i = 0;

void setup() {

Serial.begin(115200);

pinMode(LED_NORTH, OUTPUT);

digitalWrite(LED_NORTH, LOW);

pinMode(LED_SOUTH, OUTPUT);

digitalWrite(LED_SOUTH, LOW);

}

void loop() {

int north = analogRead(MIC_NORTH);

Serial.print(north);

int south = analogRead(MIC_SOUTH);

Serial.print(south);

/* take numReadings # of readings and store into array */

for(unsigned int i=0;i<numReadings;i++) {

analogVals[i] = analogRead(A0);

delay(1000); 

}

added 792 characters in body
Source Link
yaya
  • 1
  • 2
Loading
Source Link
yaya
  • 1
  • 2
Loading