Hi all,
Could some of you fine people please steer me in the right direction.
I have started a project to build an antenna rotator for Amatuer radio use. It will be driven by a sattelite tracking program suppling simple ascii commands via a comm port. I am trying to take this a few steps at a time and so far have the data being displayed on an lcd screen

My next step is to try and parse the data so I can use each of 2 numbers to move servo motors to their correct position.
The ascii data is in the format of "AZxxx.x[space]ELyyy.yCRLF". (AZ = Azumith degress, EL = Elevation degrees)
The first issue is that the xxx.x and yyy.y are variable length (i.e it may be 1.0, 23.0, 123.0) but they are never negative. The constants in the string are the AZ, EL, the decimal point, the [space] and the crlf at the end. The number after the decimal point is always zero.
What I need to end up with is 2 pieces of data to be passed to the rest of the code, I guess in variables that could be named something like AzData and ElData. I don't need decimal accuracy so whole numbers would work great. The data is updated by the pc couple of seconds.
The very basic code so far is;
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup(){
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// initialize the serial communications:
Serial.begin(9600);
}
void loop()
{
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}
Many thanks
Colin.