Jump to content

svarne

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by svarne

  1. Hy,

    thanks for your posts, i get it work but not as i wanted.

    But first here a few pictures of my cockpit

    I have build here 3 different input types: Joystick, Keyboard and arduino

    The Joystik controls Pitch and Yaw, Firebutton is Stage, then switch map SAS and RSC activate/deaktivate and controls view

    The Linear Poti with the red cap controls the Throttle. The big hole there was a mistake but later it will cool the Hand with a Computer fan.

    Then we have the three LEDs, The Display and the poti under the display is to switch the display. Actually 4 Modes. 1 AP and EP 2. Altitude 3. MonoP and Electric Charge 4. Time to Node and DeltaV

    The small Joystik on the left Controls Translation Up,Down,Left,Right. The two red buttons control the Roll Axis. The small button under the Joystik Controls RCS Foward and Backward.

    20160913_142028.jpg

     

    20160913_142039.jpg

    Here is a video from the start.

    As you can see the start works nearly correctly. With two exceptions. RCS and SAS won´t go active. (At home SAS and RCS went active after the for loop)  And the stage should be switched after countdown goes to 1.

     if ( start == HIGH)
    {
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("KSP Start Check");
          delay(500);
          //RCS Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***RCS Check****");
          delay(1000);
          //RCS Einschalten
          CPacket.MainControls |= (1 << 6);       
          lcd.setCursor(0,1);
          lcd.print("Checked");
          delay(1000);
          //SAS Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***SAS Check****");
          delay(1000);
          //SAS Einschalten
        CPacket.MainControls |= (1 << 7);      
          lcd.setCursor(0,1);
          lcd.print("Checked");
          delay(1000);
          lcd.clear();
          lcd.setCursor(0,0);
          lcd.print("****LED Check***");
          digitalWrite(GLED,HIGH);
          delay(1000);
          digitalWrite(YLED,HIGH);
          delay(1000);
          digitalWrite(RLED,HIGH);
          delay(1000);
          digitalWrite(GLED,LOW);
          delay(1000);
          digitalWrite(YLED,LOW);
          delay(1000);
          digitalWrite(RLED,LOW);
          lcd.setCursor(0,1);
          lcd.print("Checked");
          //Fuel Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***Fuel Check***");
          delay(1000);
          //Fuel Auslesen
          lcd.setCursor(0,1);
          lcd.print(VData.LiquidFuelTot);
          delay(1000);
                //MonoP Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***MonoP Check**");
          delay(1000);
          //MonoP Auslesen
          lcd.setCursor(0,1);
          lcd.print(VData.MonoPropTot);
          delay(1000);
          //Power Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("*E Charge Check*");
          delay(1000);
          //Echarge Auslesen
          lcd.setCursor(0,1);
          lcd.print(VData.ECharge);
          delay(1000);
          lcd.clear();
          for ( int t = 10 ; t >= 0 ; t--)
          {
            if(t |= 0)
            { 
             lcd.setCursor(0, 0);
             lcd.print("Ready to start");
             lcd.setCursor(0,1);
             lcd.print(t);
             delay(1000);
             lcd.clear();
           }
            else
            {
              CPacket.MainControls |= (1 << n);       
              lcd.setCursor(0,0);
              lcd.clear();
              lcd.print("*****Engage*****");
              delay(2000);
           }
      }
        start = LOW;
      lcd.clear();
    }
    
    }

    if i set start = low it won´t restart anymore.

    For the "Waiting for KSP" Loop i have actually no solution.

     

    With target i mean if you select an other Vehicle for Docking etc KSp schow you the distance an relative speed to the target. I want this informations on my display.

     

  2. Hy everyone,

    i have a few Questions. I´m trying to build my own KSP Cockipt. Now i have some problems and hope you can help me.

    First i wanted that my Display shows "Waiting for KSP" until it the variable Connected is true.

    The Display show the text but when i go to the Lunch Pad the Text still stand there an the green light won´t turn on.

     if (Connected == false)
    {
          lcd.setCursor(0, 0);
          lcd.print("Waiting for KSP");
          for ( int i; i <= 15 ; i++)
          {
          lcd.setCursor(i, 1);
          lcd.print(".");
          delay (1000);
          }
    }

    The other thing that i don´t understand is, i have a button which should start a startcheck after that a countdown should count to zero and the rocket should start.

    But when i push the button the display shows the information i wanted but ignore the for loop and restart the whole prozedure and the green light turn of and looped it as long as i uploaded the same code or restart the arduino uno.

    void startcheck ()
    {
      if ( start == true)
      {
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("KSP Start Check");
          delay(500);
          //RCS Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***RCS Check****");
          delay(1000);
          //RCS Einschalten
          lcd.setCursor(0,1);
          lcd.print("Checked");
          delay(1000);
          //SAS Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***SAS Check****");
          delay(1000);
          //SAS Einschalten
          lcd.setCursor(0,1);
          lcd.print("Checked");
          delay(1000);
          //Fuel Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***Fuel Check***");
          delay(1000);
          //Fuel Auslesen
          lcd.setCursor(0,1);
          lcd.print(VData.LiquidFuelTot);
          delay(1000);
                //MonoP Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("***MonoP Check**");
          delay(1000);
          //MonoP Auslesen
          lcd.setCursor(0,1);
          lcd.print(VData.MonoPropTot);
          delay(1000);
          //Power Check
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("*E Charge Check*");
          delay(1000);
          //Echarge Auslesen
          lcd.setCursor(0,1);
          lcd.print(VData.ECharge);
          delay(1000);
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print("Ready to start");
          delay(1000);
          for (int t = 10; t = 0; t--)
          {
            lcd.setCursor(7,1);
            lcd.print(t);
            delay (1000);
          }
    
    
      }

    My KSPIODemo13 loop looks like:

    void loop()
    {
      input();
      output();
      dsplay();
      startcheck();
    }

     

    The last Question, ist there any posibiliy that i can start the rocket whithout keyboard input and readout target speed and distance?

    I hope you can help me.

    Thanks

     

×
×
  • Create New...