Weekly journal 3-State Machines (Patrick Groh)


This week we had to make a multi-tasking state machine, which used different states and millis() for timing instead of delay. I was able to get this to work after an insane amount of trial and error, where I had a lot of trouble with just getting one of the states to function properly. I started with the blinking side because I figured it would be easier to begin with, but after working with it I believe the alternating side would have been an easier side to work on. I ended up using just 2 different state machines, essentially separate from each other in every way. i learned a lot about state machines during this time working with them, although I feel like it took me a lot longer to learn them than I should have.

The gif included shows the bottom 3 lights blinking quickly, which was a mode and me being able to switch the mode of the alternating 2 lights at the same time, thus proving that it is a multi-tasking machine and not one using delay.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s