Hello,
Arduino test code:
void setup()
{
Serial.begin(9600);
}
void loop()
{
for(int x = 0; x < 7; x++)
{
Serial.print((float) x + random(0, 1000)/1000.0 , 3);
Serial.print(',');
}
Serial.println();
delay(50); // Make this longer while testing code
}
A typical working example integrated with your code:
Do some exploration.
Comment\uncomment print statements.
Watch the incoming data on the console while it is running.
Do you see where the null shows up? And why?
Can you comment on each step and explain what is happening?
And why it was done?
What does Serial.println() do? Show the Arduino reference for this and comment on characters sent.
Why did I use trim()? Was it needed for this example?
One of many references:
How to Fix NullPointerException
:)
