GY-63_MS5611/libraries/PrintString/README.md

51 lines
1.8 KiB
Markdown
Raw Normal View History

2021-01-29 06:31:58 -05:00
[![Arduino CI](https://github.com/RobTillaart/PrintString/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
2021-11-14 11:19:48 -05:00
[![Arduino-lint](https://github.com/RobTillaart/PrintString/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/PrintString/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/PrintString/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/PrintString/actions/workflows/jsoncheck.yml)
2021-01-29 06:31:58 -05:00
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/PrintString/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/PrintString.svg?maxAge=3600)](https://github.com/RobTillaart/PrintString/releases)
2020-11-27 05:28:57 -05:00
# PrintString
2021-11-14 11:19:48 -05:00
Arduino library to print to a String.
2020-11-27 05:28:57 -05:00
2021-01-29 06:31:58 -05:00
## Description
2020-11-27 05:28:57 -05:00
PrintString is a class that buffers a number of print statements in a String.
This String can be requested to process later.
- buffer slowly generated data, and send it with minimum time between bytes
2021-11-14 11:19:48 -05:00
e.g. to maximize packets for Ethernet.
2020-11-27 05:28:57 -05:00
- print to buffer to see how many chars the output is;
use to prevent "display line overflow"
(e.g. floats)
2021-01-29 06:31:58 -05:00
2021-11-14 11:19:48 -05:00
There is a relation to https://github.com/RobTillaart/PrintCharArray
2021-01-29 06:31:58 -05:00
## Interface
2021-11-14 11:19:48 -05:00
- **PrintString()** constructor.
- **size_t write(uint8_t c)** workhorse I of Print interface.
- **size_t write(uint8_t \* str, uint8_t length)** workhorse II of Print interface.
2021-01-29 06:31:58 -05:00
- **void clear()** wipes the internal String buffer
2021-11-14 11:19:48 -05:00
- **int size()** current usage of the buffer.
2021-01-29 06:31:58 -05:00
- **String getString()** to access the buffer.
## Operational
2020-11-27 05:28:57 -05:00
See examples
2021-11-14 11:19:48 -05:00
## Future
- testing
- add examples
- rename examples
- add functions like **repeat(char c)** to inject e.g. 7 spaces etc.
- add error flag
-