Search:

Type: Posts; User: Norm

Search: Search took 0.08 seconds.

  1. Re: Java Serial Communication using Javax.comm and saving variables into an array

    The byte array holds what was read.
    Provide access to that array to the other class.
  2. Re: Java Serial Communication using Javax.comm and saving variables into an array

    Read the API doc for the classes in the javax.comm package.
  3. Re: Java Serial Communication using Javax.comm and saving variables into an array

    Define a large array and use an index to store the bytes into the array.
  4. Re: Java Serial Communication using Javax.comm and saving variables into an array

    Those look like the characters 1 thru 8.
    What is the next step?
    When does the reading method decide it has all the bytes for a String so that it can create and return a String?
  5. Re: Java Serial Communication using Javax.comm and saving variables into an array

    What is printed if you use the read() method and print out what is read?


    while (inputStream.available()>0) {

    int aByte= inputStream.read(); // read a byte
    ...
  6. Re: Java Serial Communication using Javax.comm and saving variables into an array

    Could you show the code you used to read and to print with?
    the read() method returns an int. The character '1' should print as 49

    Don't use an array or convert the input to a String.

    read...
  7. Re: Java Serial Communication using Javax.comm and saving variables into an array

    There could be some confusion here. I assume that each number you send is a digit character that takes 8 bits. The 8 bits and 5 digits and 3 more numbers are not the right way to look at what is...
Results 1 to 7 of 7