📜  延迟millis arduino - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:55.019000             🧑  作者: Mango

代码示例1
int delay_ = 500;//my delay will be for 500 miliseconds
int time_;//the name of the variable is time_ because there is a function already called time

void setup(){
time_ = millis();
}

void loop(){
if (millis() - time_ > delay_){
//your code here
time_ = millis();