 
 #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 
 

    newPosition = myEnc.read();
    if ((newPosition != oldPosition) )
    {
      if (newPosition < VALMIN * 4)
        {
          myEnc.write(VALMIN * 4);
          newPosition = 0;
        }
        else if (newPosition > VALMAX * 4)
        {
          myEnc.write(VALMAX * 4);
          newPosition = 40; 
        }
        else

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

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