Robofun 機器人論壇

用戶名  找回密碼
 申請會員
搜索
熱搜: 活動 交友 discuz
查看: 3815|回復: 3
打印 上一主題 下一主題

Arduino的High是定義成幾伏特?

[複製鏈接]
跳轉到指定樓層
1#
發表於 2015-3-5 17:03:42 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
大大好:

請問一下關於Arduino的digital Read(),是要超過幾伏才會被定義成HIGH呢?
2#
 樓主| 發表於 2015-3-5 17:07:50 | 只看該作者
回復 1# henry1620


    已查到相關資訊
HIGH是5V
LOW是0V

提供給有需要的人一起用
3#
發表於 2015-3-6 11:18:27 | 只看該作者
回復 2# henry1620
5V好像不太正確喔,下面是官方文件的說明資料來源 http://arduino.cc/en/Reference/Constants
HIGH

The meaning of HIGH (in reference to a pin) is somewhat different depending on whether a pin is set to an INPUT orOUTPUT. When a pin is configured as an INPUT with pinMode(), and read with digitalRead(), the Arduino (Atmega) will report HIGH if:

  • a voltage greater than 3 volts is present at the pin (5V boards);
  • a voltage greater than 2 volts is present at the pin (3.3V boards);

A pin may also be configured as an INPUT with pinMode(), and subsequently made HIGH with digitalWrite(). This will enable the internal 20K pullup resistors, which will pull up the input pin to a HIGH reading unless it is pulled LOW by external circuitry. This is how INPUT_PULLUP works and is described below in more detail.

When a pin is configured to OUTPUT with pinMode(), and set to HIGH with digitalWrite(), the pin is at:

  • 5 volts (5V boards);
  • 3.3 volts (3.3V boards);

In this state it can source current, e.g. light an LED that is connected through a series resistor to ground.

4#
 樓主| 發表於 2015-3-8 00:35:18 | 只看該作者
謝謝b大的回覆!!!
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

小黑屋|手機版|Archiver|機器人論壇 from 2005.07

GMT+8, 2025-2-21 15:16 , Processed in 0.270022 second(s), 9 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表