 
 #define MENUELEMENTS 4 //number of elements in the menu
 
+#define ENCODERSTEPS 2
 #define VALMIN 0 //min value of the new balance in the write sequence.
 #define VALMAX 99999 //maw value of the new balance in the write sequence 
 

    {
       myEnc.write(0);
    }
    Serial.println(newPosition / 4);
    cycleMenu = (abs(newPosition) / 4) / MENUELEMENTS;
    lcd.clear();
  }
}

void loop(void)
{
 byte relativePosition = (abs(oldPosition) / 4) - (cycleMenu * MENUELEMENTS);
  lcd.setCursor(0,0);
  lcd.print(menuStrings[relativePosition][0]);
  lcd.setCursor(0,1);

          lcd.clear();
          lcd.print("New balance :");
          lcd.setCursor(0,1);
          lcd.print(newPosition / ENCODERSTEPS);
          
          oldPosition = newPosition;
          Serial.println(newPosition / ENCODERSTEPS);  
         } 
    }
  }
  myEnc.write(0);
  oldPosition = -1;
  return (newPosition / ENCODERSTEPS);
}

void nfc_write()
