-->
Page 1 of 1

ERROR Compile for relay switch.ino

PostPosted: Mon Nov 23, 2015 9:34 am
by nimaaryamehr
i want to compile this code but i got the error..?!!!!
this cod:
Code: Select allhttps://github.com/iot-playground/EasyIoT-Cloud/blob/master/ESP8266_relay_switch_MQTT/ESP8266_relay_switch_MQTT.ino


ERROR:
Code: Select allrelay:64: error: 'loadConfig' was not declared in this scope

   loadConfig();

              ^

relay:95: error: 'macToStr' was not declared in this scope

   clientName += macToStr(mac);

                             ^

relay:105: error: 'myConnectedCb' was not declared in this scope

   myMqtt.onConnected(myConnectedCb);

                      ^

relay:106: error: 'myDisconnectedCb' was not declared in this scope

   myMqtt.onDisconnected(myDisconnectedCb);

                         ^

relay:107: error: 'myPublishedCb' was not declared in this scope

   myMqtt.onPublished(myPublishedCb);

                      ^

relay:108: error: 'myDataCb' was not declared in this scope

   myMqtt.onData(myDataCb);

                 ^

relay:120: error: 'waitOk' was not declared in this scope

   waitOk();

          ^

relay:154: error: 'saveConfig' was not declared in this scope

     saveConfig();

                ^

C:\Users\Elisum\Documents\Arduino\relay\relay.ino: In function 'void loop()':

relay:211: error: 'saveConfig' was not declared in this scope

     saveConfig();

                ^

exit status 1
'loadConfig' was not declared in this scope



Image

I'm sorry, my English is not good

Re: ERROR Compile for relay switch.ino

PostPosted: Mon Nov 23, 2015 12:31 pm
by bluegiraffe
It seems that loadConfig() is defined at the end of the file.

Move the loadConfig() function before declaration, or move init() and loop() to end of file.

See if it helps.

Re: ERROR Compile for relay switch.ino

PostPosted: Mon Nov 23, 2015 2:38 pm
by nimaaryamehr
i do it but not
If possible, make yourself to me
so tnx
sorry My English is awful..! :D

Re: ERROR Compile for relay switch.ino

PostPosted: Thu Nov 26, 2015 3:25 am
by Sprite_tm
Pretty sure this is an Arduino-related question, and not an esphttpd one. Please try again in the appropriate subforum.