HOW TO INCLUDE ARDUINO LIBRARY INTO MY OWN LIBARY

Hi Everyone.

I have just started writing libraries for Arduino Uno. Finished writing a simple library to control L293D Motor Driver IC callled #include<Motor.h>

What i am trying to do next is include #include<SoftwareSerial.h> into #include<Motor.h> library.

/*
  Bluetooth.h - Library for HC05 Bluetooth Module
  Created by K.Raghavendran, September 23, 2016.
  Released into the public domain.
*/
#ifndef Bluetooth_h
#define Bluetooth_h

#include "Arduino.h"
//#include <SoftwareSerial.h>
#include "\SoftwareSerial\SoftwareSerial.h"


class Bluetooth
{
  public:
    Bluetooth(int rx,int tx);
    void Initialize();
    void Connect();
     		
  private:
    int _rx; 
    int _tx; 
};

#endif

And now the CPP file.

/*
  Motor.cpp - Library for L293D Motor Driver IC
  Created by K.Raghavendran, September 21, 2016.
  Released into the public domain.
*/

#include "Arduino.h"
#include "Bluetooth.h"
//#include <SoftwareSerial.h>
#include "\SoftwareSerial\SoftwareSerial.h"


Bluetooth::Bluetooth(int rx, int tx)
{
    pinMode(rx, INPUT);
    pinMode(tx, OUTPUT);
    _rx = rx;
    _tx = tx;
    
}

void Bluetooth::Initialize()
  {
    Bluetooth.begin(9600);

  Serial.println("Bluetooth Test!");
    
  }

void Bluetooth::Connect()
  {
    if (Bluetooth.available()){
BluetoothData=Bluetooth.read();
    
  }

And finally the code i am trying to implement

#include <Bluetooth.h>
#include <SoftwareSerial.h>// import the serial library
#include <Motor.h>
//#include <\SoftwareSerial\SoftwareSerial.h>

SoftwareSerial Bluetooth(0, 1); // RX, TX
int BluetoothData; // the data given from Computer


// the setup function runs once when you press reset or power the board

Motor motor(2,3,4,5);

void setup() 
{

   Bluetooth.Initialize();
  
   
}

// the loop function runs over and over again forever
void loop() 
{
         Bluetooth.Connect();
                              
       if(BluetoothData=='1'){
        motor.Forward();
  Serial.print("StemBot  Forward");
                            // if number 1 pressed ....
                            // move forward motor1 and 2
                    }
  if (BluetoothData=='0'){// if number 0 pressed ....
    motor.Backward();
  Serial.print("StemBot  Backward");
    
  }

if (BluetoothData=='2'){// if number 0 pressed ....
  motor.Stop();
  Serial.print("Stop StemBot");
   
  }




 if(BluetoothData=='3'){   // if number 1 pressed ....
    motor.Right();
  Serial.print("StemBot Right Turn");
   }
  if (BluetoothData=='4'){// if number 0 pressed ....
    motor.Left();
  Serial.print("StemBot Left Turn");
  
  }

if (BluetoothData=='2'){// if number 0 pressed ....
 motor.Stop();
  Serial.print("Stop StemBot");
   
  }
 delay(100);// prepare for next data ...
   }
}

Now i get the error // C:\Program Files (x86)\Arduino\libraries\Bluetooth/Bluetooth.h:11:44: fatal error: \SoftwareSerial\SoftwareSerial.h: No such file or directory
#include "\SoftwareSerial\SoftwareSerial.h"

Thank you and regards,
K.Raghavendran

Refer to this post for an Explanation of include Syntax.
http://forum.arduino.cc/index.php?topic=37929.0

There is a difference between #include "this" and #include .

#include <SoftwareSerial.h>// import the serial library

That statement does NOT import a library. There is a world of difference between an include statement in C and an import statement in Java.

SoftwareSerial Bluetooth(0, 1); // RX, TX

It's pretty stupid to be doing software serial on the hardware serial pins.

Bluetooth::Bluetooth(int rx, int tx)
{
    pinMode(rx, INPUT);
    pinMode(tx, OUTPUT);
    _rx = rx;
    _tx = tx;

The hardware is NOT ready when your constructor is called. You should NOT be diddling with the hardware in the constructor.

#include "\SoftwareSerial\SoftwareSerial.h"
#include <SoftwareSerial.h>// import the serial library

Why are you using two radically different styles for including a header file? When the second one didn't work, why didn't you try the first one, that did work, in both places?

Well i did try both of them...

#include <\SoftwareSerial\SoftwareSerial.h>
#include <SoftwareSerial.h>

Still i get an error. And yes i should have used 2,3 etc when using SoftwareSerial...

Could you please guide me like a teacher, thank you..

Well i did try both of them...

Only one of them (the second one) is correct. If you ARE using that format, and still getting errors, prove it, by posting ALL of your code AND the EXACT error messages.

Could you please guide me like a teacher

Don't your teachers demand proof? Don't they demand that you make some effort?

PaulS:
The hardware is NOT ready when your constructor is called. You should NOT be diddling with the hardware in the constructor.

Always have a separate setup() function in your objects and make sure you call it. The constructor should do mostly nothing except initializing your const variables.