

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 教學課程：使用 AWS IoT 和 Raspberry Pi 監控土壤濕度
<a name="iot-moisture-tutorial"></a>

本教學課程說明如何使用 [Raspberry Pi](https://www.raspberrypi.org/)、濕度感應器，以及 AWS IoT 監控房屋植物或花園的土壤濕度等級。Raspberry Pi 會執行程式碼，從感應器讀取濕度等級和溫度，然後將資料傳送至其中 AWS IoT。您可以在 中建立規則 AWS IoT ，當濕度等級低於閾值時，將電子郵件傳送至訂閱 Amazon SNS 主題的地址。

**注意**  
本教學課程可能不是最新版本。自本主題最初發佈後，某些參考文件可能已被取代。

**Contents**
+ [先決條件](#iot-moisture-prereqs)
+ [設定 AWS IoT](iot-moisture-setup.md)
  + [步驟 1：建立 AWS IoT 政策](iot-moisture-policy.md)
  + [步驟 2：建立 AWS IoT 物件、憑證和私有金鑰](iot-moisture-create-thing.md)
  + [步驟 3：建立 Amazon SNS 主題與訂閱。](iot-moisture-create-sns-topic.md)
  + [步驟 4：建立 AWS IoT 規則來傳送電子郵件](iot-moisture-create-rule.md)
+ [設定您的 Raspberry Pi 和濕度感應器](iot-moisture-raspi-setup.md)

## 先決條件
<a name="iot-moisture-prereqs"></a>

為完成此教學課程您需要：
+  AWS 帳戶。
+ 擁有管理員許可的 IAM 使用者。
+ 執行 Windows、macOS、Linux 或 Unix 的開發電腦，用來存取 [AWS IoT 主控台](https://console.aws.amazon.com/iot/home)。
+ 執行最新 [Raspberry Pi 作業系統的 Raspberry Pi 3B 或 4B](https://www.raspberrypi.com/products/)。 [https://www.raspberrypi.com/software/operating-systems/](https://www.raspberrypi.com/software/operating-systems/)如需安裝說明，請參閱 Raspberry Pi 網站上的[安裝作業系統](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system)。
+ 用於 Raspberry Pi 的顯示器、鍵盤、滑鼠和 Wi-Fi 網路或乙太網路連線。
+ 與 Raspberry Pi 相容的濕度感應器。本教學課程中使用的感應器是 [Adafure STEMMA I2C 電容式濕度感應器](https://www.adafruit.com/product/4026)搭配 [JST 4 針腳轉母頭插槽纜線接頭](https://www.adafruit.com/product/3950)。