> 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/educational-kit-sets/futureboard-iot-education-kit/futureboard-iot-education-kit-instructions/rc-kart.md).

# RC Kart

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

Control the kart using a Joystick sensor or via an IoT platform.

### Building Instructions

[Building Instructions(Right Click->Save As)](https://github.com/kittenbothk/kittenbothk/raw/master/Kits/future_inventor/instructions/pdf/rc_kart.pdf)

### Sample Wiring Diagram

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

### Sample Program

#### KittenBlock Sample Program

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

[Download Sample Program(Right Click->Save As)](https://github.com/kittenbothk/kittenbothk/raw/master/Kits/future_inventor/instructions/sb3/rc%20kart.sb3)

#### Python參考程式

```
#/bin/python

from time import sleep
from future import *
from sugar import *
import robotbit

x = 0
y = 0


def indicator():
  global x,y

  if Joystick().value('x') > 50:
    neopix.setColor(2, (255, 255, 0))
    neopix.update()
    sleep(0.1)
    neopix.setColorAll((0,0,0))
  if Joystick().value('x') < -50:
    neopix.setColor(0, (255, 255, 0))
    neopix.update()
    sleep(0.1)
    neopix.setColorAll((0,0,0))



def valmap(x, in_min, in_max, out_min, out_max):
    return int((x-in_min) * (out_max-out_min) / (in_max-in_min) + out_min)


robot = robotbit.RobotBit()

robot.geekServo2kg(1, 90)

neopix=NeoPixel("P7",3)

while True:
  robot.geekServo2kg(1, valmap(Joystick().value('x'), 100, -100, 110, 80))
  robot.motor(1,valmap(Joystick().value('y'), -255, 255, 60, -60))
  indicator()
```

[Download Sample Program(Right Click->Save As)](https://github.com/kittenbothk/kittenbothk/raw/master/Kits/future_inventor/instructions/py/kart.py)

### Program Instructions

Push the joystick to control the rc kart. The indicators will light up when steering.


---

# 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/educational-kit-sets/futureboard-iot-education-kit/futureboard-iot-education-kit-instructions/rc-kart.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.
