Arduino HIGH LOW

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

    Have a look at hardware/arduino/cores/arduino/Arduino.h (at least in Arduino 1.0.1 software), lines 18 and 19:

     #define HIGH 0x1
     #define LOW  0x0
    

    Meaning, these defines being hexadecimal integer values, you can do whatever bitwise operations you want with them - how much sense that will make, however, is not really clear to me at the moment. Also bear in mind that these values might be subject to change at a later time - which would make bitwise operations on them even more unwise.

提交回复
热议问题