---
# System prepended metadata

title: 用ArduinoIDE控制Microbit

---


# 用ArduinoIDE控制Microbit
# 安裝
:::info
/檔案/偏好設定
:::
![](https://i.imgur.com/MNcLaEW.png)
:::info
將https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json複製上去
:::
![](https://i.imgur.com/Vn7tLL5.png)
:::info
/工具/開發版/開發版管理員
:::
![](https://i.imgur.com/TsKQiSs.png)
:::info
搜尋"Nordic Semiconductor nRF5 Boards"，選擇版本，安裝。
:::
![](https://i.imgur.com/zKANy9S.png)
:::info
安裝完成!
:::
# 測試
:::info
將 microbit 連接到電腦
將測試程式複製到 ArduinoIDE
:::
```cpp=
const int COL1 = 3; // Column #1 control
const int LED = 26; // 'row 1' led
 
void setup() {
Serial.begin(9600);

Serial.println("microbit is ready!");
 
// because the LEDs are multiplexed, we must ground the opposite side of the LED
pinMode(COL1, OUTPUT);
digitalWrite(COL1, LOW);

pinMode(LED, OUTPUT);
}
 
void loop(){
Serial.println("blink!");

digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
```
:::info
/工具/開發版
:::
![](https://i.imgur.com/63jLPUb.png)
:::info
/工具/序列埠
:::
![](https://i.imgur.com/3nGidRY.png)
:::info
上傳程式
:::
![](https://i.imgur.com/SgekckW.png)
:::info
執行結果
:::
![](https://i.imgur.com/9PiyDGM.png)














