Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile #1

Open
mitchcecg opened this issue Mar 18, 2022 · 6 comments
Open

Can't compile #1

mitchcecg opened this issue Mar 18, 2022 · 6 comments

Comments

@mitchcecg
Copy link

when I compile with Arduino ide 1.9 I get the following errors
can you supply info on compiling the code
THANX
MITCH
If I had a son he would be a son of a Mitch

B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void setup()':
ESPBlinds:64:3: error: 'setupWifi' was not declared in this scope
64 | setupWifi();
| ^~~~~~~~~
ESPBlinds:66:26: error: 'mqttCallback' was not declared in this scope
66 | mqttClient.setCallback(mqttCallback);
| ^~~~~~~~~~~~
ESPBlinds:68:5: error: 'mqttReconnect' was not declared in this scope
68 | mqttReconnect();
| ^~~~~~~~~~~~~
ESPBlinds:71:3: error: 'mqttPublish' was not declared in this scope
71 | mqttPublish(MQTT_TOPIC_ENABLED, 0);
| ^~~~~~~~~~~
ESPBlinds:74:3: error: 'loadFromEeprom' was not declared in this scope
74 | loadFromEeprom();
| ^~~~~~~~~~~~~~
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void loop()':
ESPBlinds:96:5: error: 'mqttReconnect' was not declared in this scope
96 | mqttReconnect();
| ^~~~~~~~~~~~~
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void closeBlinds()':
ESPBlinds:104:3: error: 'mqttPublish' was not declared in this scope
104 | mqttPublish(MQTT_TOPIC_STATE, "closing");
| ^~~~~~~~~~~
ESPBlinds:105:3: error: 'setStepperDirection' was not declared in this scope; did you mean 'stepDirection'?
105 | setStepperDirection(DIRECTION_CLOSE);
| ^~~~~~~~~~~~~~~~~~~
| stepDirection
ESPBlinds:106:3: error: 'setStepperMode' was not declared in this scope
106 | setStepperMode(MODE_CLOSE);
| ^~~~~~~~~~~~~~
ESPBlinds:107:3: error: 'stepFor' was not declared in this scope; did you mean 'stepper'?
107 | stepFor(STEPS_VERTICAL);
| ^~~~~~~
| stepper
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void openBlinds()':
ESPBlinds:114:3: error: 'mqttPublish' was not declared in this scope
114 | mqttPublish(MQTT_TOPIC_STATE, "opening");
| ^~~~~~~~~~~
ESPBlinds:115:3: error: 'setStepperDirection' was not declared in this scope; did you mean 'stepDirection'?
115 | setStepperDirection(DIRECTION_OPEN);
| ^~~~~~~~~~~~~~~~~~~
| stepDirection
ESPBlinds:116:3: error: 'setStepperMode' was not declared in this scope
116 | setStepperMode(MODE_OPEN);
| ^~~~~~~~~~~~~~
ESPBlinds:117:3: error: 'stepFor' was not declared in this scope; did you mean 'stepper'?
117 | stepFor(STEPS_VERTICAL);
| ^~~~~~~
| stepper
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void stepFor(int)':
ESPBlinds:127:3: error: 'setStepperEnabled' was not declared in this scope; did you mean 'stepperEnabled'?
127 | setStepperEnabled(true);
| ^~~~~~~~~~~~~~~~~
| stepperEnabled
ESPBlinds:152:9: error: 'mqttPublish' was not declared in this scope
152 | mqttPublish(MQTT_TOPIC_STEPS, currentStep);
| ^~~~~~~~~~~
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void setStepperMode(int)':
ESPBlinds:163:3: error: 'mqttPublish' was not declared in this scope
163 | mqttPublish(MQTT_TOPIC_MODE, mode);
| ^~~~~~~~~~~
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void setStepperEnabled(bool)':
ESPBlinds:171:5: error: 'mqttPublish' was not declared in this scope
171 | mqttPublish(MQTT_TOPIC_ENABLED, 1);
| ^~~~~~~~~~~
ESPBlinds:174:5: error: 'mqttPublish' was not declared in this scope
174 | mqttPublish(MQTT_TOPIC_ENABLED, 0);
| ^~~~~~~~~~~
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void setStepperDirection(int)':
ESPBlinds:184:5: error: 'mqttPublish' was not declared in this scope
184 | mqttPublish(MQTT_TOPIC_DIRECTION, "forwards");
| ^~~~~~~~~~~
ESPBlinds:187:5: error: 'mqttPublish' was not declared in this scope
187 | mqttPublish(MQTT_TOPIC_DIRECTION, "reverse");
| ^~~~~~~~~~~
B:\Blinds\ESPBlinds\ESPBlinds.ino: In function 'void mqttCallback(char*, byte*, unsigned int)':
ESPBlinds:257:5: error: 'saveToEeprom' was not declared in this scope
257 | saveToEeprom();
| ^~~~~~~~~~~~
ESPBlinds:261:5: error: 'saveToEeprom' was not declared in this scope
261 | saveToEeprom();
| ^~~~~~~~~~~~
ESPBlinds:265:5: error: 'saveToEeprom' was not declared in this scope
265 | saveToEeprom();
| ^~~~~~~~~~~~
ESPBlinds:269:5: error: 'saveToEeprom' was not declared in this scope
269 | saveToEeprom();
| ^~~~~~~~~~~~
ESPBlinds:273:5: error: 'saveToEeprom' was not declared in this scope
273 | saveToEeprom();
| ^~~~~~~~~~~~
exit status 1
'setupWifi' was not declared in this scope
I

@se1exin
Copy link
Owner

se1exin commented Mar 18, 2022

Ha wow, that's quite the error.. Did you copy constants.example.h to constants.h and fill out the Wifi & MQTT details? (sorry, I acknowledge this was not documented at all in the readme).

Also, the .ino sketch has ESP8266 includes, are using an ESP8266 board?

Finally, the following arduino library needs to be installed:

(I really wish the Ardiuno IDE had a project package management solution)

Again, I acknowledge that none of the above has been documented at all in the readme or otherwise - sorry about that, I'll update the readme accordingly.

@mitchcecg
Copy link
Author

mitchcecg commented Mar 18, 2022

Thanks for the response
Yes I did copy constants.example.h to constants.hand edited it
I am using ESP8266 board
I have now installed the library
I am still getting the same error

@se1exin
Copy link
Owner

se1exin commented Mar 19, 2022

That's really odd that are you are still getting errors. Can you please try moving the setup() and loop() functions to the end of the file?

Also just noticed you mention you are using Arduino IDE 1.9 which appears to be a beta version. I am successfully compiling this using Arduino IDE 1.8.19 (on linux) - can you try using version 1.8.19?

@mitchcecg
Copy link
Author

mitchcecg commented Mar 19, 2022 via email

@mitchcecg
Copy link
Author

mitchcecg commented Mar 19, 2022 via email

@mitchcecg
Copy link
Author

mitchcecg commented Mar 19, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants