# MakeCode

1.好搭Bit通过USB线连接到电脑，按下power键开机，电脑检测到名为MICROBIT的U盘。

![](/files/-LqnUrq8ZySOpJLrDhyW)

2.打开MakeCode离线版程序，点击新建项目。

![](/files/-LqnWlkAN_Uq2ZNdvGJT)

3.按如下顺序添加扩展包。

![](/files/-LqnWwnVHrpLvLyXEvv_)

4.在空白栏输入扩展包地址（<https://github.com/Haohaodada-official/pxt-HaodaBit.git>），点击搜素，点击搜索到的HaodaBit扩展包添加至项目。

![](/files/-LqnU9vV42qq4XVdIt8T)

![](/files/-LqnUFzO-snaXacTp0r9)

![](/files/-LqnUMyhuJvbnDIEuRMJ)

5.编写程序，点击下载键将程序下载到设备。

![](/files/-LqnV6CEVKT90j90wOVa)

示例程序1：

![](/files/-LqnW_Pe7Vusm-VBz9AU)

点击下载后，好搭Bit状态指示灯闪烁，待指示灯熄灭后程序下载完成，好搭Bit点阵屏显示笑脸。

示例程序2：

![](/files/-LqnVJZQ-1KQVWhUvCrR)

将超声波模块与好搭Bit的P0口连接，点击下载后，好搭Bit状态指示灯闪烁，待指示灯熄灭后程序下载完成，点阵屏滚动显示超声波所测值。


---

# 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://docs.haohaodada.cn/jiao-xue-chan-pin/hao-da-bit/makecode.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.
