# Animation

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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://computational-thinking-in-room11.gitbook.io/room-112-dhs/software-development/led-screen/animation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
