the aim of my project, is to build a simple system which takes voice via MIC and translates it into a digital representation zeros and ones. this output then is connected to LEDs . the board i am using is Arduino due.
could anyone helps me out to get the source code?!!
thank you very much for replying. my aim is establishing a simple telecommunication link between two point using visible light. at the transmitter, voice signal obtained by microphone then translated to digital by ADC and then sent by LEDs ,very much like On-Off Keying modulation. The LEDs work here as an antenna.
at the receiver point, a photo-detector receives the transmitted signal. the transmitted signal then converted to analog by DAC and then fed it to a headset to hear it.
then translated to digital by ADC and then sent by LEDs ,very much like On-Off Keying modulation
If you just use the analogue value to set the brightness you will need a D/A because the PWM period will be too slow. The other problem using amplitude modulation like this is that you need a much bigger signal to prevent it dropping out at low volumes. You could always up the PWM speed to something like 38KHz but that puts a constraint on the speed that the detector has to work at. The difficult part is going to be the receiver. You need to sort out exactly what your hardware is going to be before you worry about code.
i parched two Arduino Due board to use then in this project .
why i am using digital output ?
"based on my poor understanding" a sequence of digital values that have converted voice signal allows me to use channel coding to detect and fixed some bits at the receiver side which have been damaged in the transmission link.
What is this?
You can not use data correction without building up some redundancy in your code, that is adding another layer of complexity and will require you to transmit data even faster.
With the help of the examples i've learnt some of basics on using Arduino Due. this code below is what i've reached so for.
void setup() {
Serial.begin(9600);
//pinMode(24,OUTPUT);
}
void loop() {
// analogReadResolution(12);
int VoiceInput = analogRead(A4);
Serial.println(VoiceInput);
delay(1);
}
==========================================================================================
As it illustrated in the sketch, i able to see the voice input signal though Serial Monitor window.
i stopped here!!!
my questions:
is there a function that i can use to take the data from analogReadResolution(12) and then connected into one of the digital output?
if not, can i see the address i am using to save voice input , because i am thinking i might be able to store the input data after converted by the commend analogReadResolution(12) and then connected to a digital output if it is possible?!!
sorry for the unprofessional description i am very very beginner in embedded circuits,
m_lab85:
because of Lack of sufficient time to submit my project, the coding part of my project is excluded from my project.
You misunderstand. Not the code and in the computer instructions but the coding, as in how you are going to take your audio modulation and put it out to light an LED. Without knowing that you can not begin to do anything.
is there a function that i can use to take the data from analogReadResolution(12) and then connected into one of the digital output?
No but you could connect it to an analogue output. Use the dacc_write_conversion_data() function. Call the analogWriteResolution(12) in setup() first.
can i see the address i am using to save voice input