一般在程序开头,用于初始化操作,上电或复位后只执行一次
语法
void setup()
参数
无
返回值
示例
int buttonPin = 37; void setup() { pinMode(buttonPin, INPUT); } void loop() { }