#747 Using TextFinder
Using the TextFinder library to extract fields from a string with an Arduino.
Notes
The TextFinder library was originally posted by Michael Margolis on the old http://playground.arduino.cc/Code/TextFinder, and discussed in the Arduino Cookbook.
A copy of the code is now hosted and maintained on GitHub.
About TextFinder
TextFinder is a library for extracting information from a stream of data. It was created to be used with the Arduino Ethernet library to find particular fields and get strings or numeric values. I can also be used with Serial data.
For more examples of its use, see:
- TextFinder Library examples
- LEAP#018 FretBoard - for it’s use parsing data from a web page
Serial Example
The UsingTextFinder.ino sketch demonstrates the basic usage of TextFinder with serial data:
- reading an integer
- reading comma-separated list of integers
- reading a floating point number
- reading a string
Credits and References
- Arduino reference: Serial
- Arduino Cookbook: 4.5 Receiving Multiple Text Fields in a Single Message in Arduino
- TextFinder Library - a port of the original source