Thank you for the opportunity and I must say, I love the ESP after just two days of playing around with them!!!
Since I am familiar with the Arduino IDE environment, I decided to continue on the same path and installed the ESP library.
My IDE is 1.6.8, but the issue I will describe below also happened in 1.6.5 (that is why I upgraded).
The core is the contributed ESP8266 version 2.1.0.
Sorry for posting this in the bugs section, but I have no reason to believe otherwise, since my code only contains one line. Unless, of course, it's my environment, but... here it is, anyway:
#include <ESP8266WiFi.h>
ADC_MODE(ADC_VCC);
void setup() {
}
void loop() {
}
The error is:
exit status 1
previous declaration of 'int __get_adc_mode()' with 'C++' linkage
or more detailed (and cleaned up a bit):
C:\Users\zzzz\AppData\Local\Temp\arduino_modified_sketch_659241\ESP_sensors_wifi.ino: In function 'int __get_adc_mode()':
ESP_sensors_wifi:3: error: previous declaration of 'int __get_adc_mode()' with 'C++' linkage
ADC_MODE(ADC_VCC);
^
In file included from C:\Users\zzzz\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/Arduino.h:247:0,
from C:\Users\zzzz\AppData\Local\Temp\build3e8b00d6616d95394bd09565efec4913.tmp\sketch\ESP_sensors_wifi.ino.cpp:1:
C:\Users\zzzz\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/Esp.h:74:58: error: conflicts with new declaration with 'C' linkage
#define ADC_MODE(mode) extern "C" int __get_adc_mode(void) { return (int) (mode); }
^
C:\Users\zzzz\AppData\Local\Temp\arduino_modified_sketch_659241\ESP_sensors_wifi.ino:3:1: note: in expansion of macro 'ADC_MODE'
ADC_MODE(ADC_VCC);
^
Is there an easy/quick way to fix this? Maybe with an #ifdef?
I would be more than happy to try, but I would need details on which file to change as I am but an amateur programmer.
Thank you and best regards.