> For the complete documentation index, see [llms.txt](https://gilmour.online/compsci/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gilmour.online/compsci/archives/vanek-archives/robotics-8/traffic-light-project.md).

# Traffic Light Project

{% embed url="<https://youtu.be/KQqJwTlI-Ow>" %}

**The first part of the assignment needs**

* Correctly wired traffic lights as outlined in the video
* variables for each light
* Setup pin modes for each light
* Create a pattern as outlined in the video
* Once it runs correctly, create a student defined function called normalTraffic to run the pattern.

{% embed url="<https://youtu.be/sE3cCTOcMbY>" %}

**The second part of the assignment needs**

* A second student defined function with flashing red lights
* A third student defined function with one flashing red and one flashing yellow light
* A fourth student defined function with the opposite flashing red and yellow lights

{% embed url="<https://youtu.be/m390C0iiK1E>" %}

**For the third part of the project, add a button that controls the 4 modes.**

{% embed url="<https://youtu.be/KEh0OMoG_Mw>" %}

**For the fourth part of the assignment, change the button to an interrupt and add text as described in the video.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gilmour.online/compsci/archives/vanek-archives/robotics-8/traffic-light-project.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
