     sampler_photoresistor.endSample();
    
     sendLightLevel();
+}
+
+void receivePingMessage(class OSCMessage &m) {
+    // send reply as soon as possible
+    sendPingReply();
+    
+    writeRGBColor(GREEN);
+    playMorseString("p");    
 }
 
 void receiveRgbSetMessage(class OSCMessage &m) {

    sprintf(errstr, "received OSC message of length %d to %s", length, buffer);
    sendInfo(errstr); 
    
    playMorseInt(length);  

    OSCMessage messageIn;
    

    } else {
        int called;
        called = messageIn.dispatch("/exo/tt/photo/get", receivePhotoGetMessage);
        called = messageIn.dispatch("/exo/tt/ping", receivePingMessage);
        called = messageIn.dispatch("/exo/tt/rgb/set", receiveRgbSetMessage);
        called = messageIn.dispatch("/exo/tt/vibro", receiveVibroMessage);
    }
