Okey guys, here it is, but its alot of code 
And notes in Swedish.
The ERROR code is marked, almost lowest position in the code.
This machine/code can take the motor backward or forward, by pressing two buttons.
It can save a position to memory to be used as a "programmed motor stop" when passing by that position of the motor (motor with sensors, wich gives me pulses).
What it cant to, is to use this saved position in the code.
I want it to update the new position/number, everytime i press one button.
:o
CODE PART 1
// ---- MOTOR CONST INTARNA - DESSA GÅR TILL H-BRYGGAN ----
const int controlPin1 = 7;
const int controlPin2 = 6;
const int enablePin = 9;
#include <Wire.h> // Tillåter I2C kommunikation - Pins A4 (SDA), A5 (SCL)
#include <LiquidCrystal_I2C.h> // Denna aktiverar LCD
#include <EEPROM.h> // Denna aktiverar EEPROM minnet
// DESSA TILLHÖR GRAFIK O PULSRÄKNINGEN
char lineText[]=" Hoy! Denna text syns ingenstans. ";
int sensor01;
int sensor02;
int stepOld;
int step;
long PulseCount;
// ---- MOTOR TEST INT ---------------------------------------------------------------------------------
int intest1Pin = 4; // KNAPP 1 - Kabel GRÅ - Går åt plus hållet - UPP
int intest2Pin = 5; // KNAPP 2 - Kabel GRÖN - Går åt minus hållet - NER
int intest3Pin = 10; // KNAPP 3 - Kabel SVART - SPARA POSITION - Minnet SPARA
int intest4Pin = 11; // KNAPP 4 - Kabel BLÅ - VISA SPARAD POSITION - Minnet LÄS
int stopsensor1Pin = 12; // SENSOR 1 - Kabel GRÖN - Enskild sensor - STOPPAR NER
int stopsensor2Pin = 8; // SENSOR 2 - Kabel GRÅ - Enskild sensor - STOPPAR UPP
int stopsensor3Pin = 15; // SENSOR 3 - Kabel ROSA - Enskild sensor - TOTALSTOPP
int val = 0;
int tonePin = 13; // --- BEEPER ---
// DESSA TILLHÖR GRAFIK O PULSRÄKNINGEN - I2C
// initialize the library with the numbers of the interface pins
// 0x27 adressen hittades via I2C scanner på den med svart tejp - De andra hade 0x3F
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// Aktivera denna rad, och av-avaktivera den ovanför, om någon av de andra I2C displayerna ska användas
// LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// DESSA TILLHÖR GRAFIK O PULSRÄKNINGEN
#define SENSOR_A 3
#define SENSOR_B 2
void checkState()
{
sensor01 = digitalRead(SENSOR_A);
sensor02 = digitalRead(SENSOR_B);
if(sensor01 == 1 && sensor02 == 1){
step = 0;
if(stepOld == 1){
PulseCount--;
}
if(stepOld == 3){
PulseCount++;
}
stepOld = 0;
}
if(sensor01 == 0 && sensor02 == 1){
step = 1;
if(stepOld == 2){
PulseCount--;
}
if(stepOld == 0){
PulseCount++;
}
stepOld = 1;
}
if(sensor01 == 0 && sensor02 == 0){
step = 2;
if(stepOld == 3){
PulseCount--;
}
if(stepOld == 1){
PulseCount++;
}
stepOld = 2;
}
if(sensor01 == 1 && sensor02 == 0){
step = 3;
if(stepOld == 0){
PulseCount--;
}
if(stepOld == 2){
PulseCount++;
}
stepOld = 3;
}
}
// VOID SETUP - KÖRS BARA EN GÅNG I BÖRJAN, EN FÖRBEREDELSE, LOOP ÄR EXEKVERING OCH GÖR DET MESTA JOBBET
// DESSA TILLHÖR GRAFIK O PULSRÄKNINGEN
void setup()
{
// TA BORT DESSA RADER OM DE EJ HJÄLPER - TILLHÖR EEPROM läsningen
float f = 0.00f; //Variable to store data read from EEPROM.
int eeAddress = 0; //EEPROM address to start reading from
Serial.begin(9600);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print(" ");
attachInterrupt(0, checkState, CHANGE);
attachInterrupt(1, checkState, CHANGE);
PulseCount = 0;
// TEST MOTOR - VOID SETUP ---------------------------------------------------------------------------------
pinMode(intest1Pin, INPUT); //Declarar denna som input UNO input är 4 Knapp 1 Grå UPP
pinMode(intest2Pin, INPUT); //Declarar denna som input UNO input är 5 Knapp 2 Grön NER
pinMode(intest3Pin, INPUT); //Declarar denna som input UNO input är 10 Knapp 3 Svart SPARA POSITION
pinMode(intest4Pin, INPUT); //Declarar denna som input UNO input är 11 Knapp 4 Blå VISA SPARAD POSITION
pinMode(stopsensor1Pin, INPUT); //Declarar denna som input UNO input är 12 grön
pinMode(stopsensor2Pin, INPUT); //Declarar denna som input UNO input är 8 grå
pinMode(stopsensor3Pin, INPUT); //Declarar denna som input UNO input är 15 (A1) rosa
// Högtalare
pinMode(tonePin, OUTPUT);
// ---- LCD start presentationen
{
lcd.setCursor(2, 0);
lcd.print("PROTOTYPE");
Serial.println(" Boot initialized ");
delay(500);
// lcd.clear();
lcd.setCursor(11, 1);
lcd.print("9");
delay(100);
lcd.setCursor(11, 1);
lcd.print("90");
delay(100);
lcd.setCursor(11, 1);
lcd.print("90E");
delay(900);
lcd.clear();
lcd.setCursor(2, 0);
lcd.print("Prototype 1.0");
delay(200);
lcd.setCursor(0, 1);
lcd.print("www.");
delay(100);
lcd.setCursor(12, 1);
lcd.print(".se");
delay(100);
lcd.setCursor(0, 1);
lcd.print("www.PROTOTYPE.se");
delay(250);
lcd.setCursor(0, 1);
lcd.print("www.PROTOTYPE.se");
Serial.println("unit is active ");
delay(800);
lcd.clear();
}
}
void loop()
{
// DESSA TILLHÖR GRAFIK O PULSRÄKNINGEN
// LCD set the cursor to column 0, line 1 (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 0);
lcd.print("Pulses:");
if(PulseCount > -1){
lcd.print(" ");
}
if(PulseCount < 10 && PulseCount > -10){
lcd.print(" ");
}
if(PulseCount < 100 && PulseCount > -100){
lcd.print(" ");
}
lcd.print(PulseCount);
if(sensor01 == 1){
lcd.print(" HIGH");
}
else{
lcd.print(" LOW ");
}
lcd.setCursor(0, 1);
if(sensor02 == 1){
lcd.print(" HIGH");
}
else{
lcd.print(" LOW ");
}