Example code to toggle the RGB LED of the application shield with a State Machine