I don't see any missing semi-colons, can you give us the whole error message? How is the while condition going to change? (Lux is not modified inside the while body) if you enter the while loop, it will just loop forever.
Thank you I fixed that trouble, I didnt remember elseif.....
But know I have a doubt with millis(), It is set to get into that If( the millis if I mean), each 0.5s...but I dont understand what I'll do. would it get into the millis if and for how long It will stay in??just I need that it get a new value to T1...
A while loop runs what is inside over and over again until the condition is no longer true. None of the code outside of the while loop will run, only what is inside the while loop until the condition is not true.
Nothing inside this while loop ever changes the value of Lux and nothing outside of the loop that you might think is changing it can execute until the while loop ends. So if Lux is < 5500 and you enter this loop, nothing will ever make it greater or equal. Therefore, this loop will hang forever and never exit.
Lux is a value that is read by I2C bus, but It's true, to be read It must get the function read and in that way It wont get there ever....could I do the same with an internal if??