Advertisement
RuiViana

new_Delay

Jul 12th, 2021
998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  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);  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement