StudentSA
Member
Hey Guys/Gals.
More of a discussion type question, Id like to know in sudo code terms what the best/most accepted way of writing micro controllers coding loops.
A micro will typically have inputs both digital and analog, with outputs to control displays, motors and relays.
How do we handle the main high level code loop? Is it as simple as read all inputs, process, apply all outputs. Or is it read one input, process that data and change the corresponding output; repeat?
I tend to easily get my code very messy and confusing.
Thoughts?
Thanks,
StudentSA
More of a discussion type question, Id like to know in sudo code terms what the best/most accepted way of writing micro controllers coding loops.
A micro will typically have inputs both digital and analog, with outputs to control displays, motors and relays.
How do we handle the main high level code loop? Is it as simple as read all inputs, process, apply all outputs. Or is it read one input, process that data and change the corresponding output; repeat?
I tend to easily get my code very messy and confusing.
Thoughts?
Thanks,
StudentSA