閱讀 Intel® Galileo 主機板上的電壓範例

文件

安裝與設定

000006562

2020 年 02 月 12 日

此範例使用 potentiometer 作為輸入/輸出裝置,並讀取電壓。它也說明在 potentiometer 調整的情況下,如何使用序列監視器來查看價值。我們使用 Arduino * IDE 1.5.3 範例所提供的程式碼。

硬體

  • Intel® Galileo 主機板
  • Breadboard
  • Potentiometer
  • 纜線

有關

  1. 使用兩條電線,進行下列 breadboard 至 Intel Galileo 板連接:
     
    BreadboardIntel® Galileo 主機板
    正停車帶5 V
    負條GND

  2. 使用 potentiometer,請進行以下的 breadboard 至 Intel Galileo 主機板連線:

    BreadboardIntel Galileo 主機板Potentiometer
    負條 Pin 1
     SpPin 2
    正停車帶 Pin 3

  3. 電源供應和 Usb 至Usb 用戶端埠連接至 Intel Galileo 主機板。
  4. 開啟ARDUINO IDE。按一下工具 ≫ 主機板,然後選取Intel Galileo
  5. 按一下「工具」 ≫ 序列埠,然後選取 Intel Galileo 主機板所連接的Com #
  6. 按一下檔案> > 01 的範例。
  7. 按一下「上傳」圖示。

在 Serial Monitor 中監測 potentiometer 的價值。

開路

read voltage example


會議這幅影像是使用Fritzing* 製作。