> For the complete documentation index, see [llms.txt](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/software-development/led-screen/animation.md).

# Animation

Sinking Boat

When we are developing  a program we need to start thinking about individual algorithms - or a series of steps that work together to accomplish one task. To do that we are going to program the LED's to show a sinking boat. &#x20;

{% embed url="<https://www.youtube.com/watch?v=p3q9MM__h-M>" %}

Think about each page of the book. Each page was its own unique still drawing, but when they were combined they told a story.&#x20;

Each stage of our sinking boat is like a page of the book - it will need its own code an

d we will combine them to make an animated sinking boat

To do that we need to create a function

Under Advanced - Click on Functions and then Make a New function

![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpUPSf3tCxHePJxNjfg%2F-M1WCJtKDrDbSUN6yE2G%2F-M1WI672BdvTkNws7sCD%2Fimage.png?alt=media\&token=118483c5-ed46-44b4-a347-316dee6a67b1)

Title your new function `Boat1` and hit done

![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpUPSf3tCxHePJxNjfg%2F-M1WCJtKDrDbSUN6yE2G%2F-M1WIEPS7tyJTieIu8H4%2Fimage.png?alt=media\&token=c9a37e9d-c477-4211-a5a1-8ac04f647740)

Now on your scripts page, you should see a place to add code to this function

![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpUPSf3tCxHePJxNjfg%2F-M1WCJtKDrDbSUN6yE2G%2F-M1WIOe5w1HBy-f-E2m6%2Fimage.png?alt=media\&token=22948be7-665e-4f6d-9eb2-6f9f8eeddb83)
