# Sugar Cam Tutorial: KittenBlock

### Programming In KittenBlock

Load the extension for Sugar Cam.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FjbdGTjbzh4kTNGHMqtwm%2Fcam_ai1.png?alt=media&#x26;token=7ae77aa8-a130-4704-90af-9c584eeebfa2" alt=""><figcaption></figcaption></figure>

Both the computer and Sugar Cam need to connect to the same WiFi network.

Add the following blocks and fill in the IP address, click the block to show the video feed.

<div><figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FGAXWxLqpMgyyzwOZlpGk%2Fcam_kb4.png?alt=media&#x26;token=2020ba0d-cbf3-44ed-a743-6d494a192ed1" alt=""><figcaption></figcaption></figure> <figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FEr5dnvG5rPrKVJONVrgV%2Fcam_ai2.png?alt=media&#x26;token=7aca320b-7e13-4407-9e6c-23e18c994a66" alt=""><figcaption></figcaption></figure></div>

Basic functions such as QR Code scanner, mp3 playback are included.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2Fc1QnOeKoHR8Y6PTaFL5d%2Fcam_kb11.png?alt=media&#x26;token=08fd95dd-1481-43d0-9978-8139119fa5f2" alt=""><figcaption></figcaption></figure>

### Voice Transmission

Sugar Cam can send or receive short voice clips.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FuSMSx8iFNnwOkPpPeeql%2Fimage.png?alt=media&#x26;token=ff47f565-df7b-4c2f-93c3-e1c21b66e992" alt=""><figcaption></figcaption></figure>

Sending a short voice clip from KittenBlock to Sugar Cam.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FQeu8rjXWdov1Egmgn7I3%2Fimage.png?alt=media&#x26;token=f69f79cf-114b-4555-a8bb-56f1edbbaba8" alt=""><figcaption></figcaption></figure>

Receiving a short voice clip from Sugar Cam to KittenBlock.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FTG0mnOpJrlDzac1xmvlk%2Fimage.png?alt=media&#x26;token=a0163dec-ebbf-4428-aeec-5c4bbc394fe8" alt=""><figcaption></figcaption></figure>

### Serial Communication

Sugar Cam can also send serial data to maincontrollers.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FLDHIh3V310QTdoRVX6pt%2Fimage.png?alt=media&#x26;token=ed4b68ec-e45d-4714-a0bc-15621711537e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6uJvpXC43onNIIwhMlWo%2Fuploads%2FOUE5e75jg7i4dhGJGL2o%2Fimage.png?alt=media&#x26;token=b9d7b39b-583c-4d28-a834-a49d61b53e82" alt=""><figcaption></figcaption></figure>

[Sample Program](https://makecode.microbit.org/_iga5PiPba04p)


---

# 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://sharinghub-eng.kittenbot.hk/functional_module/sugar/cam/commandprocessing/kittenblock.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.
