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?
Type: Posts; User: williamsant
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?
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?
Ok to put things alittle more clear, ill post some code.
ArrayList tal = new ArrayList();
FileInputStream fstream = new FileInputStream("chinese.txt");
DataInputStream in = new...
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...
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.
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...
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...
When i add this, it prints the following:
49
50
51
52
53
54
55
56
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 {
...
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
I am gonna be working on this for the rest of the day ill post the program when i get to that step, thanks.
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...
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...
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...
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...