> For the complete documentation index, see [llms.txt](https://sharinghub-eng.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub-eng.kittenbot.hk/airelated/koi/koi-kittenblock-and-micropython/koi-programming-with-kittenblock-quickstart.md).

# KOI Programming with KittenBlock QuickStart

KOI can also be programmed using KittenBlock.

### Connecting the KOI

First, we need to establish connection with the KOI in KittenBlock.

Connect your KOI to the computer using a USB cable.

#### Select KOI from the hardware selector.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/connect1.png)

#### Click “Connect” or click the exclamation mark icon.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/connect2.png)

#### Click “Connect”.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/connect3.png)

#### Wait for a few seconds.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/connect4.png)

#### Test the connection by clicking on any block.

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/connect5.png)

### KOI Programming on KittenBlock Guide

### Basic Operations

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks1.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code1.png)

### Image Classifier

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks2.png)

#### Sample Program

**Model Training**

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code2.png)

**Image Classification**

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code3.png)

### Face Detection

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks3.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code4.png)

### Geometric Shapes Detection

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks4.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code5.png)

### Color Tracking

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks5.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code6.png)

### Barcode and QR code Scanner

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks6.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code7.png)

### Voice Recognition

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks7.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code8.png)

### IOT

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks8.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code9.png)

### Face Recognition(Requires Internet Connection)

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/blocks9.png)

#### Sample Program

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code10.png)

![](https://kittenbothk-eng.readthedocs.io/en/latest/_images/code11.png)

### Troubleshooting

#### 1. Clicking on the blocks has no effect after connecting the KOI.

**The firmware may be outdated, use the firmware update function to undate the firmware.**

#### 2. Running the image classifier returns an undefined error.

**The Classifier hasn’t been reset, reset the classifier and try again.**

#### 3. Can I upload the program to run on the KOI?[](https://kittenbothk-eng.readthedocs.io/en/latest/AI%20Cam/kittenblock/kittenblock.html#can-i-upload-the-program-to-run-on-the-koi)

**Yes, the KOI will run the main.py on startu**


---

# 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://sharinghub-eng.kittenbot.hk/airelated/koi/koi-kittenblock-and-micropython/koi-programming-with-kittenblock-quickstart.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.
