Jump to content
The simFlight Network Forums

mmmmm

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by mmmmm

  1. by default - yes. 
    On my wetcompass I used wemos D1 mini (ESP8266 WIFI) with some arduino code (arduino IDE) -its nice because the only cable coming into the enclosure is +5V power.
    On the second project I used mega2560 with ethernet shield.
    (not a big change between both codes)

     

    Quote

    Perhaps it's a project you can undertake.

    to many of them already 😉 trying to avoid new ones

  2. In Prosim I attach a parameter to a variable (see pic below):
    Parameter: Gear handle release solenoid 
    Variable number: 8 (whatever)

    and I use the above arduino code to get It (Gear handle release solenoid status) on my microcontroller.

    Very simple. I don't have to write any additional piece of soft.

    The only limitation is number of parameters I can chose from 😕

    Quote

    but I had to write the Arduino code and an FSUIPC plug-in 9in Lua) to interface to it. It uses a serial COM port, not Ethernet.

    is it possible to write similar piece of code (lua script) for ethernet?
    I'm looking for something that could link arduino via ethernet with Prepar3d (or Prosim; not sure if FSUIPC takes data from P3d or Prosim) - ailerons and elevator deflection.

    sioc2.thumb.jpg.65be9425cc790ffd10ce698b34a5baf3.jpg

  3.  

    Thx for reply 🙂

    I was hopping that FSUIPC can send offsets over the ethernet 😕

    Quote

    defined software interface (in the SDK).

    U mean SDK from PROSIM?

     

    There are literally few lines in ARDUINO that can gather data from SIOC (IOCP) server running in PROSIM:

    //SOLENOID:
    //8-AIR/GND SENSOR
    
    #include <ESP8266WiFi.h>
    
    const char* ssid = "SSSID";
    const char* password = "PASSWD";
    
    const char* host = "192.168.1.231";
    
    byte AIR_GND=0; //0-GND, 1-AIR
    
    byte SOLENOID=12; //D6
    String line="";
    
    WiFiClient client;
    void setup()
    {
       
       pinMode(LED_BUILTIN, OUTPUT);
       pinMode(SOLENOID, OUTPUT);
       digitalWrite(SOLENOID, LOW);
    
       
       
      Serial.begin(115200);
      delay(100);
      Serial.println();
      Serial.println("Serial OK");
    
      Serial.printf("Connecting to %s ", ssid);
      WiFi.begin(ssid, password);
      while (WiFi.status() != WL_CONNECTED)
      {
        delay(500);
        Serial.print(".");
      }
      Serial.println(" connected");
      Serial.print("IP Address: ");
      Serial.println(WiFi.localIP());
    }
    
    
    
    
    void loop()
    {
      
      Serial.printf("\n[Connecting to %s ... ", host);
    
            if (client.connect(host, 8092))
            {
                    Serial.println("connected]");
                    client.println("Arn.Inicio:8"); //looking for iocp variable no. 8
                    Serial.println("[Response:]");
                    
                          while (client.connected() || client.available())
                          {
                            if (client.available())
                            {
                              line = client.readStringUntil('\n');
                              //Serial.println(line);
                              line=line.substring(11,line.length()-2);
                              Serial.println(line);
                            }
                            //////////
                          if (line=="0"){ digitalWrite(SOLENOID, LOW);}
                          if (line=="1"){ digitalWrite(SOLENOID, HIGH);}
                          line="";
                              
                            
                          }
                    client.stop();
                    Serial.println("Disconnected");
                    
            }
            else
            {
              Serial.println("connection failed!");
              client.stop();
            }
      delay(5000);
    }
    
    
    
    
    
    
    
      
    
    You sing up for variable (here nr. 8 ) and once it is updated SIOC server sends it to you :

     

    client.println("Arn.Inicio:8");

     

     

    Would be amazing if FSUIPC could do something similar.

  4. Hi,

    At the beginning I'd like to mention that I'm new in this area.
    Recently I've built a 737 wet compass.

    wetCompass.jpg

    I used wemos D1 mini board and a stepper motor.
    I use SIOC server (running on my PC) and SIOC client (wifi SIOC client on wemos) to get all data I need.

    I'm working now on more sophisticated project.
    I need to get more data from the simulator this time.

    SIOC works fine however it has a limited number of variables/parameters to get from PROSIM.
    I use this tool to assign all necessary parameters:

    sioc.jpg



    What other method would you suggest to extract more data form PROSIM?
    I need to get aileron and elevator deflection this time.
    I'd like to send this data over ethernet to any microcontroller.

     


    Best regards,
    MM

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.