user4367: I have trouble compiling this sketch. The error I get is

'SoftwareSerial' does not name a type

Any ideas how could I fix it?
#include SoftwareSerial.h

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  Serial.println("Ready!");

  // set the data rate for the SoftwareSerial port

  // for HC-05 use 38400 when poerwing with KEY/STATE set to HIGH on power on
  mySerial.begin(9600);
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}


user3866: Add to @geometrikal.
or
#include <SoftwareSerial.h>


user1566: You forgot the quotation marks, try
#include "SoftwareSerial.h"


4367: <p>I have trouble compiling this sketch. The error I get is</p>

<blockquote>
  <p>'SoftwareSerial' does not name a type</p>
</blockquote>

<p>Any ideas how could I fix it?</p>

<pre><code>#include SoftwareSerial.h

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  Serial.println("Ready!");

  // set the data rate for the SoftwareSerial port

  // for HC-05 use 38400 when poerwing with KEY/STATE set to HIGH on power on
  mySerial.begin(9600);
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
</code></pre>
 3866: <p>Add to @geometrikal.</p>

<p>or</p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
</code></pre>
 1566: <p>You forgot the quotation marks, try</p>

<pre><code>#include "SoftwareSerial.h"
</code></pre>
