Arduino HIGH LOW

后端 未结 4 1098
被撕碎了的回忆
被撕碎了的回忆 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:27

    To add my two cents to codeling's answer:

    Lines 18--25 of Arduino.h (1.0) are:

    #define HIGH 0x1
    #define LOW  0x0
    
    #define INPUT 0x0
    #define OUTPUT 0x1
    
    #define true 0x1
    #define false 0x0
    

    Therefore, HIGH <==> OUTPUT <==> true <==> 0x1 and LOW <==> INPUT <==> false <==> 0x0. Then, HIGH <==> !LOW and LOW <==> !HIGH...

提交回复
热议问题