RuiViana

new_Delay

Jul 12th, 2021
712
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void hold(const unsigned int &ms)
  2. {
  3.   //unsigned long m = micros();
  4.   //while (micros() - m < ms)
  5.   unsigned long m = millis();
  6.   while (millis() - m < ms)
  7.   {
  8.     yield();
  9.   }
  10. }
  11.  
  12. // chame a função hold com o valor do seu delay EX;  hold(1000);  
RAW Paste Data