NilRTOS - A Fast Tiny Preemptive RTOS

What line ending are you using in the serial monitor?

I have a bug in flushing all input. I used nilThdSleep(10) in setup() before NilRTOS was started:

  // throw away input
  while (Serial.read() >= 0) {
    nilThdSleep(10);
  }

Try "No line ending" or replace the nilThdSleep(10) with delay(10).

I will quickly post an update for this and another bug in NilRTOS.

Also I will post a version of SdFat with a new printField(uint16_t value, char terminator) so this code

  uint16_t value;
 ...
  file.printField(value, ',');

is three times faster than this code

  uint16_t value;
 ...
  file.print(value);
  file.print(',');

This will allow nilFifoDataLogger to write more fields at 1024 usec intervals.

Arduino Print is too slow and nilFifoDataLogger will suffer overrun errors currently.