• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Location of .h files used in VS Code

Q&A Forum › Category: ESP32 › Location of .h files used in VS Code
0 Vote Up Vote Down
Joe Margevicius asked 3 years ago

In .cpp programs used in the Websocket programming, where are the #include files located on a PC ? I’d like to look at them.  These are called, for example
#include <Arduino.h>
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include “SPIFFS.h”
I’d like to look at the specifications for ledcWrite(), digitalWrite(), ledcSetup(), pinMode() … as examples.  Thanks

Question Tags: include files
7 Answers
0 Vote Up Vote Down
Tom Marshall answered 3 years ago

Open file explorer outside of VS and search for the names. For example, on my Windows 10 laptop I found:
“Arduino.h” located at C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
“WiFi.h” at C:\Users\prock\.platformio\packages\framework-esp8266-nonos-sdk\examples\esp_mqtt_proj\include\modules
… etc.
I also modified paths in “System Environment Variables” so that these files are automatically found at startup in VS.

0 Vote Up Vote Down
Joe Margevicius answered 3 years ago

Thanks Tom … I found it where you stated.  (I had tried the search for Arduino.h, but my Windows 10 comes up with “see web results” … don’t know why.  Also I don’t have those locations in my PATH, but VS comes up fine – why do did you do that?)
This topic can be closed

0 Vote Up Vote Down
Tom Marshall answered 3 years ago

Welcome Joe! Sorry you are still having issues. 
PATH — I started to have VS compilations errors where could not find certain *.h files. So I located all of the files then manually modified my PATH in “Env Vars” to include paths to all required *.h files. Errors when away.
Have you searched every drive including ones on clouds like OneDrive? My PATH problem started when somehow my Arduino files were installed on my OneDrive.

0 Vote Up Vote Down
Joe Margevicius answered 3 years ago

Thanks Tom.  Actually, I finally realized that what I needed was a good reference manual to the ESP32.  I had questions about the ledc (led controller), and thought the .h files would help specify that; now that I can see some of those .h files, it really doesn’t help much. For example, the ledc (led controller) functionality is really an Espressif-provided function, best explained in the reference manual (section 13 in this case).  For anyone reading this and wanting access to the manual, here is a link to the pdf: http://usermanual.wiki/Document/esp32technicalreferencemanualen.364707200.pdf   (an example – PWM is described in the eBooks using ledc for leds and motors, but there is also the MCPWM module to control motors; worth a look)

0 Vote Up Vote Down
Steve Mercer answered 3 years ago

Actually the best location for the ESP32 would be at Espressif’s web site – https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/index.html

0 Vote Up Vote Down
Joe Margevicius answered 3 years ago

yes indeed!  Thanks Steve. .. the hardware manual I was looking for was buried down in the page: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/index.html … good documentation by Espressif 🙂  (unlike the documentation for the “guts” of the Raspberry Pi)

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
I see you already solved your issue.
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.