閱讀 Intel® Galileo 主機板上的電壓範例
此範例使用 potentiometer 作為輸入/輸出裝置,並讀取電壓。它也說明在 potentiometer 調整的情況下,如何使用序列監視器來查看價值。我們使用 Arduino * IDE 1.5.3 範例所提供的程式碼。
硬體
- Intel® Galileo 主機板
- Breadboard
- Potentiometer
- 纜線
有關
- 使用兩條電線,進行下列 breadboard 至 Intel Galileo 板連接:
Breadboard Intel® Galileo 主機板 正停車帶 5 V 負條 GND - 使用 potentiometer,請進行以下的 breadboard 至 Intel Galileo 主機板連線:
Breadboard Intel Galileo 主機板 Potentiometer 負條 Pin 1 Sp Pin 2 正停車帶 Pin 3 - 將電源供應和 Usb 至Usb 用戶端埠連接至 Intel Galileo 主機板。
- 開啟ARDUINO IDE。按一下工具 ≫ 主機板,然後選取Intel Galileo。
- 按一下「工具」 ≫ 序列埠,然後選取 Intel Galileo 主機板所連接的Com # 。
- 按一下檔案> > 01 的範例。
- 按一下「上傳」圖示。
在 Serial Monitor 中監測 potentiometer 的價值。
開路
會議 | 這幅影像是使用Fritzing* 製作。 |