# 案例01-走出正方形 ## 目的 --- 让 XGO 实现经过的路线为正方形; ## 使用材料 --- 1 × micro:bit XGO Robot Kit 套件 ## 硬件连接 --- 使用数据线将电脑与micro:bit 相连; ![](./images/microbit-xgo-robot-kit-22.png) ## 软件平台 --- [Makecode](https://makecode.microbit.org/#) ![](./images/microbit-xgo-robot-kit-10.png) ## 编程 --- 将 XGO 的扩展库添加到 makecode 中; ![](./images/microbit-xgo-robot-kit-11.png) ![](./images/microbit-xgo-robot-kit-12.png) ![](./images/microbit-xgo-robot-kit-13.png) ![](./images/microbit-xgo-robot-kit-14.png) ## 程序 --- ### 示例程序 ![](./images/microbit-xgot-robot-kit-case01-out-of-the-square-01.png) 请参考程序链接:[Out of the Square](https://makecode.microbit.org/_3WaJt82pkbqd) 同时,可以直接下载下方程序;
## 相关问题 --- 如果 XGO 没有完全走出正方形轨迹,可适当调整时间和速度; ## 思考 --- 能否让 XGO 走出圆形轨迹?