When I try to store float variables in an array, I get a int values with a few decimal places after them. The code will work with int variables however, that is not what I need. So where is the number getting truncated?
const int NUMBER_OF_FIELDS = 28; // how many comma-separated fields we expect
int fieldIndex = 0; // the current field being received
float values[NUMBER_OF_FIELDS]; // array holding values for all the fields
Serial.begin(57600); // Initialize serial port to send and receive at 57600 baud
for(fieldIndex = 0; fieldIndex < 28; fieldIndex ++)
values[fieldIndex] = finder.getValue(); // get a numeric value
Serial.println(" fields received:");
for(int i=0; i < fieldIndex; i++)
fieldIndex = 0; // ready to start over
Variables I was using...
Any help would be great! thanks!