The automation system have a powerful tool for customize your project.

This is the edit code tool, see image below,using this tool you can customize the code, add your library and personal code for yours need.

 

 

 

The methods and main functions of home automation system with arduino are.

UserSetup void () {}

It runs once, is used to initiate systems is equivalent to Setup method when programming arduino. Using this method facilitates easy system upgrade.

UserLoop void () {}

This method runs continuously, can use it for tasks that require ongoing updated, it’s equals arduino Loop function. only this has already been used by the system.

 

LoopNew100MillisSg void () {}

This method runs every 100mSg.

 

LoopNewSecond void () {}

Every second runs, we can use for timing tasks, a good option is timed by conditioned, such as a lighting by volumetric and timing with this methods .

 

Loop30Sg void () {}

This method runs every 30 sec, say an example, the system will add a moisture sensor that has a slow response time, do you really need to know its value continuously? No, humidity changes are slow and will not suffer many changes in that space of time.

 

NewMinute void () {}

It runs every minute, this is synchronized with the system clock, the implementation of this method implies that we are in a new minute. REQUIRED REAL TIME CLOCK  FOR USE THIS METHOD!!!

 

void SwicthStateChange (NumberInput int, int value) {}

Indicates a change in an input configured as swicht, or switch, it has two parameters.

NumberInput tells us the number of input that event occurred,  if NumberInput = 10, the activated input is number 10, keep in mind that we start counting at 0.

 

Value indicates the value of the input may be HIGH or LOW, so you know if the input is activated or deactivated.

 

 

ShortInput void (int NumberInput) {}

Indicates that there has been a short press on a button input, the button was pressed and released quickly, the

NumberInput parameter indicates the number of the input.

 

LongInput void (int NumberInput) {}

Indicates that there has been a long press on a button input, the button was pressed and held down for more than half second.

NumberInput parameter indicates the number of the input.

 

LongInputEnd void (int NumberInput) {}

Indicates the end of a button  long press.

NumberInput parameter indicates the number of the input.

 

OutControl void () {}

This method is used to activate the outputs relays, it is not required but highly recommended used it for output control, keep an organized structure will help a lot when programming.

 

String  RunCommand (byte CommandNumber) {}

This method runs the android command tool, can be used to manage infrared devices or other functions.

CommandNumber parameter reports the number of command executed in the android application.

If you use the android remote control app, arduino also execute this method and give you faster access to certain functions.

 

char * FreeText(byte Number) {}

In this function we configure the status screen in android app.
You can show text in this screen… in multiples lines.

Number parameter reports the number of line executed in the android application.