While loop inside void loop() causing problems

Yes! i am using the ESP8266 module.