Algorithm for saving rssi data in a file automatically.