The mechanics in this project is a servo, which makes the sun rotates. The sun is made with LED lights, which is connected to the Arduino board.
There is also a button on the side of the box, which control the sun to move.
To make all the above possible, I used programming in Arduino. In my Arduino I used State Machine to control the movement. The State Machine is set up in 3 cases and visualized in the picture below.
The full programming process is also attach this state of the project.