visva
Member level 3
- Joined
- Jul 26, 2012
- Messages
- 55
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,288
- Activity points
- 1,633
In my project i am reading data what i sent from micro controller.But i am sending Hexadecimal value from micro controller.In java receiving those data's.
but that is something unknown character's are displaying. please any one help me how to convert those hexadecimal value to ASCII in java.
Note:
The following coding i have using in my project. Any one tell me what i need to change in this receiving coding.
<a href=http://www.soundfrost.org/ >youtube to mp3</a>
<a href=http://www.soundfrost.org/ >youtube to mp3</a>
but that is something unknown character's are displaying. please any one help me how to convert those hexadecimal value to ASCII in java.
Note:
The following coding i have using in my project. Any one tell me what i need to change in this receiving coding.
Code:
case SerialPortEvent.DATA_AVAILABLE:
byte[] readBuffer = new byte[20];
try
{
while (inputStream.available() > 0)
{
int numBytes = inputStream.read(readBuffer);
}
System.out.print(new String(readBuffer));
}
catch (IOException e) {System.out.println(e);}
break;
default:
System.out.println("There is no data");
<a href=http://www.soundfrost.org/ >youtube to mp3</a>
<a href=http://www.soundfrost.org/ >youtube to mp3</a>