gpredict vs arduino antenna rotor

Hi.

I am newbee. I have to little projet to steer an yagi antenna pointing towards a satellite. The tracking program is called gpredict. Ill receive a line over ethernet that looks like this

P P 247.48 38,37

p p 247.48 38,27

and so on.

thats the azimuth and elevation data i want to convert one String, so i via substring can pick 247.48 out and write this value to at servo, and then 38,37 to a second servo. My problem is to converte that line, as it comes one character at a time...... I can present the line and see it in serialmonitor. So the essential is how do i converte a line of character to at String????

Best regards Murdock.....

don't convert it to a String. Gather it one character at a time into a char array and when it has all arrived parse what you need out of that char array.

See the Serial Input Basics thread for some examples of how to do this.

Hi

thx for the quick reply,,,, i try.....

best rgd. Murdock.

i want to convert one String, so i via substring can pick 247.48

As opposed to using a string, strtok() and atof()? Well, good luck.

So the essential is how do i converte a line of character to at String?

If you are smart, you do NOT wrap a string in a String. There is NOTHING that the String class can do that appropriate string functions can't.