 #define BUTTON_BACK 1
 #define BUTTON_ENTER 8
 
+short rtiStep;
+
+SoftwareSerial rtiSerial(RTI_RX_PIN, RTI_TX_PIN);
+
 LinFrame frame = LinFrame();
 
-unsigned long currentMillis, lastHeartbeat, lastBackDown, lastEnterDown, lastMouseDown;
+unsigned long currentMillis, lastHeartbeat, lastBackDown, lastEnterDown, lastMouseDown, lastRtiWrite;
 int mouseSpeed = MOUSE_BASE_SPEED;
+short state = STATE_OFF;
 
 void setup() {
   pinMode(RX_LED, OUTPUT);
-  
+
   pinMode(CS_PIN, OUTPUT);
   digitalWrite(CS_PIN, HIGH);
 
-  Serial.begin(9600);
+//  Serial.begin(9600);
   Serial1.begin(9600);
+  rtiSerial.begin(2400);
 
   Mouse.begin();
   Keyboard.begin();
+
+  pinMode(MOBILE_CHARGER_PIN, OUTPUT);
+  analogWrite(MOBILE_CHARGER_PIN, 0);
 }
 
 void loop() {
   currentMillis = millis();
-  
+
   if (Serial1.available())
     read_lin_bus();
 
   release_keys();
   check_ignition_key();
+  rti();
 }
 
 void read_lin_bus() {

  if (!frame.isValid())
    return;

//  dump_frame();
  handle_joystick();
  handle_buttons();  
}

void handle_joystick() {

    return;

  lastHeartbeat = currentMillis;

  // skip zero values 20 0 0 0 0 FF
  if (frame.get_byte(5) == 0xFF)
    return;
