Hi
At first I have to excuse for my sloppy english, but i hope you understand me anyway.
The funktion pwmout.read() seems not to work; when you use it you will always get an "NumberFormatException".
In my opinion this is the case because the integer.parseint() function used to transform the String with the pulsewith-value got from the RPC-function does not work in this case. The parseint-function only parses values which fit in an integer, and the float you get from the Mbed does not.
It would be much better to return a float, maybee like this:
public float read(){
String response = the_mbed.RPC(name, "read", null);
//Need to convert response to and int and return <-an "and" to much i think ;)
float f = Float.valueOf(response);
return(f);
}
Hi
At first I have to excuse for my sloppy english, but i hope you understand me anyway.
The funktion pwmout.read() seems not to work; when you use it you will always get an "NumberFormatException".
In my opinion this is the case because the integer.parseint() function used to transform the String with the pulsewith-value got from the RPC-function does not work in this case. The parseint-function only parses values which fit in an integer, and the float you get from the Mbed does not.
It would be much better to return a float, maybee like this: