Skip to main content
added 106 characters in body
Source Link
idkfa
  • 140
  • 6

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.

You should put the nodemcu_test.ino in your sketchbook folder as I would generally avoid putting non-library files in the libraries folder. If you do want to keep the examples for a specific library close to the library create a subfolder:

Arduino Folder
    |-- libraries
        |--HX711
            |-- examples
                |--nodemcu_test.ino
            |--HX711.cpp
            |--HX711.h

As Juraj pointed out, this has the additional advantage of them being accessable in the examples menu.

If you want the libraries close to your sketch you are actually working on, follow the guide and put the library files in your sketchbook folder for your project. I would not advise for the following reasons:

I read that in newer IDEs 1.8.X you would need to put the files in a /src/subfolder. For me it did work without that, but the main caveat remained:

#include <HX711.h>

means to look in the library folder as mentioned above.

If you want to put the files somewhere else, you have to use

#include "HX711.h"

and specify the path (or in this example it was located where my .ino was). But now I also need to change

#include <HX711.h>

to

#include "HX711.h"

in the HX711.cpp file. What a hassle!

So my takeaway message would be: Stick with Arduino\libraries\.

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.

You should put the nodemcu_test.ino in your sketchbook folder as I would generally avoid putting non-library files in the libraries folder. If you do want to keep the examples for a specific library close to the library create a subfolder:

Arduino Folder
    |-- libraries
        |--HX711
            |-- examples
                |--nodemcu_test.ino
            |--HX711.cpp
            |--HX711.h

If you want the libraries close to your sketch you are actually working on, follow the guide and put the library files in your sketchbook folder for your project. I would not advise for the following reasons:

I read that in newer IDEs 1.8.X you would need to put the files in a /src/subfolder. For me it did work without that, but the main caveat remained:

#include <HX711.h>

means to look in the library folder as mentioned above.

If you want to put the files somewhere else, you have to use

#include "HX711.h"

and specify the path (or in this example it was located where my .ino was). But now I also need to change

#include <HX711.h>

to

#include "HX711.h"

in the HX711.cpp file. What a hassle!

So my takeaway message would be: Stick with Arduino\libraries\.

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.

You should put the nodemcu_test.ino in your sketchbook folder as I would generally avoid putting non-library files in the libraries folder. If you do want to keep the examples for a specific library close to the library create a subfolder:

Arduino Folder
    |-- libraries
        |--HX711
            |-- examples
                |--nodemcu_test.ino
            |--HX711.cpp
            |--HX711.h

As Juraj pointed out, this has the additional advantage of them being accessable in the examples menu.

If you want the libraries close to your sketch you are actually working on, follow the guide and put the library files in your sketchbook folder for your project. I would not advise for the following reasons:

I read that in newer IDEs 1.8.X you would need to put the files in a /src/subfolder. For me it did work without that, but the main caveat remained:

#include <HX711.h>

means to look in the library folder as mentioned above.

If you want to put the files somewhere else, you have to use

#include "HX711.h"

and specify the path (or in this example it was located where my .ino was). But now I also need to change

#include <HX711.h>

to

#include "HX711.h"

in the HX711.cpp file. What a hassle!

So my takeaway message would be: Stick with Arduino\libraries\.

added content
Source Link
idkfa
  • 140
  • 6

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.

You canshould put the nodemcu_test.ino example in your sketchbook or examples folder.folder as I would generally avoid putting non-library files in the libraries folder. If you do want to keep the justexamples put the libraries infor a specific library close to the folder orlibrary create a subfolder called examples in the lib folder if:

Arduino Folder
    |-- libraries
        |--HX711
            |-- examples
                |--nodemcu_test.ino
            |--HX711.cpp
            |--HX711.h

If you don't want the libraries close to misplace thingsyour sketch you are actually working on, follow the guide and put the library files in your sketchbook folder for your project. I would not advise for the following reasons:

I useread that in newer IDEs 1.8.X you would need to put the standalone version of arduino idefiles in a /src/subfolder. For me it did work without that, ifbut the main caveat remained:

#include <HX711.h>

means to look in the library folder as mentioned above.

If you want to put the files somewhere else, you have to use

#include "HX711.h"

and specify the path (or in this example it installedwas located where my .ino was). But now I suspect the folder would be underalso need to change

My#include Documents\Arduino\libraries\<HX711.h>

According to

#include "HX711.h"

in the HX711.cpp file. What a hassle!

So my takeaway message would be: Stick with documentationArduino\libraries\.

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

You can put the .ino example in your sketchbook or examples folder. I would just put the libraries in the folder or create a subfolder called examples in the lib folder if you don't want to misplace things.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.

You should put the nodemcu_test.ino in your sketchbook folder as I would generally avoid putting non-library files in the libraries folder. If you do want to keep the examples for a specific library close to the library create a subfolder:

Arduino Folder
    |-- libraries
        |--HX711
            |-- examples
                |--nodemcu_test.ino
            |--HX711.cpp
            |--HX711.h

If you want the libraries close to your sketch you are actually working on, follow the guide and put the library files in your sketchbook folder for your project. I would not advise for the following reasons:

I read that in newer IDEs 1.8.X you would need to put the files in a /src/subfolder. For me it did work without that, but the main caveat remained:

#include <HX711.h>

means to look in the library folder as mentioned above.

If you want to put the files somewhere else, you have to use

#include "HX711.h"

and specify the path (or in this example it was located where my .ino was). But now I also need to change

#include <HX711.h>

to

#include "HX711.h"

in the HX711.cpp file. What a hassle!

So my takeaway message would be: Stick with Arduino\libraries\.

Source Link
idkfa
  • 140
  • 6

You want to import a library not an example.

Arduino Folder
    |-- libraries
        |--HX711
            |--HX711.cpp
            |--HX711.h

ex:

C:\Program Files (x86)\arduino-1.8.5-windows\arduino-1.8.5\libraries\HX711

Put the files in a folder called HX711 to have everything nice and tidy.

You can put the .ino example in your sketchbook or examples folder. I would just put the libraries in the folder or create a subfolder called examples in the lib folder if you don't want to misplace things.

I use the standalone version of arduino ide, if you have it installed I suspect the folder would be under

My Documents\Arduino\libraries\

According to the documentation.