# Case 02 - A Light-controlled Dog ## Purpose --- Program to make XGO go forward in strong light and get down if the light gets weak. ## Materials Required --- 1 × micro:bit XGO Robot Kit ## Hardware Connections --- Connect the micro:bit with the computer. ![](./images/microbit-xgo-robot-kit-22.png) ## Software Platform --- [Makecode](https://makecode.microbit.org/#) ![](./images/microbit-xgo-robot-kit-10.png) ## Program --- Add the XGO extensions. ![](./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) ## Program --- #### Code ![](./images/microbit-xgot-robot-kit-case01-out-of-the-square-02.png) Link: [A Light-controlled Dog](https://makecode.microbit.org/_YVJe8eefmbqo) You can also download it directly below:
## FAQ --- If XGO doesn't move, please try adjusting the light intensity. ## Exploration --- How to give more commands to XGO with light intensity?