Using either your mood construction or your light following construction, reprogram it so that it does something interesting and engaging in three different states. Said differently, create three separate functions that define different sorts of behavior for your creation. Each function represents a state. Your creation should then start off running one of the states, but be able to transition into the other states and back again based on inputs from sensors.

Your program should use interrupts for moving between the different states. Interrupts (as we've seen them so far) only work with digital input, so make sure you're using a digital sensor. Note that even the light sensor and sound sensor can be made to work in a digital manner, so you can go with those as well if you want.

For this first part of the assignment, you only need to have the three different states working; you do not need to have transitions between the states working correctly yet. You should be able to demonstrate your program running completely in each of the three states; you can do this just by commenting out lines in your code that call one state or another.