earlephilhower / SafeString

This SafeString library is designed for beginners to be a safe, robust and debuggable replacement for string processing in Arduino. Note, this is NOT my work, I am simply hosting it for easy access. The original code belongs to Forward Computing and Control Pty. Ltd.

Home Page:https://www.forward.com.au/pfod/ArduinoProgramming/SafeString/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SafeString

This SafeString library is designed for beginners to be a safe, robust and debuggable replacement for string processing in Arduino and provides non-blocking text I/O and parsing and testing for Real World use.

This library includes:-

  • SafeString, a safe, robust and debuggable replacement for string processing in Arduino
  • SafeStringReader, a non-blocking tokenizing text reader replacement for Serial read()
  • BufferedOutput, non-blocking replacement for Serial print()
  • SafeStringStream, a stream to provide test inputs for repeated testing of I/O sketches
  • BufferedInput, extra buffering for text input
  • loopTimer, to track of the maximum and average run times for the loop()
  • millisDelay, a non-blocking delay replacement, with single-shot, repeating, restart and stop facilities.

How-To

See SafeString Tutorial.
See Arduino Text I/O for the Real World.
See Simple Multitasking Arduino
See How to code Timers and Delays in Arduino

Software License

See the top of each file for its license

Note

Note, this is NOT my work, I am simply hosting it for easy access. The original code belongs to Forward Computing and Control Pty. Ltd.

Revisions

V4.0.4 adds support for Raspberry Pi Pico using Arduino Mbed OS RP2040 V2.0.0 board package ,nextToken() now returns last un-terminated token by default (can be overridded by optional arg), option to return empty tokens V4.0.3 allow createSafeString for small sizes, fixed bool for DUE (ARDUINO_ARCH_SAM) V4.0.2 added flushInput() method to SafeStringReader V4.0.1 fixed SafeStringReader timeout and NanoBLE F() macro V4.0.0 changes method returns to better match Arduino String methods, main change is indexOf now returns int and returns -1 if not found V3.1.0 adds hasError() method V3.0.6 adds support for Arduino megaAVR boards V3.0.5 adds support for SparkFun Redboard Turbo,but may interfer with other SAM ZERO based boards, also adds support for Due and STM32F1 and STM32F4

About

This SafeString library is designed for beginners to be a safe, robust and debuggable replacement for string processing in Arduino. Note, this is NOT my work, I am simply hosting it for easy access. The original code belongs to Forward Computing and Control Pty. Ltd.

https://www.forward.com.au/pfod/ArduinoProgramming/SafeString/index.html


Languages

Language:C++ 100.0%