Beginner library question. Plz help stuck for two days.

Hello, first of all, thank you for trying to help me out.
I'm going through an Arduino book and stuck with a library issue.

I was going through a book and got to a chapter that measures air quality using MQ135 sensor.
I had to connect the sensor to Arduino with 5v, GND and A0 pin, download the library, and run the following code.

The library page:

The code:
#include <MQ135.h>

MQ135 gasSensor = MQ135(A0);

void setup() {
Serial.begin(9600);
}

void loop() {
// Read out the calibration value with below code
//float rzero = gasSensor.getRZero();

float ppm = gasSensor.getPPM(); // 센서 값 측정 및 농도 변환
Serial.print("CO2(ppm) = ");
Serial.println(ppm);

delay(350);
}

I kept getting error highlighting the #include <MQ135.h> part Red and saying
"MQ135.h: No such file or directory"

I tried adding the library with zip, putting the library directly into the Arduino library folder in documents and tried other libraries on the internet, but they all gave me the same error. (I changed the folder name to MQ135)

I pass the chapter and continue. One part I had to make tones with buzzer. It included a sketch with a library defining pitches attached with a different tab. I didn't have to download the library and it worked just fine.
Using the servo library worked fine as well.

I got to the point that the book explains the sensors. The first one was using DHT11.
After I downloaded the library and ran the code, the same error popped up like the gas sensor library.

I went back to the gas sensor, but couldn't find a solution.
This code on the bottom is the MQ135.h file opened in Wordpad.

I tried adding _H part to the sketch-like:
MQ135_H gasSensor = MQ135(A0);

but didn't work.

I can't find what is wrong with me and my computer.
I've never wanted to see the air quality of my room this bad.
I'd really appreciate your help.

/**************************************************************************/
/*!
@file MQ135.h
@author G.Krocker (Mad Frog Labs)
@license GNU GPLv3

First version of an Arduino Library for the MQ135 gas sensor
TODO: Review the correction factor calculation. This currently relies on
the datasheet but the information there seems to be wrong.

@section HISTORY

v1.0 - First release
*/
/**************************************************************************/
#ifndef MQ135_H
#define MQ135_H
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

/// The load resistance on the board
#define RLOAD 10.0
/// Calibration resistance at atmospheric CO2 level
#define RZERO 76.63
/// Parameters for calculating ppm of CO2 from sensor resistance
#define PARA 116.6020682
#define PARB 2.769034857

/// Parameters to model temperature and humidity dependence
#define CORA 0.00035
#define CORB 0.02718
#define CORC 1.39538
#define CORD 0.0018

/// Atmospheric CO2 level for calibration purposes
#define ATMOCO2 397.13

class MQ135 {
private:
uint8_t _pin;

public:
MQ135(uint8_t pin);
float getCorrectionFactor(float t, float h);
float getResistance();
float getCorrectedResistance(float t, float h);
float getPPM();
float getCorrectedPPM(float t, float h);
float getRZero();
float getCorrectedRZero(float t, float h);
};
#endif

Here's the best way to install the MQ135 library:

  • Download the library: https://github.com/GeorgK/MQ135/archive/master.zip
  • (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library...
  • Select the downloaded file.
  • Click the "Open" button.
  • Wait until you see a message on the Arduino IDE's status bar that tells you the library was installed successfully.

After installing the library that way, I was able to compile your sketch without errors.

Likely, you could use the same procedure to install the library for the DHT11. Some libraries can be installed via Library Manager (Sketch > Include Library > Manage Libraries) and that is always the best installation method, but unfortunately the author of the MQ135 library has not requested that it be added to the Library Manager, so we have to use the second best installation method (Add .ZIP Library) to install that library.

pert:
Here's the best way to install the MQ135 library:

  • Download the library: https://github.com/GeorgK/MQ135/archive/master.zip
  • (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library...
  • Select the downloaded file.
  • Click the "Open" button.
  • Wait until you see a message on the Arduino IDE's status bar that tells you the library was installed successfully.

After installing the library that way, I was able to compile your sketch without errors.

Likely, you could use the same procedure to install the library for the DHT11. Some libraries can be installed via Library Manager (Sketch > Include Library > Manage Libraries) and that is always the best installation method, but unfortunately the author of the MQ135 library has not requested that it be added to the Library Manager, so we have to use the second best installation method (Add .ZIP Library) to install that library.

Thx for the reply. I tried your method but didn't work. I'll try reinstalling the arduino ide.

pert:
Here's the best way to install the MQ135 library:

  • Download the library: https://github.com/GeorgK/MQ135/archive/master.zip
  • (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library...
  • Select the downloaded file.
  • Click the "Open" button.
  • Wait until you see a message on the Arduino IDE's status bar that tells you the library was installed successfully.

After installing the library that way, I was able to compile your sketch without errors.

Likely, you could use the same procedure to install the library for the DHT11. Some libraries can be installed via Library Manager (Sketch > Include Library > Manage Libraries) and that is always the best installation method, but unfortunately the author of the MQ135 library has not requested that it be added to the Library Manager, so we have to use the second best installation method (Add .ZIP Library) to install that library.

I don't know what is wrong with this. After reinstalling the Arduino ide, the library still spits out an error.
Plz give me any possible solution.

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.