# LED模組

![](https://1275793585-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LaZQFBYOS3O0ksiEmR1%2F-LoyhZ7TGT0i8ZxuGcbY%2F-LoyhbeAHM754ssXQ9BI%2Flinkit7697_led_00.png?generation=1568715211843222\&alt=media)

## LinkIt 7697 專案說明

使用「LinkIt 7697 NANO Breakout」連接「LED模組」， 每兩秒鐘LED模組閃爍一次。\
此**LED模組**包含於「[**洞洞么教學材料包**](https://www.robotkingdom.com.tw/product/rk-education-kit-001/) 」內。

### LinkIt 7697 電路圖

* [LinkIt 7697](https://www.robotkingdom.com.tw/product/linkit-7697/)
* LinkIt 7697 NANO Breakout
* LED模組

**LED模組**是**數位/類比訊號**輸出， 可以接「D0 \~ D13」的 LinkIt 7697 NANO Breakout訊號端上。 本範例連接到「**D8**」。

![](https://1275793585-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LaZQFBYOS3O0ksiEmR1%2F-LoyhZ7TGT0i8ZxuGcbY%2F-LoyhbeH4SEglDA8t8Hu%2Flinkit7697_led_01.png?generation=1568715213724713\&alt=media)

### BlocklyDuino 積木畫布

將8號腳位的電位拉低、拉高，每兩秒鐘會切換LED的亮暗一次。

![](https://1275793585-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LaZQFBYOS3O0ksiEmR1%2F-LoyhZ7TGT0i8ZxuGcbY%2F-LoyhbeLxQoAeYCNJXQi%2Flinkit7697_led_02.png?generation=1568715217610205\&alt=media)

### Arduino 程式

```javascript
void setup()
{
  pinMode(8, OUTPUT);
}


void loop()
{
  digitalWrite(8, HIGH);
  delay(2000);
  digitalWrite(8, LOW);
  delay(2000);
}
```

## micro:bit 專案說明

使用「micro:bit搭配科易KEYES micro:bit 感測器擴充板 V2」連接「LED模組」，每一秒控制LED亮和暗。

此**LED模組**包含於「[**洞洞么教學材料包**](https://www.robotkingdom.com.tw/product/rk-education-kit-001/)」內。

### micro:bit 電路圖

* [BBC micro:bit 微控制板  ](https://www.robotkingdom.com.tw/product/bbc-microbit-1/)
* [科易KEYES micro:bit 感測器擴充板 V2  ](https://www.robotkingdom.com.tw/product/keyes-microbit-sensor-breakout-v2/)
* LED模組

**LED模組**是**數位/類比訊號**輸出， 可以接「P0 \~ P10」的 micro:bit訊號端上。 本範例連接到「**P0**」

![](https://1275793585-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LaZQFBYOS3O0ksiEmR1%2F-M-D5HdpaypW3U3KMjgk%2F-M-D6bJDTytql2YToPU4%2F01.JPG?alt=media\&token=7bdf3d43-7925-49a4-91f7-7f07e1b78514)

### Microsoft MakeCode 積木畫布

每一秒鐘會切換LED的亮暗一次。

![](https://1275793585-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LaZQFBYOS3O0ksiEmR1%2F-M-EDZ9FzsEN9YfHJlyL%2F-M-EDij3fr19K5VTraNy%2F02.JPG?alt=media\&token=e853b079-1eed-458f-bf40-624b49122d13)

### &#x20;JavaScript 程式

```javascript
basic.forever(function () {
    pins.digitalWritePin(DigitalPin.P0, 1)
    basic.pause(1000)
    pins.digitalWritePin(DigitalPin.P0, 0)
    basic.pause(1000)
})
```

## Raspberry Pi Pico 專案說明

使用「Raspberry Pi Pico」連接「LED模組」, 每兩秒鐘LED模組閃爍一次。此**LED模組**包含於「[洞洞么教學材料包](https://robotkingdom.com.tw/product/rk-education-kit-001/)」內。

### **LED模組電路圖**

* [Raspberry Pi Pico](https://robotkingdom.com.tw/product/raspberry-pi-pico/)[  ](https://www.robotkingdom.com.tw/product/bbc-microbit-1/)
* [Raspberry Pi Pico擴充板](https://robotkingdom.com.tw/product/pipico-education-kit-001/)[  ](https://www.robotkingdom.com.tw/product/keyes-microbit-sensor-breakout-v2/)
* LED模組

> LED模組是數位/類比訊號輸出，  可以接「D0 \~ D28」的Raspberry Pi Pico擴充板訊號端上。  本範例連接到「D7」

&#x20;

<figure><img src="https://1275793585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaZQFBYOS3O0ksiEmR1%2Fuploads%2FwVTYSGx12ztx5levUzHn%2Fimage.png?alt=media&#x26;token=bb78df18-e305-44f6-bb4a-3f7cfbb2d29e" alt=""><figcaption></figcaption></figure>

<br>

### Arduino 程式

> 每兩秒鐘會切換LED的亮暗一次。

```arduino
void setup()
{
  pinMode(7, OUTPUT);
}

void loop()
{
  digitalWrite(7, HIGH);
  delay(2000);
  digitalWrite(7, LOW);
  delay(2000);
}
```


---

# 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://cavedu.gitbook.io/cavedu/rk001/module_ui/linkit7697_led.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.
