 Motor motor4(MOTOR4_BACK,MOTOR4_FORWARD,POTENTIOMETER4,MARGIN_MOTOR) ;
 
 
-// the setup routine runs once when you press reset:
-void setup() {                
+
+//-------------------Help functions-------------------
+
+boolean is_a_number(int n)
+{
+  return n >= 48 && n <= 57;
+}
+
+int ascii2int(int n, int byte_read)
+{
+  return n*10 + (byte_read - 48);
+}
+
+
+//-------------------Setup routine-------------------
+
+void setup() {        
+
+  Serial.begin(baudrate);  
   // // initialize the digital pin as an output.
   // pinMode(MOTOR_BACK, OUTPUT);     
   // pinMode(MOTOR_FORWARD, OUTPUT);     


}

// the loop routine runs over and over again forever:
void loop() {
  
  
  if (digitalRead(BUTTON_MEM) == HIGH) {
    memory_state1 = analogRead(POTENTIOMETER1) ;
    memory_state2 = analogRead(POTENTIOMETER2) ;
    memory_state3 = analogRead(POTENTIOMETER3) ;
    memory_state4 = analogRead(POTENTIOMETER4) ;
  }
  
  if (digitalRead(BUTTON_SET) == HIGH) {

    motor1.move_to(memory_state1);
    motor2.move_to(memory_state2);
    motor3.move_to(memory_state3);
    motor4.move_to(memory_state4);
   
  }
}

  Memorise one position
  There's 4 different motors on the chair and each one has one position
 */



//-------------------Motors-------------------

