Importing own libraries

I’ve made several own libraries and added them as a .ZIP libraries.

Now I got the following error:
‘timeClient’ was not declared in this scope

But #include <library.h> and #include “library.h” both have been tried and timeClient is used in setup() and in loop() it gives the error.

Who can help me run my code without errors?

Please post an example small but complete program that illustrates teh problem

Where are the timeClient library files located on your PC ?

By importing it as a library it will be located in C:\Users\Username\Documents\Arduino\libraries

Does the file C:\Users\Username\Documents\Arduino\libraries\timeClient\timeClient.h exist?

No in C:\Users\Username\Documents\Arduino\libraries\Time\Time.h
with timeclient defined as followed:
NTPClient timeClient(ntpUDP, “0.nl.pool.ntp.org”);

There is a file named time.h in the toolchain. Because Windows is filename case-insensitive, your #include directive for Time.h causes that time.h to be #included instead. This problem affected many users of the popular Time library until its header file was renamed to the unique TimeLib.h. So you just need to rename the file C:\Users\Username\Documents\Arduino\libraries\Time\Time.h to something unique and update your #include directives accordingly.

Now I get a compile error for the Generic ESP8266 Module

The OP PM'd his sketch to me

Here it is

PM from the OP

Apparently he does not want his code to be public, which means providing help is going to be difficult

Testuino:
Now I get a compile error for the Generic ESP8266 Module

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.

Apparently he does not want his code to be public, which means providing help is going to be difficult

Literally why???

Testuino:
Now I get a compile error for the Generic ESP8266 Module

Please post your exact error

Testuino:
Now I got the following error:
'timeClient' was not declared in this scope

timeClient is used in setup() and in loop() it gives the error.

Testuino:
with timeclient defined as followed:
NTPClient timeClient(ntpUDP, "0.nl.pool.ntp.org");

I think the problem may be that 'timeClient' is declared in setup() as a local variable and used in loop() where it is out of scope. Try moving the NTPClient timeClient(ntpUDP, "0.nl.pool.ntp.org"); to above setup() where it will be a global variable that can be used in both setup() and loop().

I solved all the problems!

Testuino:
I solved all the problems!

Congratulations!
How did you solve the problems? You solution may be helpful to future forum members seeking to solve similar problems.

johnwasser:
You solution may be helpful to future forum members seeking to solve similar problems.

Someone who sends code via PM and then complains when it’s shared on the forum is unlikely to care too much about that.

gfvalvo:
Someone who sends code via PM and then complains when it's shared on the forum is unlikely to care too much about that.

Gosh I hate people like that - impossible to help while not allowing others to learn from their efforts. So selfish.