motorshield.h not detected even after downloading all the relevant libraries

hello everyone
im trying to modify the code for an arduino based robot which i bought. it is an obstacle avoiding robot and i want to add a smoke detecting sensor to it. i have the code, which is as follows

*/

#include <Ultrasonic.h>
#include <Motor_Shield.h>

#define TRIG A0
#define ECHO A1
DCMotor lmotor(1);					//Declare lmotor (left motor) as a DCMotor
DCMotor rmotor(2);	                                //Declare rmotor (right motor) as a DCMotor 
void Right(unsigned char Speed);	//Declare function for right turn
void Left(unsigned char Speed);		//Declare function for left turn
void Fwd(unsigned char Speed);		//Declare function for forward move
void Back(unsigned char Speed);		//Declare function for backward move
void Stop(void);					//Declare function for motor stop
Ultrasonic ultrasonic(TRIG,ECHO);               

void setup() {
     Serial.begin(9600);           			// set up Serial library at 9600 bps
     Serial.println("Robokits Arduino Robot");	
}

void loop() 
{
  
   //Serial.println(ultrasonic.Ranging(CM));

  if(ultrasonic.Ranging(CM) <=20)			//Program logic : If distance is sensed less than 8cm turn left otherwise keep moving forward.
    {
      Left(150);
    }
  else
    {
      Fwd(150);
    }
  delay(10);
}

void Fwd(unsigned char Speed)		//Both motors forward at specified speed to move forward
{
  lmotor.setSpeed(Speed);
  rmotor.setSpeed(Speed);
  lmotor.run(FORWARD);
  rmotor.run(FORWARD);
}

void Left(unsigned char Speed)		//Left motor backwards and Right motor forward to take left turn
{
  lmotor.setSpeed(Speed);
  rmotor.setSpeed(Speed);
  lmotor.run(BACKWARD);
  rmotor.run(FORWARD);
}

void Stop(void)						//Both motors stop to stop the robot
{
  lmotor.setSpeed(0);
  rmotor.setSpeed(0);
}

i have tried to verify the code in arduino ide which gave me an error saying something on the lines of “ultrasonic sensor library not detected” i solved that by downloading the library through the sketch option . then it gave me another error saying that

"C:\Users\user\Downloads\Robokits_Arduino_Robot_V2\Robokits_Arduino_Robot_V2.ino:36:26: fatal error: Motor_Shield.h: No such file or directory

#include <Motor_Shield.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno."

I tried using the same solution as for the ultra sonic sensor , by downloading the relevant motor shield library from the sketch option of the ide but it still doesnt detect the newly installed library. where did i go wrong?

Which of these is the "V2"?

the one i bought is the roundbot.with a circular body

Please give exact details of how you installed this motor shield library. "downloading the library through the sketch option" is way too vague.

shams:
the one i bought is the roundbot.with a circular body

Well, the page for that robot says:

Resources

  • Arduino website for software and other tutorials
  • Arduino Sketch and library for Roundbot(Arduino)

But neither of those are actual links. Where did you find the Arduino Sketch and library?

i asked the company for the code and they emailed me

pert:
Please give exact details of how you installed this motor shield library. “downloading the library through the sketch option” is way too vague.

as u probably know in the arduino tools pane the sketch option has the option to include libraries->manage libraries. i downloaded the motor shield library after searching for it in that dialog box.

A search for "Motor_Shield" in the Library Manager yields 13 results. If you want help you need to give exact details. If you had just taken the time to do this from the start you would not have wasted so much of our time and you would have had a solution 4 days ago. You're making it really difficult for us to help you.

i have attached the list of motor shield libraries i have installed.

libraries installed.doc (210 KB)

Post the list here, not as a .doc file. That's very unhelpful.

these are the ones i have installed through the manage libraries option
adafruit motor shield library
adafruit motor shield v2 library

and this one i added manually to the libraries folder after downloading it from the net
motorshield-master

sorry but this is my first time on any type of forum. i apologize if i seem rude

adafruit motor shield library
adafruit motor shield v2 library

Why would you install both of these? The motor driver shield you have is either V1, and you need the first one, or it is V2, and you need the second one.

motorshield-master

Once again, why?

Do you really not know what hardware you have? It only makes sense to install ONE library that is compatible with that hardware. And, it ONLY makes sense to try to use code that is compatible with that library and that hardware.

A shotgun approach to installing libraries is doomed to failure.

shams:
adafruit motor shield library
adafruit motor shield v2 library

Neither of those libraries contain a file named Motor_Shield.h

shams:
and this one i added manually to the libraries folder after downloading it from the net
motorshield-master

Post the link to where you download it from. Use the chain links icon on the toolbar to make the link clickable.

I'd think that the company that provided you the code would have either included the library with it or documentation that tells you where you can download the library from.

ok so this is what i found interesting in the comments above the actual code.
"This code uses motor shield library from OK Electronics."
i searched through the net for a motor shield library but no luck
ill try contacting the company