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

    Switch panel slow to respond

    Iíve made a switch panel for FSX with 3 sections, (see picture), using link2FS (115200 baud), and initially, one Arduino Mega card. Iím using the ledControl and Quadrature libraries suggested by Jim and others.
    The AP section was wired first. This worked fine (after the usual teething problems), and the response to any of the inputs is fast. Iíve now wired the radio section, however I now find that the whole board goes to sleep for many seconds at a time, presumably while waiting for serial data.
    Iíve read some posts about similar problems, (delays reading from link2FS, or badly arranged program execution), but canít relate it directly to my problem.
    I could post my code but donít know how to avoid it taking up too much space. Any help would be appreciated.
    Attached Images Attached Images

  2. #2
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Switch panel slow to respond

    wangjim,

    Are you running the board with supplemental power or just straight from the USB power source?

    You can zip your code up and attach it to a post.

    ~Fess


    By the way, Nice Looking Panel !
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  3. #3
    10+ Posting Member
    Join Date
    Oct 2014
    Location
    Wangandary Australia
    Posts
    12
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Switch panel slow to respond

    [QUOTE=Fess_ter;161842]wangjim,
    Fess_ter Thanks for the reply and the comment. I'm running the Arduino board power from the USB cable, but the illuminated PBs, LEDs and 7-segment display are powered from a separate 5V 3Amp supply.
    Since I posted I have got a little further. Using a lamp as a debug device I found that the 'freezes' I was getting are during a loop in a function which my code calls. It is the "getChar" function from JimNZ's link2FS examples where it is waiting for a character from the serial buffer. ("while(Serial.available()==0) // wait for data". So I am working on solving it as a serial buffer problem.
    Cheers
    Jim McC

    PS I can post my code if you are interested but I just need to clean up my comments a bit first