Wave Shield Distortion

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
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: Wave Shield Distortion

Post by soerena »

actually, if you look closer at my playComplete, I have removed the while(1){} in order for it to be able to check for other buttons.

so this could actually be the problem? that the arduino is doing other stuff while playing?? wow this is getting interesting

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: Wave Shield Distortion

Post by soerena »

i just tried putting back the while(1), and now there's no distortion!! wauw!

So I need to find some kind of work-around, for it to listen for other buttons without distorting while playing.. any ideas?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Wave Shield Distortion

Post by adafruit_support_bill »

The playback is interrupt-driven, so normal program execution should not affect it. However, it is possible that the i2c communication disables interrupts long enough to disrupt the timing.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: Wave Shield Distortion

Post by soerena »

OK, so it seems to be the I2C read that I'm doing that causes the distortion. A few delays for debouncing doesn't affect the sound.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Wave Shield Distortion

Post by adafruit_support_bill »

Delays should be fine. The delay function does not disable interrupts.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: Wave Shield Distortion

Post by soerena »

So reading an I2C device disables interrupts, but writing doesn't?
Because I'm writing without any audible issues, but as soon as I start reading there's distortion.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Wave Shield Distortion

Post by adafruit_support_bill »

Writing does not need to use interrupts. The writer is in control of the bus and does not need to respond to asynchronously received data.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: Wave Shield Distortion

Post by soerena »

Thanks Bill! That cleared up some stuff.

So now that I can't use the I2C for reading, I guess I'll have to make a resistor ladder on my device nr 2 as well since I only have 11 available IO's on the board.
Are there any work-arounds, alternatives or is this really what I have to do? If so, then I'm in a hell of a hurry to rearrange my circuit and everything.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Wave Shield Distortion

Post by adafruit_support_bill »

Options I can see are:

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

Return to “Arduino Shields from Adafruit”