 // I2C address of our S7S
 const byte s7sAddress = 0x71;
 
-
-
-unsigned int counter = 990;  // This variable will count up to 65k
-char tempString[10];  // Will be used with sprintf to create strings
+// Will be used with sprintf to create strings
+char tempString[10];  
+
 
 void setup()
 {
   Serial.begin(9600);
   
+  // Attach interrupts for rotary encoder
+  attachInterrupt(0, A_RISE, RISING);
+  attachInterrupt(1, B_RISE, RISING);
+    
   // Enable push button in LOW state
   pinMode(buttonPin, INPUT);
   digitalWrite(buttonPin, LOW);

  delay(500);
}

void printCounter() {
  // Magical sprintf creates a string for us to send to the s7s.
  //  The %4d option creates a 4-digit integer.
  sprintf(tempString, "%4d", counter);

  // This will output the tempString to the S7S
  s7sSendStringI2C(tempString);


void loop()
{
  if (hasButtonBeenPushed()) {
    Serial.println("Button Pushed"); 
    buttonPressCounter++;
