We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a float whiches value is a distance between two points. I want a println to appear only once when the distance is greater thah 100 for the first time. Does anyone know how to do this?
Just set a boolean firstTime which is initially true to false when printing the for the first time :
Check with
if (firstTime) { println („greater“); firstTime=false; }
Define it before setup() :
boolean firstTime = true;
Chrisir ;-)
Answers
Just set a boolean firstTime which is initially true to false when printing the for the first time :
Check with
Define it before setup() :
Chrisir ;-)