   if( strcasecmp(cmd, "ping") == 0 )
   {
     Serial.print("P ");
-    Serial.println(value);
+    Serial.println(val_ok ? value : 0);
   }
   else if( strcasecmp(cmd, "recall") == 0 )
   {
-    //Serial.println("R M1 01:23:45.678 123345 123");
-    Serial.println("E not implemented");
+    if( val_ok && value < event_count && (event_count < EVENT_MAX || value >= event_count - EVENT_MAX) )
+    {
+      Serial.print("R ");
+      print_event(value % EVENT_MAX);
+      Serial.write(' ');
+      Serial.println(value);
+      //Serial.println("R M1 01:23:45.678 123345 123");
+    }
+    else
+    {
+      Serial.println("E bad value");
+    }
   }
   else if( strcasecmp(cmd, "clear") == 0 )
   {
-    //Serial.println("C");
-    Serial.println("E not implemented");
+    event_count = 0;
+    Serial.println("C 0");
+  }
+  else if( strcasecmp(cmd, "count") == 0 )
+  {
+    Serial.print("C ");
+    Serial.println(event_count);
+  }
+  else if( strcasecmp(cmd, "max") == 0 )
+  {
+    Serial.print("M ");
+    Serial.println(EVENT_MAX);
   }
   else if( strcasecmp(cmd, "debounce") == 0 )
   {

    {
      trigger->time = ms_time;
      trigger->deadtime_count = deadtime;
    }
    return true;
  }

// increment this any time the rom format is changed or needs to be cleared
#define EEPROM_VERSION 0

#define EVENT_MAX 2048

typedef enum {
  ROM_OFFSET_VERSION=0,
  ROM_OFFSET_DEBOUNCE,
