Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

reading of the serial port

mprabbmprabb Member Posts: 5
using an rs232 connecion and the data i am recieving is in ascii
sending this data to the serial port
How do i convert this data to an integer value to display on my GUI
displaying the data as ascii but need to convert this data to integer values
Thanking you in advance
MPRABB



Comments

  • : using an rs232 connecion and the data i am recieving is in ascii
    : sending this data to the serial port
    : How do i convert this data to an integer value to display on my GUI
    : displaying the data as ascii but need to convert this data to integer values
    : Thanking you in advance
    : MPRABB
    :
    :
    :
    :

    You want to convert a String to int, is that right? If yes, it hasn't much to do with the subject of your post ...

    [code]
    String s = "123";
    int i = Integer.parseInt(s);
    [/code]

    You'll have to catch the "NumberFormatException".

    tron.
  • NazgulNazgul Member Posts: 63
    How damn do you read on serial port in Java ?
    I want to know !!
    [size=4][red](v)[/red][/size]

  • mprabbmprabb Member Posts: 5
    : How damn do you read on serial port in Java ?
    : I want to know !!
    : [size=4][red](v)[/red][/size]
    :
    : javax.comm package available from the sun.com website has more info

Sign In or Register to comment.