#include <TextFinder.h>
TextFinder finder(Serial);
const int NUMBER_OF_FIELDS = 3; // how many comma seperated fields we expect
int values[NUMBER_OF_FIELDS]; // array holding values for all the fields
void setup()
{
Serial.begin(9600); // Initialize serial port to send and receive at 9600 baud
}
void loop()
{
int fieldIndex = 0; // the current field being received
finder.find("H");
while(fieldIndex < NUMBER_OF_FIELDS)
values[fieldIndex++] = finder.getValue();
Serial.println("All fields received:");
for(fieldIndex=0; fieldIndex < NUMBER_OF_FIELDS; fieldIndex++)
Serial.println(values[fieldIndex]);
}
I have imported the TextFinder libary to the Arduino but there is these errors i dont know how to solve:
The error says TextFinder does not name a type.
in function void loop()
finder was not declared in this scope.