mycontroller-org / MyControllerDevice

MyController supported MQTT ESP8266 library
http://www.mycontroller.org
Apache License 2.0
4 stars 4 forks source link

Temperature example not working #11

Open cimba007 opened 6 years ago

cimba007 commented 6 years ago
C:\Users\Marc\AppData\Local\Temp\arduino_build_235898\libraries\MyControllerDevice\MyController.cpp.o: In function `checkFactoryResetPin()':

c:\users\marc\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2/functional:2069: multiple definition of `timer'

C:\Users\Marc\AppData\Local\Temp\arduino_build_235898\sketch\RelayActuatorAndTemperature.ino.cpp.o:(.bss.timer+0x0): first defined here

collect2.exe: error: ld returned 1 exit status
cimba007 commented 6 years ago

Seems the timer library is not working at all ..

jkandasa commented 6 years ago

@cimba007 timer library used from here. https://github.com/JChristensen/Timer

cimba007 commented 6 years ago

@jkandasa Please check the error message closely.

A SimpelTimer variable named "timer" is used IN the library and thus cannot be used in the sketch as well.

multiple definition of `timer'

In the actual sketch you cant't use "timer" .. I used "mytimer" and it is working:

https://pastebin.com/xESBYUkg

jkandasa commented 6 years ago

@cimba007 timer already defined in MC sketch. you can use it directly(without defining it). I will update the example sketches.

And I am not a professional Arduino library developer(at least for now). If you have idea, kindly contribute on #14