Java to Esplora Serial port communication issue

时间:2015-07-28 23:58:06

标签: java arduino serial-port

I am attempting to communicate between an Arduino Esplora and a Java process using the RXTXComm library that comes bundled with the Arduino IDE.

I have started with the code here. Based on this question I have modified my Arduino code to be

/* Para monitores 1280x600px */
@media screen and (max-height:600px){
    #slider{
       /* If i change this to display:none; it really disappear the tag,
        which makes me guess the screen calc is doing ok.*/
        height:73.5vh;
    }
}

@media screen and (max-width:1280px){
    #mainAtc{
        margin-left:2vw;
    }

    #othAtc{
        margin-left:0;
    }
}

/* Para monitores 1920x900px */
@media screen and (max-height: 900px){
    #slider{
        /* But, if in 1280x600 i got display:none, and here i got display:block, he shows me the image. It's like it doesn't work just when i give same attributes to differente @media. */
        height:51.6vh;
    }
}

@media screen and (max-width: 1920px){
    #mainAtc{
        margin-left:2vw;
    }

    #othAtc{
        margin-left:7.6vw;
    }

    #atcRest{
        margin-left:2vw;
    }
}

Communication consistently works with an Arduino UNO. However, Communication with an Arduino Esplora often produces no output, and when it does work, it quickly terminates with the message void setup(){ Serial.begin(9600); while(!Serial); } void loop(){ Serial.println("Test"); } . When I use the Arduino IDE Serial monitor, it returns the proper output from both an Arduino UNO and an Arduino Esplora.

How can I ensure consistent and uninterrupted communication between the Esplora and my Java process?

0 个答案:

没有答案