設定によって有効になる(と思われる)内部プルアップ、プルダウン抵抗について。
pinMode ( sensor1, INPUT_PULLUP );
は動くが
pinMode ( sensor1, INPUT_PULLDOWN );
はうまく動かないようだ。
If I set them to INPUT, then the pin behaves like a floating input. Otherwise, INPUT_PULLDOWN and INPUT_PULLUP seem to behave exactly the same.
...
Links2004 commented on 28Jun
espressif write:
There are no pull-down functions on GPIO pad now, so we should never use these registers.
http://bbs.espressif.com/viewtopic.php?f=5&t=481
上記2つ目のリンクの元から抜粋
Note:
There are no pull-down functions on GPIO pad now, so we should never use these registers.
Add external resistance to pulldown the pin.
「プルダウンの場合は、外部抵抗を入れること」とのこと。