State machines(Dexter Serrao)

This past week we learned just how useful state machines can be. We are now able to do things that we couldn’t do with delay due to the nature of the delay function. Using state machines allows us to have our Arduino focus on multiple tasks as well as multiple different timers which can allow for much more complex projects. We had a few different exercises  to work on to help with our understanding of state machines.

I found the state machines fairly easy to understand and didn’t face many difficulties when attempting to create the following sketch.


While I know how to use the state machines fairly well I feel like my code can still be improved, I still find myself using large groups of nested if statements and switch statements which make the code look fairly clustered and challenging to read. I hope to be able to keep practicing my coding techniques to shorten down the amount of code needed to produce the same effects.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s