Show Posts
|
|
Pages: [1]
|
|
1
|
Using Arduino / Sensors / Re: problem: inconsistent microphone reading.
|
on: December 09, 2012, 08:27:25 am
|
|
thank you for the informative reply sir Grumpy_Mike and sir dhenry,..
i will study your suggested hardware & software solution to understand them better, with this, i hope this project of mine will be up and running soon,.. again, thank you kind sirs,..
|
|
|
|
|
3
|
Using Arduino / Sensors / Re: problem: inconsistent microphone reading.
|
on: December 07, 2012, 07:42:18 pm
|
|
good day sir, i am expecting that when i give an input to the mic, the reading will give an above 550 value throughout the duration i am giving it an input.
is there something i can do to make it consistent? or its just natural for the mic to give a low value time to time when i give an input to the mic?
|
|
|
|
|
4
|
Using Arduino / Sensors / problem: inconsistent microphone reading.
|
on: December 07, 2012, 01:12:10 pm
|
electret condenser mic to A0 of the analog input. here is my code: /* this sketch will test if the electret mic will pick up signal or input.
the output is generated in the serial monitor(ctrl+shift+m).
the output will show the range of frequencies that the mic support. */
int senseMic = 0 ; //analog pin of gizduino
void setup(){ Serial.begin(9600); }
void loop(){ Serial.println(analogRead(senseMic)); delay(500); } the schematic diagram:  the reading in serial monitor: 539 535 533 533 533 530 535 672 //i give a continuous input to the mic fro here to.. 252 757 136 757 758 //..here 533 532 536 536 546 562 170 //aslo from here to.. 487 758 310 758 758 707 //..here 547 548 542 545 546
what should i do or should i add/take to make the reading more consistent?
|
|
|
|
|
5
|
Using Arduino / Programming Questions / Re: problem: no audio output. programming problem.
|
on: December 04, 2012, 09:51:58 pm
|
At least a 120 ohms or more to stay below the 40ma absolute maximum current draw limit from an output pin. But keep in mind that means the resistor will 'consume' about 95% of the 'audio power' leaving a wimpy amount of about 13 milliwatts of audio power to drive the the 8 ohm speaker. You should look for a speaker with a much higher voice coil resistance or do as most anyone wanting to drive a 8 ohm speaker, use a audio amplifier stage or module to drive the speaker. thanks for the heads up sir,.. i will research and study about audio amplifier that you mentioned,..
|
|
|
|
|
9
|
Using Arduino / Programming Questions / problem: no audio output. programming problem.
|
on: December 04, 2012, 09:07:45 am
|
3 tact switch, 1st pin connected to 23, 24 and 25 while 2nd pin is connected to ground. 8 ohm speaker, negative in ground while positive pin is connected to pin 8. all components are operational and fine. i just have problems with the code and i dont know where i got wrong,.. 
#include "pitches.h"
byte button[] = {23, 24, 25}; //create array of buttons connected at pin 23, 24 and 25 byte speakerpin = 8; //sets speaker pin to pin 8 byte buttonset ; //variable for reading button push
void setup() { // set all pins to output pinMode(speakerpin, OUTPUT); for(int x=23; x<26; x++) { pinMode(button[x] , INPUT); digitalWrite(button[x] , HIGH); // buttons are in the high position } }
void loop(){ for(int x=23; x<26; x++){ buttonset = digitalRead(button[x]); if(buttonset == LOW){ if(x == 23){ // if button on pin 2 is pressed // if (buttonset == LOW){ tone(8, NOTE_C4); //stores the note's wavelength to be played. // } } if(x == 24){ // if (buttonset == LOW){ tone(8, NOTE_D4); // } } if(x == 25){ // if (buttonset == LOW){ tone(8, NOTE_E4); // } } else noTone(8); } } }
[/size]
|
|
|
|
|