      delay(50); 
    }
       else {
-//        Serial.print("No Ack ");
         showString(PSTR("No Ack "));
         Serial.print(scan);
         showString(PSTR("\r"));
-//        Serial.print("\r");
         delay(50); 
       }
   }
   if ((downHigh == 0) || (downLow == 0xFFFF)) return;  // If nobody answers then restart loop
   showString(PSTR("Scan down complete "));
-//  Serial.print("Scan down complete "); 
   Serial.print(downLow);
-//  Serial.print("-");
-    showString(PSTR("-"));
+  showString(PSTR("-"));
   Serial.println(downHigh);
 
         
- frequency = ( ((upLow + downLow) / 2) + ((((upHigh + downHigh) / 2) - ((upLow + downLow)/ 2)) / 2)   );
-// Serial.print("Centre frequency offset is ");
+ frequency_offset = ( ((upLow + downLow) / 2) + ((((upHigh + downHigh) / 2) - ((upLow + downLow)/ 2)) / 2)   );
   showString(PSTR("Centre frequency offset is "));
-  Serial.println(frequency);
+  Serial.println(frequency_offset);
   delay(50);
- config.ee_frequency_hi = frequency >> 8;
- config.ee_frequency_lo = frequency & 0x00FF;
+ config.ee_frequency_hi = frequency_offset >> 8;
+ config.ee_frequency_lo = frequency_offset & 0x00FF;
 
   config.crc = ~0;
   for (byte i = 0; i < sizeof config - 2; ++i)

  if ((c > 64) && (c < 71)) return (c + 9);    // "A" to "F"
  if ((c > 47) && (c < 58)) return c;          // "0" to "9"
    showString(PSTR("\nError in importedConfig string '"));
//  Serial.print("\nError in importedConfig string '");
  Serial.print(c);
  showString(PSTR("'\n\r"));
//  Serial.println("'");
  return 0;
}
/// showNibble code below pinched from RF12Demo 2013-09-22

/// this sketch then enters a frequency scanning mode to find the
/// centre of frequency offset from its partner ack'ing Jeenode.
/// 2013-09-13 <john<AT>o-hare<DOT>net> http://opensource.org/licenses/mit-license.php


#define GROUP 212
#define NODE 9

#include <JeeLib.h>
#include <util/crc16.h>
