Issue with using millis()
in
Programming Questions
•
9 months ago
I am running into a problem with millis()
I am simply trying to generate a loop that will give 5 seconds to calibrate a sensor then continue with the sketch...
I tried this:
void setup()
{
}
{
}
void draw()
{
int x=millis();
while (millis()-x<5000){
println(x); //space for my calibration routine to collect sensor data
}
}
It locks my pc up everytime... I just get a stream of "64" displayed in the window...
What am I doing wrong???
1