Wave shield - external interrupt!

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm

Re: Wave shield - external interrupt!

Post by john444 »

Lennie,
lennie wrote:do i have to rethink the whole scetch?
I do not see how you can use the jack you have to provide 5v
through to the headphone.
Luckily, you may not need the 5V. If you are trying to
generate an interrupt when the headphones are not plugged
in, then it may work to connect the interrupt to pin 3 or 4.
When the headphone is plugged-in, pins 3 & 4 are disconnected.
Use a pull-down resistor to hold the interrupt pin 'off'.
When the headphone is not plugged-in, then pin 3 will be
connected to pin 2 (right or left channel, does not matter).
The signal from the WaveShield should trigger the interrupt.

Does that sound like what you need?

Starting the WaveShield again is a different issue.
John

lennie
 
Posts: 24
Joined: Fri Jul 06, 2012 5:32 am

Re: Wave shield - external interrupt!

Post by lennie »

yes, having removed the 5v from the headphone: it is louder and a good sound quality, but the interrupt,to start the file when inplugged and stopp it and rewind when unplugged doesn't function anymore.

when i in and unplug several time after another (like the installtaion should be used at the end) the file should play from the beginning each time, but doesn't.

lennie
 
Posts: 24
Joined: Fri Jul 06, 2012 5:32 am

Re: Wave shield - external interrupt!

Post by lennie »

yes. the sound was louder and better quality without having 5 v connected to the jack.

but the interrupt doesn't work anymore now: when inplugged the sound plays but doesn't stop and rewind when unplugged. after the second inplugg it doesnT play from the beginning on but from the middle somewhere.

is there a better way to integrate an interrupt?

lennie
 
Posts: 24
Joined: Fri Jul 06, 2012 5:32 am

Re: Wave shield - external interrupt!

Post by lennie »

sorry i havent seen the last comment. so the last two os mine shouldnt be there.

lennie
 
Posts: 24
Joined: Fri Jul 06, 2012 5:32 am

Re: Wave shield - external interrupt!

Post by lennie »

hi john.

thank you. this means when inplugged the file can play from the start when unplugged it stops /rewinds and starts from the beginning when the second inplug happens. right?

User avatar
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm

Re: Wave shield - external interrupt!

Post by john444 »

Lennie,

It sounds as if you need a +5V on the interrupt pin to 'stop' the audio
from the WaveShield. Also, you must GND the interrupt pin to 'start'
the audio. Is this correct?

If that is the case, then you may be able to use a transistor (2N2222 or FET),
diode and capacitator to make a integrator that will hold the interrupt pin
at GND while there is audio but go to +5V when there is no audio.
The problem I see is that the transistor may pull the interrupt pin to GND
when you plug in the headphones but, without some experimenting, it may not.
This means that when you un-plug your headphones it would stop the audio but,
it may not start the playback when you plug-in your headphones.

If you have these common electronic parts you could give it a try.
2n2222, 10K x3, 1N4148, 0.001uF

John

lennie
 
Posts: 24
Joined: Fri Jul 06, 2012 5:32 am

Re: Wave shield - external interrupt!

Post by lennie »

okay.I will try this.

if you have an example scetch of an integrator made out of a transistor, diode and a capacitor it would be really helpful to follow.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”