> For the complete documentation index, see [llms.txt](https://cavedu.gitbook.io/cavedu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cavedu.gitbook.io/cavedu/rk001/module_ui/linkit7697_temperature.md).

# 熱敏（溫度）模組

![](/files/-LoyhbokBTb3giY7XPEG)

## LinkIt 7697 專案說明

使用「LinkIt 7697 NANO Breakout」連接「熱敏（溫度）模組」，每0.5秒讀取熱敏（溫度）模組的溫度訊號比例。

此**熱敏（溫度）模組**包含於「[**洞洞么教學材料包**](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
* 熱敏（溫度）模組

**熱敏（溫度）模組**是**數位/類比訊號**輸出， 可以接「D0 \~ D13、A0\~A3」的 LinkIt 7697 NANO Breakout訊號端上。 本範例連接到「**D5**」、「**A0**」。

![](/files/-LoyhbooGlu-Grz1rfTQ)

### BlocklyDuino 積木畫布

每0.5秒鐘讀取熱敏（溫度）模組溫度的類比及數位資訊一次 。

![](/files/-LoyhborOY5WArq_p_hw)

![](/files/-LoyhbouHQLTHj03qlJP)

### Arduino 程式

```c
void setup()
{

  pinMode(5, INPUT);
  Serial.begin(9600);

}


void loop()
{
  Serial.println(digitalRead(5));
  Serial.println(analogRead(14));
  delay(500);
}
```

## micro:bit 專案說明

使用「micro:bit搭配科易KEYES micro:bit 感測器擴充板 V2」連接「熱敏（溫度）模組」，讀取熱敏（溫度）模組的數值變化 。

此**熱敏（溫度）模組**包含於「[**洞洞么教學材料包**](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/)
* 熱敏（溫度）模組

**熱敏（溫度）模組**是**數位/類比訊號**輸出，可以接「3\~7、9\~11/0、1、2、3、4、10」的 micro:bit訊號端上，數位訊號輸出建議使用的是5跟11腳位，因為3、4、6、7、9、10腳位有使用到LED控制腳位所以當顯示LED時會不穩定。類比訊號輸出建議使用的是0、1、2腳位因為3、4、10腳位有使用到LED控制腳位所以當顯示LED時會不穩定。本範例連接到「P5、P0」。

![](/files/-M-iiEy913qZFmLXKDl_)

### Microsoft MakeCode積木畫布

每1秒鐘會讀取熱敏（溫度）模組溫度的類比及數位資訊一次 ，並可透過micro:bit顯示指示燈看到熱敏（溫度）模組溫度的電位數值。

![](/files/-M-iiUiOn5-2wY_tPdQH)

### JavaScript 程式

```javascript
basic.forever(function () {
    basic.showNumber(pins.digitalReadPin(DigitalPin.P5))
    basic.pause(1000)
    basic.showNumber(pins.analogReadPin(AnalogPin.P0))
})
```

## Raspberry Pi Pico 專案說明

使用「Raspberry Pi Pico」連接「熱敏（溫度）模組」, 每0.5秒讀取熱敏（溫度）模組的溫度訊號比例。此 **熱敏（溫度）模組**包含於「[洞洞么教學材料包](https://robotkingdom.com.tw/product/rk-education-kit-001/)」內。

### 熱敏（溫度）模組電路圖

* [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/)
* 熱敏（溫度）模組

> 熱敏（溫度）模組是數位/類比訊號輸出， 可以接「D0 \~ D28、A0 \~ A2」的Raspberry Pi Pico擴充板訊號端上。 本範例連接到「D7」、「A0」。

<figure><img src="/files/YKY5Kn6Oqo6oEX7taTZE" alt=""><figcaption></figcaption></figure>

### Arduino IDE程式

> 每0.5秒鐘讀取熱敏（溫度）模組溫度的類比及數位資訊一次 。

Arduino程式(temperature.ino)如下:

```arduino
void setup()
{
  pinMode(9, INPUT);
  Serial.begin(9600);
}

void loop()
{
  Serial.println(digitalRead(9));
  Serial.println(analogRead(A0));
  delay(500);
}
```

### 程式執行結果

<figure><img src="/files/pbU0S2XUmfPuOuEEnYCl" alt=""><figcaption></figcaption></figure>
