I have a problem in a new Yun that wasn't there in an older version. I have been using the Yun to control my DAC in a sound system for over a year. I replaced the old Yun with a new Arduino.org version from Sparkfun. Now the rotary encoder that used pin 7 interrupts (together with pin 5) is no longer working. I've researched the forum and pin 7 problems are not new but a solution has not surfaced in my addled mind.
#define VOLDOWNPIN 7 // Button to decrease volume or RotEnc B terminal
// Rotary encoder interrupt service routine
static boolean rotating=false;
void rotEncoder()
{
rotating=true; // If motion is detected in the rotary encoder, set the flag to true
}
// Attach Interrupts
attachInterrupt(digitalPinToInterrupt(VOLDOWNPIN), rotEncoder, CHANGE);// ISR for rotary encoder
pinMode(VOLDOWNPIN, INPUT); // Button switch or Encoder pin for volume down
digitalWrite(VOLDOWNPIN, HIGH); // If H/W debouncing is implemented, set to LOW
if (digitalRead(5) == digitalRead(7)) // CCW
Do things...
The encoder checks out with a multimeter. An ideas?
Thanks in advance,
Ron