Set LED loop condition (while,do...while)

Excuse me!
I want to control LED on/off by HMC5883L.
First LED is OFF delay 10 seconds.
And then LED is ON, and check sensor X angle at same time.
When X is between 80 and 90 ,LED is OFF.
If the conditions are false.
The sensor is constantly detected until the conditions are true.

Please help.
Thank you

My code is as follows:

#include <Wire.h>
#include <HMC5883L.h>
HMC5883L compass;
void setup()
{
Serial.begin(9600);
Wire.begin();
compass = HMC5883L();
compass.SetScale(1.3);
compass.SetMeasurementMode(Measurement_Continuous);
pinMode(8, OUTPUT);
}
void loop()
{
MagnetometerRaw raw = compass.ReadRawAxis();
MagnetometerScaled scaled = compass.ReadScaledAxis();
float yHeading = atan2(scaled.ZAxis, scaled.XAxis);

if(yHeading < 0) yHeading += 2PI;
if(yHeading > 2
PI) yHeading -= 2*PI;
int yDegrees = yHeading * 180/M_PI;
digitalWrite(8, LOW);
delay(10000);

do{
digitalWrite(8, HIGH);
MagnetometerRaw raw = compass.ReadRawAxis();
MagnetometerScaled scaled = compass.ReadScaledAxis();
float yHeading = atan2(scaled.ZAxis, scaled.XAxis);

if(yHeading < 0) yHeading += 2PI;
if(yHeading > 2
PI) yHeading -= 2*PI;

int yDegrees = yHeading * 180/M_PI;

Serial.print(yDegrees);
Serial.print(",");

}
while((yDegrees > 80) && (yDegrees < 900));

digitalWrite(8, HIGH);
delay(3000);

}

What is your question? What did you expect to get VS. what did you get?