Are you growing tired of scrolling through your too large .ino file?
Are you experiencing more bugs than you'd like to?
Do you have difficulty coding rather complex processes?
Than I have something for you. I can let your computer take over some of your tasks so you don't even get to create sooo many bugs
I also have a neat easy-for-the-eye state machine structure for you which is designed specifically to code the most complex processes with ease. The best part is that the skeleton of this state-machine is generated for you.
You can go from this:
To this:
In a newly assembled folder:
In a few seconds by running this simple script:
And from this point on you only have to fill in the state functions and perhaps a round robin tasks or two.
IO is maintained in one single file and is outfitted with MCP23017 integration. All initialization is done for you. You cannot ever forget to type the pinMode instruction in the setup anymore. There will also be updates for atleast PCA9685 pwm drivers, a debounce module and software serial integration and perhaps 75hc595 shift registers as well!
Timers are maintained in one separate file as well. All timers are just 8 bit, they count down to zero and they have a configurable interval base. Give a state a timeout? wait a certain time between states? All can be done.
Structure to handle your round robin tasks?
extern void processRoundRobinTasks(void) {
static unsigned char taskCounter = 0;
// HIGH PRIORITY ROUND ROBIN TASKS
readSerialBus();
// LOW PRIORITY ROUND ROBIN TASKS
taskCounter ++;
switch(taskCounter) {
default: taskCounter = 0;
case 0:
/* fill in a task */
break;
case 1:
/* fill in a task */
break;
}
}
Is in Place! Just fill in your round robin tasks.
I also offer you a new system to handle your own custom libraries. The assemble scripts asks you which of your 'modules' is to be copied to your new folder. If you like, you may even alter the scripts yourself to setup an automated initialization of your modules. Let the computer #include your code for you and let the computer place xxx.begin(); for you. It can be done!
If you'd like to know more, please read this readme file. There are also more markdown files for you with more detailed explanations.
Enjoy,
Bas