- 描述:
用于配置引脚为输入或者输出模式,是一个无返回值的函数 - 语法
pin(pin,mode);
pin:要设置模式的引脚
mode:
INPUT
OUTPUT
INPUT_PULLUP输入上拉模式
- 注意:
一般放在setup函数里,先设置再使用,如果放在setup()之外,会出现错误
expected constructor, destructor, or type conversion before '(' token
pin(pin,mode);
pin:要设置模式的引脚
mode:
INPUT
OUTPUT
INPUT_PULLUP输入上拉模式
expected constructor, destructor, or type conversion before '(' token