Results 1 to 1 of 1
  1. #1
    10+ Posting Member
    Join Date
    Nov 2014
    Location
    istanbul
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    arduino link2fs vspeed problem

    Hi everybody,

    I'm building an MCP card with tm1640 display module.

    Everything works fine. but vspeed display write "-16960" , when v/s is not active. Not a problem when v/s is active

    Does anyone have any idea about it

    ps: i added my project to post

    Thanks

    my v/s code

    Code:
    if (j1 == 'e'){     // Found the reading "AP Vertical Speed set"
          delay (11);
          
       
          apvs ="";
          apvs += (char)Serial.read();
          apvs += (char)Serial.read();
          apvs += (char)Serial.read();
          apvs += (char)Serial.read();
          apvs += (char)Serial.read();
    
          
    
          if (apvs != apvsold){
    
            apvsold = apvs;
    
          }   
    }

    Code:
    // v/s encoder
     vspdx=(envspd.position()/2);
     if (vspdx != vspdold) {
     
     (vspddif = (vspdx-vspdold));
    
     if (vspddif == 1) {
     mcpvs = mcpvs + 50;
     if (mcpvs< 10000) { mcpvs = 10000; }
     Serial.print("Y05"); Serial.println(mcpvs);}
     if (vspddif == -1) {
     mcpvs = mcpvs - 50;
     if (mcpvs> 16000) { mcpvs = 16000; }
     Serial.print("Y05"); Serial.println(mcpvs);}
    
    
     vspdold = vspdx;
    
     }
    Attached Files Attached Files