void handleSpeed(u8 * packet) {
  u32 mhz;
  if (packetScanf(packet,"s%d\n",&mhz) != 3) return; // Ignore bad format
  if (mhz < 12 || mhz > 72) return;                  // Ignore bad speed
  Processor.setMHz(mhz);        // Change the processor speed!
}

void setup() {
  Body.reflex('s',handleSpeed); // Create reflex
}

void loop() { 
  ledOn(BODY_RGB_GREEN_PIN);    // Blink with 1sec period
  delay(500);                   // (Note that the blink period
  ledOff(BODY_RGB_GREEN_PIN);   // is unaffected by processor
  delay(500);                   // speed!  A ms remains a ms!)
  println(Processor.getMHz());  // And report current speed
}
