Search:

Type: Posts; User: williamsant

Search: Search took 0.17 seconds.

  1. Re: Help with ArrayList ( Adding certain elements together)

    Ok i figured it out, what i wanted to ask also is i wanted to create a simple GUI with that program, and display the values in a textbox of some sort, also a simple one. Any suggestions?
  2. Re: Help with ArrayList ( Adding certain elements together)

    Is it possible you can give me some code to help me our so what should i do, do that line, then convert each line to int, then i am able to add them?
  3. Re: Help with ArrayList ( Adding certain elements together)

    Ok to put things alittle more clear, ill post some code.



    ArrayList tal = new ArrayList();
    FileInputStream fstream = new FileInputStream("chinese.txt");
    DataInputStream in = new...
  4. Help with ArrayList ( Adding certain elements together)

    I will put this very simple. i am using arraylist to store 20 values. Suppose if i want to add 2 of those values together. The name of my arraylist is balance. So if i want to get out of my 20...
  5. Re: Java Serial Communication using Javax.comm and saving variables into an array

    i got it, i didnt realize i was so close to completing =). Next step is include my GUI program that i have seperate. Thank you so much guys i got it from here, you guys helped clear things up for me.
  6. Re: Java Serial Communication using Javax.comm and saving variables into an array

    Yeah, i guess you are right, i am done. By number i meant the "char" my c program is sending sorry for not being specific. My c program is just sending char by char, and i want my java to read char...
  7. Re: Java Serial Communication using Javax.comm and saving variables into an array

    i tried sending 9 numbers and it displays the same as before but a 57 there. so im guessing it keeps reading the numbers but it does not store it anywhere. im guessing it erases the previous number...
  8. Re: Java Serial Communication using Javax.comm and saving variables into an array

    When i add this, it prints the following:
    49
    50
    51
    52
    53
    54
    55
    56
  9. Re: Java Serial Communication using Javax.comm and saving variables into an array

    The following code is my java code.



    import java.io.*;
    import java.util.*; //import gnu.io.*;
    import javax.comm.*;

    public class SimpleRead implements Runnable, SerialPortEventListener {
    ...
  10. Re: Java Serial Communication using Javax.comm and saving variables into an array

    what i did, is read byte by byte, and the following came as a result:
    1 and 7 squares
    2 and 7 squares
    3 and 7 squares
    4 and 7 squares
    5 and 7 squares
  11. Re: Java Serial Communication using Javax.comm and saving variables into an array

    I am gonna be working on this for the rest of the day ill post the program when i get to that step, thanks.
  12. Re: Java Serial Communication using Javax.comm and saving variables into an array

    The program i have now is a bit too confusion for me, is it possible you can help me create a program which just reads variables from a port because im trying to shed some code from this code and i...
  13. Re: Java Serial Communication using Javax.comm and saving variables into an array

    so i did test it in terminal, my board works fine, i make it send "12345" every 5 seconds on 1 line, so there is 1 line sending every 5 seconds saying "12345". When i run it with this code, im...
  14. Re: Java Serial Communication using Javax.comm and saving variables into an array

    Yea the code works. Actually, i have managed to forge a code which does read serial bit's though a serial port in java. What i am using is a chip called HCS12, which is a small microcontroller. The...
  15. Java Serial Communication using Javax.comm and saving variables into an array

    Ok the idea is that i want to use serial communication in java, using javax.comm. What i want to do exactly is read a line though serial communication and save it in an array. For example every time...
Results 1 to 15 of 15