user38896: I am having trouble with this code:
#include <Wire.h>
#include <MPU6050.h>

MPU6050 mpu;

// Timers
unsigned long timer = 0;
float timeStep = 0.01;

// Pitch, Roll and Yaw values
float pitch = 0;
float roll = 0;
float yaw = 0;

int button_pin=5;
int button_state;
void setup() 
{
  Serial.begin(115200);

  // Initialize MPU605  
  while(mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
  {
    Serial.println("Could not find a valid MPU6050 sensor, check wiring!");
    delay(500);
  }

  // Calibrate gyroscope. The calibration must be at rest.
  // If you don't want calibrate, comment this line.
  mpu.calibrateGyro();

  // Set threshold sensivty. Default 3.
  // If you don't want use threshold, comment this line or set 0.
  mpu.setThreshold(3);

  pinmode(button_pin,INPUT)
}

void loop()
{
  int button_state=digitalRead(button_pin)

  timer = millis();

  // Read normalized values
  Vector norm = mpu.readNormalizeGyro();

  // Calculate Pitch, Roll and Yaw
  pitch = pitch + norm.YAxis * timeStep;
  roll = roll + norm.XAxis * timeStep;
  yaw = yaw + norm.ZAxis * timeStep;

  // Output raw
  Serial.print(" Pitch = ");
  Serial.print(pitch);
  Serial.print(" Roll = ");
  Serial.print(roll);  
  Serial.print(" Yaw = ");
  Serial.println(yaw);

  // Wait to full timeStep period
  delay((timeStep*1000) - (millis() - timer));
}

But when I add this code at the end:
If (pitch <=90 && pitch => 15 && button_state =(HIGH))
{
}

I keep getting this error:

error: lvalue required as left operand of assignment

I know the issue is about the pitch part of the if. I just need to know how to fix it.

user10394: You have two declarations of button_state.  This won't cause a problem because the scoping rules will mean inside loop you are using the local one and everywhere else you are using the global one.  Personally I would remove the global one since you aren't using it.
As mentioned in the comments you have mistyped the If keyword (but I think this is just on here not in you code) and you have used an assignment statement rather than a equivalence (= instead of ==).
Since you have tagged it as code review here are some minor points you might want to consider.
If a value doesn't change then you could mark it as const, this doesn't make much difference to the compiler, it already knows, but it will help you when you come back to the code next week.
  So: const int button_pin = 5;
If you only use a const int value once you might be better #defining it (more than once a const value should produce smaller code).  The pre-processor (part of the compile process) will replace the defined name with the value, but you have easier to read and maintain code.
  So: #define button_pin 5
If you #define an int then always enclose the value in brackets to protect it from "arithmetic issues" (I can't think of a better way of describing it).
  So: #define button_pin (5)

user19409: The first thing I noticed was that you had a capital I in your if-statement.
Secondly, button_state =(HIGH) should be button_state == HIGH. A single = sign means that you are assigning a value to the variable on the left - in this case button_state. It is a common mistake that I have made many times.
Also, because it is a boolean comparison, you can simplify the statement by removing the == HIGH leaving just button_state.
This would then change the if-statement to the following:
if ((pitch <= 90) && (pitch => 15) && button_state)

I have added extra parentheses for clarity/readability but they're technically not needed.

In addition to what Code Gorilla has already stated in his answer and a few additional semi-colons, your code should look something like this:
#include <Wire.h>
#include <MPU6050.h>

MPU6050 mpu;

// Timers
unsigned long timer = 0;
float timeStep = 0.01;

// Pitch, Roll and Yaw values
float pitch = 0;
float roll = 0;
float yaw = 0;

const int button_pin = 5;

void setup() 
{
  Serial.begin(115200);

  // Initialize MPU605  
  while(mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
  {
    Serial.println("Could not find a valid MPU6050 sensor, check wiring!");
    delay(500);
  }

  // Calibrate gyroscope. The calibration must be at rest.
  // If you don't want calibrate, comment this line.
  mpu.calibrateGyro();

  // Set threshold sensivty. Default 3.
  // If you don't want use threshold, comment this line or set 0.
  mpu.setThreshold(3);

  pinmode(button_pin,INPUT);
}

void loop()
{
  int button_state = digitalRead(button_pin);

  timer = millis();

  // Read normalized values
  Vector norm = mpu.readNormalizeGyro();

  // Calculate Pitch, Roll and Yaw
  pitch = pitch + norm.YAxis * timeStep;
  roll = roll + norm.XAxis * timeStep;
  yaw = yaw + norm.ZAxis * timeStep;

  // Output raw
  Serial.print(" Pitch = ");
  Serial.print(pitch);
  Serial.print(" Roll = ");
  Serial.print(roll);  
  Serial.print(" Yaw = ");
  Serial.println(yaw);

  if ((pitch <= 90) && (pitch => 15) && button_state)
  {
      // Code goes here
  }

  // Wait to full timeStep period
  delay((timeStep*1000) - (millis() - timer));
}


38896: <p>I am having trouble with this code:</p>



<pre class="lang-cpp prettyprint-override"><code>#include &lt;Wire.h&gt;
#include &lt;MPU6050.h&gt;

MPU6050 mpu;

// Timers
unsigned long timer = 0;
float timeStep = 0.01;

// Pitch, Roll and Yaw values
float pitch = 0;
float roll = 0;
float yaw = 0;

int button_pin=5;
int button_state;
void setup() 
{
  Serial.begin(115200);

  // Initialize MPU605  
  while(mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
  {
    Serial.println("Could not find a valid MPU6050 sensor, check wiring!");
    delay(500);
  }

  // Calibrate gyroscope. The calibration must be at rest.
  // If you don't want calibrate, comment this line.
  mpu.calibrateGyro();

  // Set threshold sensivty. Default 3.
  // If you don't want use threshold, comment this line or set 0.
  mpu.setThreshold(3);

  pinmode(button_pin,INPUT)
}

void loop()
{
  int button_state=digitalRead(button_pin)

  timer = millis();

  // Read normalized values
  Vector norm = mpu.readNormalizeGyro();

  // Calculate Pitch, Roll and Yaw
  pitch = pitch + norm.YAxis * timeStep;
  roll = roll + norm.XAxis * timeStep;
  yaw = yaw + norm.ZAxis * timeStep;

  // Output raw
  Serial.print(" Pitch = ");
  Serial.print(pitch);
  Serial.print(" Roll = ");
  Serial.print(roll);  
  Serial.print(" Yaw = ");
  Serial.println(yaw);

  // Wait to full timeStep period
  delay((timeStep*1000) - (millis() - timer));
}
</code></pre>

<p>But when I add this code at the end:</p>

<pre class="lang-cpp prettyprint-override"><code>If (pitch &lt;=90 &amp;&amp; pitch =&gt; 15 &amp;&amp; button_state =(HIGH))
{
}
</code></pre>

<p>I keep getting this error:</p>

<blockquote>
  <p>error: lvalue required as left operand of assignment</p>
</blockquote>

<p>I know the issue is about the pitch part of the if. I just need to know how to fix it.</p>
 10394: <p>You have two declarations of button_state.  This won't cause a problem because the scoping rules will mean inside loop you are using the local one and everywhere else you are using the global one.  Personally I would remove the global one since you aren't using it.</p>

<p>As mentioned in the comments you have mistyped the <code>If</code> keyword (but I think this is just on here not in you code) and you have used an assignment statement rather than a equivalence (= instead of ==).</p>

<p>Since you have tagged it as code review here are some minor points you might want to consider.</p>

<p>If a value doesn't change then you could mark it as <code>const</code>, this doesn't make much difference to the compiler, it already knows, but it will help you when you come back to the code next week.
  So: <code>const int button_pin = 5;</code></p>

<p>If you only use a <code>const int</code> value <strong>once</strong> you might be better <code>#defining</code> it (more than once a const value <em>should</em> produce smaller code).  The pre-processor (part of the compile process) will replace the defined name with the value, but you have easier to read and maintain code.
  So: <code>#define button_pin 5</code></p>

<p>If you <code>#define</code> an int then <strong>always</strong> enclose the value in brackets to protect it from "arithmetic issues" (I can't think of a better way of describing it).
  So: <code>#define button_pin (5)</code></p>
 19409: <p>The first thing I noticed was that you had a capital <code>I</code> in your if-statement.</p>

<p>Secondly, <code>button_state =(HIGH)</code> should be <code>button_state == HIGH</code>. A single <code>=</code> sign means that you are assigning a value to the variable on the left - in this case <code>button_state</code>. It is a common mistake that I have made many times.</p>

<p>Also, because it is a boolean comparison, you can simplify the statement by removing the <code>== HIGH</code> leaving just <code>button_state</code>.</p>

<p>This would then change the if-statement to the following:</p>

<pre><code>if ((pitch &lt;= 90) &amp;&amp; (pitch =&gt; 15) &amp;&amp; button_state)
</code></pre>

<p>I have added extra parentheses for clarity/readability but they're technically not needed.</p>

<hr>

<p>In addition to what Code Gorilla has already stated in <a href="https://arduino.stackexchange.com/a/45541/19409">his answer</a> and a few additional semi-colons, your code should look something like this:</p>



<pre class="lang-cpp prettyprint-override"><code>#include &lt;Wire.h&gt;
#include &lt;MPU6050.h&gt;

MPU6050 mpu;

// Timers
unsigned long timer = 0;
float timeStep = 0.01;

// Pitch, Roll and Yaw values
float pitch = 0;
float roll = 0;
float yaw = 0;

const int button_pin = 5;

void setup() 
{
  Serial.begin(115200);

  // Initialize MPU605  
  while(mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
  {
    Serial.println("Could not find a valid MPU6050 sensor, check wiring!");
    delay(500);
  }

  // Calibrate gyroscope. The calibration must be at rest.
  // If you don't want calibrate, comment this line.
  mpu.calibrateGyro();

  // Set threshold sensivty. Default 3.
  // If you don't want use threshold, comment this line or set 0.
  mpu.setThreshold(3);

  pinmode(button_pin,INPUT);
}

void loop()
{
  int button_state = digitalRead(button_pin);

  timer = millis();

  // Read normalized values
  Vector norm = mpu.readNormalizeGyro();

  // Calculate Pitch, Roll and Yaw
  pitch = pitch + norm.YAxis * timeStep;
  roll = roll + norm.XAxis * timeStep;
  yaw = yaw + norm.ZAxis * timeStep;

  // Output raw
  Serial.print(" Pitch = ");
  Serial.print(pitch);
  Serial.print(" Roll = ");
  Serial.print(roll);  
  Serial.print(" Yaw = ");
  Serial.println(yaw);

  if ((pitch &lt;= 90) &amp;&amp; (pitch =&gt; 15) &amp;&amp; button_state)
  {
      // Code goes here
  }

  // Wait to full timeStep period
  delay((timeStep*1000) - (millis() - timer));
}
</code></pre>
