Author Options:

Interference of codes problem Answered

I want to ask for some help from you regarding of my final year project. I'm doing a simple SMART HOME project by using Arduino wemos. While compiling the function of the smart home, i've encountered some problem to compile it. Actually this is my first time using arduino and i don't really understand about the arduino ide syntax. Actually, there is no error in my coding. Basically, there are 5 functions that I want to put in that smart home. First, to control the lights,curtains and fans using ON/OFF Button, and security system only by using TSOP and IR, and lastly controlling the roof for the clothesline. So, I've problem with controlling the roof for the clothesline. The roof for the clothesline works when the rain sensor detects water/rain and it actually functioning when I do it separately. But, when I compile the code with the other functions, the roof is actually functioned, but it works only if I switch ON/OFF the lights/fans/curtains.

So, here I attached the source code of my project with four functions, which are for the lights, fans, curtains and roof.



2 months ago

i've configured it... thank u so much for your help...


2 months ago

Some basics that might be of help to you:
The Arduino IDE is like a good wine.
And like all good wines you need something to go with it - your code.
When you work with libraries that you include or use certain commands/functions then not every version of the IDE compiles it correctly.
In some case you might get an error message that even highlights the problem found but when checking corresponding code example it matches your own code.
In other cases the compiler might throw out tons of error messages that all trace back to some function, call or included library.
Whenever you write code for Arduino you basically aim to write it for the latest version of the IDE.
Sadly that means a lot of code you find online will not be coded for the version you might have installed by default.
If you are fairly certain that your code is correct then install a few more IDE versions.
Start with the 0.6 and work your way up.
I am almost certain that will just compile your code with no problems and if it has problems then it will be real ones you can rectify.