diff --git a/README.md b/README.md index 3f9ce7d..0a4766b 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,14 @@ A much smaller and more efficient serial library than Arduinos Serial. Use one include file to replace the Serial.print from Arduino library. -##### Table of Contents -[What is the problem with Arduino Serial.print ?](#arduino_serial_problems) -[Example comparison between Didel TerSer and Arduino Serial](#example_comparison) -[Using tabular data](#using_tabular_data) -[TerSer Limitations](#terser_limitations) -[Code size and timing comparison](#code_size_timing_comparison) +**Table of Contents** +[What is the problem with Arduino Serial.print ?](#what-is-the-problem-with-arduino-serialprint-) +[Example comparison between Didel TerSer and Arduino Serial](#example-comparison-between-didel-terser-and-arduino-serial) +[Using tabular data](#using-tabular-data) +[TerSer Limitations](#terser-limitations) +[Code size and timing comparison](#code-size-and-timing-comparison) - ### What is the problem with Arduino Serial.print ? Serial.print is is most of the time used as a debugging tool, and with limited resources it is even more important to have the most lighweight solution for this task. @@ -38,7 +37,6 @@ It is admittedly very convenient to just use Serial.print(var); since it doesn't *uint16_t v16=1120; uint16_t v16b=20; int16_t v16s=20;* - ### Using tabular data Filling the non significative digits with zero or space is a general options, named ShowZ(); and HideZ(); @@ -56,7 +54,6 @@ HideZ();Dec8s(3); SetTab(15); It is up to you to add functions like TextNL(); if you need to keep your Serial.println() habits. - ### TerSer Limitations TerSer does not print floating point numbers. The may happen some day with one more file to import, e.g. names TerFloat.h. @@ -65,7 +62,6 @@ Dec8(); and Dec16(); use a tricky macro to recognize the signed or unsigned data Code will be shorter and there will be no limitation if you use Dec8u(any unsigned expr); and Dec8s(any signed expr);, same of course Dec16u(); and Dec16s(); - ### Code size and timing comparison Code size has been obtained by calling one function at a time, compiler under the usual -0s mode. Size is the difference with the empty file size. TerSer.h can of course be used with setup() and loop(). It add the ~300 bytes Arduino initializations. Execution time has been measured with a Nop replacing the SendCar function. The time depends on the baud rate, ~1 ms per character displayed at 9600 bits/s.