> For the complete documentation index, see [llms.txt](https://helpdocs.conducttr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocs.conducttr.com/feature-documentation/api/code-samples/tufty-2350-quiz-and-dice-demo.md).

# Tufty 2350 Quiz & Dice Demo

<figure><img src="/files/nTJO3cuoxChkldj3iEmz" alt=""><figcaption></figcaption></figure>

This sample MicroPython app demonstrates how a lightweight device can integrate directly with the Conducttr API to create an interactive, live-linked experience.

**Uses**

TEAMS\_URL = "<https://api.conducttr.com/v1.1/eagle/**teams>\*\*"\
SMARTWORDS\_URL = "<https://api.conducttr.com/v1.1/eagle/**smartwords>\*\*"\
MESSAGES\_URL = "<https://api.conducttr.com/v1.1/eagle/messages/**position>\*\*"\
POL\_URL = "<https://api.conducttr.com/v1.1/eagle/**pol>\*\*"

{% file src="/files/HQshMAJskLaSntKw4R5f" %}

**What the app does**

The application runs on a Tufty 2350 device and performs the following:

1. Connects to WiFi and authenticates with the Conducttr API.
2. Retrieves team information and SmartWords content from the platform.
3. Parses SmartWords into:
   * Quiz questions and answers
   * Correct answer markers
   * Persona-driven screen messages
   * Dice result image URLs
4. Runs a timed multiple-choice quiz locally on the device.
5. Publishes dynamic content back into Conducttr using:
   * `/messages/position` for persona-led screen updates
   * `/pol` to start Pattern of Life stacks
6. Transitions into a dice-roll phase where:
   * Roll time is earned based on quiz performance
   * Dice results are animated locally
   * Jackpot logic can trigger a second PoL stack

{% file src="/files/ygfhakztA73Gx5KivLBE" %}


---

# 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 dynamically by asking a question.

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

```
GET https://helpdocs.conducttr.com/feature-documentation/api/code-samples/tufty-2350-quiz-and-dice-demo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
