 /// @dir RF12tune2
-/// This sketch loads a configuration compatible with rf12.cpp and
-/// then enters a frequency scanning mode to find the
+/// This sketch loads a configuration into eeprom compatible with rf12_config.
+/// It then enters a frequency scanning mode to find the
 /// centre of frequency offset from its partner ack'ing Jeenode.
+/// The eeprom contents are then updated such that rf12_config will pick up
+/// the centre frequency of the acknowledging node as its operational frequency.
 /// 2013-10-04 <john<AT>o-hare<DOT>net> http://opensource.org/licenses/mit-license.php
 
 #define GROUP 209              // Default value 212

#define FREQUENCY_OFFSET 1640  // Default value 1600
////
const char NodeDescription[] PROGMEM = 
   "This nodes description123";  
////0....5....10...5....20...5....30...5....40...5....50...5....60..

#include <JeeLib.h>

void loop() {
  unsigned int scan, upLow, upHigh, downLow, downHigh;
  showString(PSTR("Scanning started "));
  Serial.print(frequency_offset);
  showString(PSTR("+/-"));
  Serial.println(SCAN_WIDTH);
  delay(50); 

    upLow = 0xFFFF;
    upHigh = 0;
  for (scan = (frequency_offset - SCAN_WIDTH); scan < (frequency_offset + SCAN_WIDTH); ++scan)
  {
   rf12_control(0xA000 + scan); 
   byte good = probe();
