Wave Shield with Rotary Encoder

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
adamr1
 
Posts: 120
Joined: Sun Jun 02, 2013 8:24 am

Wave Shield with Rotary Encoder

Post by adamr1 »

Can you use a wave shield and a rotary encoder with interrupts. I want to use the rotary encoder to pick a song to play by the wave shield. Documentation that I found about rotary encoders says to use pin 2 and 3 on an uno but the wave shield has those hard wired. In a perfect world, if a song were playing on the wave shield, and you turned the encoder, it would stop the current song and play the next one. From what I understand, the wave shield uses interrupts to "play in the background?" So there will be a conflict, right? And I wont be able to use a rotary encoder? Thanks

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Wave Shield with Rotary Encoder

Post by adafruit_support_mike »

I think the WaveHC library does use interrupts, but you can poll the encoder during the

Code: Select all

while ( wave.isplaying() ) {
}
loop.

A couple of digital reads won't take long. You'll get the same overall effect, even though the code doesn't respond quite as immediately as it would with an interrupt.

User avatar
adamr1
 
Posts: 120
Joined: Sun Jun 02, 2013 8:24 am

Re: Wave Shield with Rotary Encoder

Post by adamr1 »

ok thanks, I will try that.

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

Return to “Other Arduino products from Adafruit”