Introduction
Generally, while using Arduino one face problem of uploading different codes again and again as he changes some part of codes. Using evive’s user defined function submenu, the user can store different Arduino programs at once. He can switch to a different program while navigating inside the menu. Here is how to do it:
Creating a new User Defined Function
Note: The library name is changed from userDefinedFunctions.cpp to AddUserDefinedFunctions.cpp.
- In Arduino IDE, the user will add his custom codes in space provided in file named AddUserDefinedFunctions.cpp in similar fashion to “void setup_user_defined_function(){….}” and “void loop_user_defined_function(){….}”.
- The user has to uncomment the desired user defined functions and give the desired name in AddUserDefinedFunctions.h.
- Upload the program to evive using Arduino IDE via USB cable.
So the code will be available under the user defined menu list item. When the user will select that particular user defined function in the sub-menu of user defined function, the code will start running in a loop.
Note: All the libraries must be initialized in AdduserDefinedFunctions.cpp. In another way, the user just has to copy and paste the previous program in AddUserDefinedFunctions.cpp.