SPI without Pin 10

@CrossRoads

I abandoned the manipulation of the char and used a State Engine to do what I wanted, instead.

I'll have to learn that later!

I just wanted to say thanks for all the help.

You are a nice guy... for a Giants fan. :wink:

typedef enum { NONE, GOT_W, GOT_S, GOT_M, GOT_I, GOT_N, GOT_O, GOT_F } states;
char WeatherTable [6] = { 'A','B','C','D','E','F' };
char weatherValue;
char displayTemp [2];
boolean IsFarhenheit = true;
boolean IsMailMessage = false;
boolean IsWeather = false;
boolean IsSubzeroIn = false;
boolean IsSubzeroOut = false;
// current state-machine state
states state = NONE;

unsigned int currentValue;

void setup ()
{
  Serial.begin (115200);
  state = NONE;
} 

void processWeather (const unsigned int value)
{
  Serial.print ("Weather = ");
  Serial.println (value);
  weatherValue = WeatherTable[value];
} // end of processWeather

void processScale (const unsigned int value)
{
  Serial.print ("Scale = ");
  Serial.println (value);
  if (value == 1){
    IsFarhenheit = true;
  }
  else{
    IsFarhenheit = false;
  }
} // end of processScale

void processMessage (const unsigned int value)
{
  Serial.print ("Message = ");
  Serial.println (value);
  if (value == 1){
    IsMailMessage = true;
  }
  else{
    IsMailMessage = false;
  } 
}

void processIndoorTemp (const unsigned int value)
{
  Serial.print ("Indoor Temperature = ");
  Serial.println (value);
  displayTemp[0] = value; 
} // end of processIndoorTemp

void processIndoorFlag (const unsigned int value)
{
  Serial.print ("Indoor Flag = ");
  Serial.println (value);
  if (value == 1){
    IsSubzeroIn = true;
  }
  else{
    IsSubzeroIn = false;
  }
} 

void processOutdoorTemp (const unsigned int value)
{
  Serial.print ("Outdoor Temperature = ");
  Serial.println (value); 
  displayTemp [1] = value; 
}

void processOutdoorFlag (const unsigned int value)
{
  Serial.print ("Outdoor Flag = ");
  Serial.println (value);
  if (value == 1){
    IsSubzeroOut = true;
  }
  else{
    IsSubzeroOut = false;
  }
}

void handlePreviousState ()
{
  switch (state)
  {
  case GOT_W:
    processWeather (currentValue);
    break;
  case GOT_S:
    processScale (currentValue);
    break;
  case GOT_M:
    processMessage (currentValue);
    break;
  case GOT_I:
    processIndoorTemp (currentValue);
    break;
  case GOT_N:
    processIndoorFlag (currentValue);
    break;
  case GOT_O:
    processOutdoorTemp (currentValue);
    break;
  case GOT_F:
    processIndoorFlag (currentValue);
    break;    
  } 
  currentValue = 0; 
} 

void processIncomingByte (const byte c)
{
  if (isdigit (c))
  {
    currentValue *= 10;
    currentValue += c - '0';
  }  // end of digit
  else 
  {
    // The end of the number signals a state change
    handlePreviousState ();
    // set the new state, if we recognize it
    switch (c)
    {
    case 'W'://Weather
      state = GOT_W;
      break;
    case 'S'://Scale:Fahrenheit or Celsius
      state = GOT_S;
      break;
    case 'M'://Message Waiting
      state = GOT_M;
      break;
    case 'I'://Indoor Temp
      state = GOT_I;
      break;
    case 'N'://Indoor NEGATIVE FLAG
      state = GOT_I;
      break;      
    case 'O'://Outdoor Temp
      state = GOT_O;
      break;
    case 'F'://Indoor NEGATIVE FLAG
      state = GOT_I;
      break;
    default:
      state = NONE;
      break;
    }  // end of switch on incoming byte
  } // end of not digit  
} // end of processIncomingByte

void loop ()
{
  if (Serial.available ())
    processIncomingByte (Serial.read ());
  
}