When you see a "No such file or directory" error it almost always means you need to install the library that contains the missing file.
The code you found is an example for a library but you didn't install the library. If you had read the library's readme found in the same repository as the example code you would have found instructions for installing the library. Those instructions will work, but I can provide you more detailed instructions that offer an easier and less problematic method of installing the library:
- Go to the library's home page: GitHub - automote/ESP-CoAP: This repo contains CoAP protocol for ESP-12E
- Click the "Clone or Download" button.
- Click "Download ZIP"
- (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library > select the downloaded file > Open
shivkadari:
I just want to say, I always try to find a solution by googling it and if I don't find a solution, I try to find a solution in my own way finally if I fail then I seek help of others. The reason is, If we try to seek help of others at first place then we can't learn anything on our own(This is what I think, I don't know about others).
That's great. It's exactly what I do. But when you do finally need to ask for help you should provide all the necessary information. With that link, I could have given you the correct solution from the start. The problem with just taking a shotgun approach of dropping random files in random locations is you can end up creating new problems for yourself. The upside is I think you learned something new about the #include directive syntax, which is definitely useful information.