I am trying to find the header file where this function is defined:
sendNTPpacket(
This is from one of the Ethernet examples in arduino.
I also want to know what other similar functions are defined.
I am trying to find the header file where this function is defined:
sendNTPpacket(
This is from one of the Ethernet examples in arduino.
I also want to know what other similar functions are defined.
If the example is the “Udp NTP Client”; it has 3 include files which in themselves have further include files. It can get quite frustrating trying to find exactly where a function is declared. I searched for some time and could not find it.
The code complies correctly for me so it must be declared somewhere; but I have not tested it as I dont have an Ethernet shield.
I used
to get the network time for an Adafruit HUZZAH ESP8266 board. This code redefines sendNTPpacket() so you can see what it is doing.
Regards
Jim
You could try
find /usr/include/ -type f -exec grep -n sendNTPpacket {} \; -print
A very reasonable want, and C/C++ is designed for this sort of discoverability - “header files” list related functions so you can see what’s supported. This is so powerful that most editors will automatically parse these header files and list the options as you type.
Alas, Arduino does none of this. It deliberately hides this detail to simplify the experience. Congratulations, you have out-grown Arduino!
As the answers so far suggest, your options are:
By the way, your thread title has a number of mistakes. I know it’s so hard to know how to ask a question when you don’t know the answer! Here’s some tips for next time:
sendNTPpacket
is a function, not a type.