在 Arduino 中,HIGH、LOW、INPUT 和 OUTPUT 的原始值是多少
In Arduino, what are the raw values for the HIGH, LOW, INPUT, and OUTPUT
HIGH、LOW、INPUT 和 OUTPUT 的实际值是多少?
这些用于 pinMode() 和 digitalWrite() 等函数。
谢谢
这些可能对你有用:
https://www.arduino.cc/en/Reference/Constants
Arduino HIGH LOW
#define HIGH 0x1
#define LOW 0x0
#define INPUT 0x0
#define OUTPUT 0x1
#define true 0x1
#define false 0x0
所以基本上它们是布尔值,因为 C/C++ 将 true 表示为 0x1
,将 false 表示为 0x0
HIGH、LOW、INPUT 和 OUTPUT 的实际值是多少? 这些用于 pinMode() 和 digitalWrite() 等函数。
谢谢
这些可能对你有用:
https://www.arduino.cc/en/Reference/Constants
Arduino HIGH LOW
#define HIGH 0x1
#define LOW 0x0
#define INPUT 0x0
#define OUTPUT 0x1
#define true 0x1
#define false 0x0
所以基本上它们是布尔值,因为 C/C++ 将 true 表示为 0x1
,将 false 表示为 0x0