New user ready to give up

I hope this is the correct forum, if not I'll just give up now.

I'm new to programming and Arduino seemed like a good place to start. I bought the UNO board and a 37 sensor kit. I have loaded the "blinking LED" program successfully. The next lesson is temperature and humidity. The first lesson worked great and I thought I was on my way. I'm an electronic tech so I know how to wire circuits. But programing is completely new to me and everyone here seems to know something about it already.

I've been working for three days trying to get the second program to run. The problem is the "include library" part. Please don't laugh, I have no idea what that means. I did find a DHT library and I did install it. Given that, it means nothing to me. It is at the bottom of the "include library" and I "included" it. One little line at the top. Still got the "no such file or directory" error.

I just don't understand where the library is or where it's suppose to be. Is it in the program itself or is it calling another program up? The include menu even told me it needed two other programs so I included those also. But I don't know what this included them to. It really makes no sense to me. Why do I have include anything and what is it included to?

I know this sounds stupid to most people here because they already know how to do it. But to a non-programmer it is all Greek. Without help I'll never get past the second lesson. It doesn't seem like it should this difficult to load a program and run it. Why do I have to "include" anything to make a program run.

So, if anyone could explain to me what I'm doing wrong, that would be great. If not, I guess my programming days won't last long. I'll be limited to small programs that turns things on and off. I can't even run the programs that come with the sensor kit. It's all been very frustrating.

Thanks for any help
Joe

I'm in the same boat. New at this and everyone says its easy and the programming is easy but for me it hasn't. But don't give up. Every time you work on it you'll learn something new. Asking questions on the forum is helpful too. I'm slowly starting to understand after about a year.

Arduino is no programming course. The programs are rather simple, so you might pick it up, but you don't get the complete picture.

You could try Sololearn. They also have courses in other languages. I found it most useful.

Hopefully this guide will help you install the include files required for your sketch (i.e. .h files) For information on installing libraries, see: http://www.arduino.cc/en/Guide/Libraries

A library's just a bunch of code that someone else wrote to do some repetitive tasks; so instead of re-writing the same code to (eg) read a DHT sensor in many different programs, we write it once, put it on the shelf, and call it in (hence "include") into each program where we want to do those tasks.

Problem with the DHT11 sensor is that there seem to be a million libraries with similar names; if you install one that seems to be the correct one going off the name, but isn't the one that the code you find actually wants, it won't work.

There's no "Library Name Authority" :wink: . If you wrote a DHT11 library you might call it DHT11.h which is fine for your own use, and so might I. But if you and I both make a library called DHT11.h available to the public at large, there's no way to control the fact that ideally they should have unique names. So the next person might find a program that includes a library called DHT11... but is that yours or mine or some other similarly named one?

I wonder what documentation you're using for that kit? Mine came with nothing; it's not the "Keyes" version of the kit, but a knock-off with no branding on the box or the parts. I found this manual to be very useful; it seems not to be "official" but rather a private attempt to document the kit by one Tyson Popynick.

He explains what a library is for near the front. It shows how to install a library via the library manager. The DHT11 chapter is near the back, page 68. If you use his code, and install the Adafruit library he installs (there's a screen shot so you can see which one he means), it should be ok.

Kirwin:
everyone says its easy and the programming is easy

I've never seen "any"one, let alone "every"one say that. If that were true this forum would be largely unnecessary :wink:

(The OP of this thread's problem is not a programming issue, not in the sense of not knowing how to write code. His or her problem seems to be not being able to install the correct library for code they already have.)

The syntax of the commands is quite straightforward, but the tricky part is deciding what commands to use and of course getting them all to work in harmony. That's why it's usually recommended, when tackling a project, to plan it out first and to think about how to get many things to (seemingly) happen at once (which is very often a requirement), before diving into code and cobbling a load of bollocks together.

xswatts:
I've been working for three days trying to get the second program to run. The problem is the "include library" part. Please don't laugh, I have no idea what that means. I did find a DHT library and I did install it. Given that, it means nothing to me. It is at the bottom of the "include library" and I "included" it. One little line at the top. Still got the "no such file or directory" error.

What did you find? If somewhere on the web, link please.

How did you install it?

The easiest way is to install through the library manager (in the IDE, sketch -> include library -> manage libraries); however not everything that you might need is available through there.

Note: some libraries require other libraries; maybe after installing the library it's complaining about another library. From memory, the Adafruit library for the DHT has that "problem".

xswatts:
I just don't understand where the library is or where it's suppose to be. Is it in the program itself or is it calling another program up? The include menu even told me it needed two other programs so I included those also. But I don't know what this included them to. It really makes no sense to me. Why do I have include anything and what is it included to?

3rd party libraries are installed in the libraries directory. In the IDE, file -> preferences, tab settings, sketchbook location; on my Windows system, it says "C:\Users\sterretje\Documents\Arduino". In that directory is a subdirectory called "Libraries".

As explained, a library in Arduino land is a collection of code that allows you to use a specific component (in your case a DHT11). When you compile a sketch and you use a library, that code is compiled as is the sketch and the result is linked together to give the final executable.

Most libraries come with example code. When you install a library that comes with example code, look in the IDE under file -> examples -> library_name and base your sketch on those examples.

Hello xswatts.

Programming is not easy.

However, each of the problems frustrating you is easy to resolve. Keep up the effort and things will become clear.

John.

You do worse than buy an introduction book such as the one by Simon Monk -“getting started with Arduino”.

I used that at the start and found it very good . There maybe ( are) some good tutorials on the web too .
Google when you are stuck too - “ Arduino library” ; “Arduino install library “.

Don’t give up ! If was easy it wouldn’t be worth doing