Instructables
loading
loading

amandaghassaei

  • Date JoinedJan 14, 2012
  • Total Views6,286,179
  • Featured %71%

Orangeboard

nafeesa12 months ago

Hello!
(regarding Arduino audio input)

my question may sound dumb but can you please let me know where to connect the probes of oscilloscope to get the figure 1 in step 5(simple analog input) ?

and am i supposed to enter the following code to get the results of figure 1 step 5?

int incomingAudio;

void setup(){

for (byte i=0;i<8;i++){

pinMode(i,OUTPUT);//set digital pins 0-7 as outputs (DAC)

}

}

void loop(){

incomingAudio = analogRead(A0);//read voltage at A0

incomingAudio = (incomingAudio+1)/4 - 1;//scale from 10 bit (0-1023) to 8 bit (0-255)

if (incomingAudio<0){//deal with negative numbers

incomingAudio = 0;

}

PORTD = incomingAudio;

}

Jan_Henrik1 year ago

Awesome website!!!

T0BY1 year ago
Thanks Amanda, will do.
T0BY1 year ago
Hi Amanda,

Do you think I have put them in the right place? I'm still completely stuck!

Many thanks for your help on this,

Toby
amandaghassaei (author)  T0BY1 year ago
I'm using Processing 2 on a mac and it's at:
Processing>Contents>Resources>Java>modes>java>libraries
Hi Amanda, thanks for that, I've got it working now! I notice you have a flat bottom to your groove but there is no mention of this that I can see in your text. I am wondering if removing this might help playback on a mono record player. What do you think? I have tried adjusting the parameters on the code to remove the flat bottom but none of them seem to remove it. Do you know how I may be able to do this?

Thanks for your help with this,

Toby
amandaghassaei (author)  T0BY1 year ago
you could try, but I found that the resin will seep into the groove too much and add noise. I did the flat bottom so I could make the grooves a little wider. If you have more questions you should post on the instructable page, that way people will find them when they're looking at the project!
thanks!
T0BY1 year ago
Hello Amanda,

I wonder if you are able to help me, I am a bit stuck! When I run the Processing Sketch I keep getting the error 'The function close() does not exist'. I have checked some forums and have made sure all the [ and ] brackets are in pairs and that the file name doesn't include the word 'close' but it's still not working. I have had to update to Processing 2 because of the computer I am using but I am using the same modelbuilder library as you did.

Many thanks,

Toby
amandaghassaei (author)  T0BY1 year ago
sounds like there's something wrong with your installation of the ModelBuilder library, what folder did you put it in?
I've found that the installation of the folder is different in Processing 2 and I have found conflicting advice on where the library needs be installed. I created the folder 'libraries' in the Processing 2 folder and have put it in there. I have also put it duplicate folders called 'libraries' in the project folders themselves. I am not sure if this duplication in itself will cause a problem.
mustafa1231 year ago
Hi,

I saw your arduino timer interrupt and found it intriguing. May I ask how do I record a 1Khz sine signal with arduino into a text file? I was wondering if you share an example code with me as so far all the experiments I been doing for it has failed in accuracy or distortion.

Thank you so much for your time
amandaghassaei (author)  mustafa1231 year ago
you mean how do you create a txt file with a 1khz sine signal so you can load it onto an arduino?
Hi Amanda,

i mean I want to use ADC to read a 1khz sine signal and write the data back to serial to be stored in a text file. I already know how to write the data back to serial.
The only problem is I do not know how to accurately use arduino to read a 1khz sine signal. I heard that timer interrupt ADC is useful, but i do not know how to implement it after going through a few tutorials. Is it possible for me to talk to you for a while when you are online to have a clearer picture or get some help from you please?
amandaghassaei (author)  mustafa1231 year ago
just use my arduino audio input instructable:
http://www.instructables.com/id/ET0U5VQH5035JJ6/
send out the variable ADCH via serial.
May I know how often you come online to check the posts?I can be online everyday just to wait for your reply.