Arduino HIGH LOW

后端 未结 4 1105
被撕碎了的回忆
被撕碎了的回忆 2021-02-06 23:38

I have an Arduino and I am wondering exactly what HIGH and LOW mean as far as actual values go... Are they signed ints? Unsigned ints? Unsigned chars??? What are their values? I

4条回答
  •  情深已故
    2021-02-07 00:14

    The first argument to digitalWrite() is a pin number.

    The second argument to digitalWrite() will either:

    1. write a HIGH (3.3 or 5 V) or LOW (0 V) to a BINARY OUTPUT or
    2. enable (HIGH) or disable (LOW) the internal pullup on a BINARY INPUT.

    Bitwise operations for either argument make no sense. Perhaps you need to use analogWite()?

    See the documentation: digitalWrite() Constants

提交回复
热议问题