Skip to content

ADC_MODE(ADC_VCC); crash compiler #2913

Closed
@pandacriss

Description

@pandacriss

NTPClient.ino example (https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/NTPClient/NTPClient.ino) wont compile if i add ADC_MODE(ADC_VCC); at the beginning of the sketch. others examples compile normally

it print the following error messages:

NTPClient:132: error: 'IPAddress' was not declared in this scope
unsigned long sendNTPpacket(IPAddress& address)
^
NTPClient:132: error: 'address' was not declared in this scope
unsigned long sendNTPpacket(IPAddress& address)
^
/tmp/arduino_modified_sketch_868703/NTPClient.ino: In function 'void loop()':
NTPClient:76: error: 'sendNTPpacket' cannot be used as a function
sendNTPpacket(timeServerIP); // send an NTP packet to a time server
^
/tmp/arduino_modified_sketch_868703/NTPClient.ino: In function 'long unsigned int sendNTPpacket(IPAddress&)':
NTPClient:132: error: 'long unsigned int sendNTPpacket(IPAddress&)' redeclared as different kind of symbol
unsigned long sendNTPpacket(IPAddress& address)
^
NTPClient:132: error: previous declaration of 'long unsigned int sendNTPpacket'
unsigned long sendNTPpacket(IPAddress& address)
^
exit status 1
'IPAddress' was not declared in this scope

if i comment/delete the ADC_MODE(ADC_VCC); it compiles again

Hardware

nodeMCU ESP-12 80mhz
arduino ide 1.6.13
esp8266 libs 2.3.0
linuxmint 64 bits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions