Advertisement
RuiViana

MotorON_OFF.ino

Sep 24th, 2020
1,219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. if (request.indexOf("meuservoOFF") != -1)
  2. {
  3.   // Se conter led1 ele vai entrar nesse comando
  4.  
  5.   for (pos = 180; pos >= 0; pos -= 1)
  6.   { // movimento de 0 a 180º
  7.     // crescente
  8.     meuservo.write(pos); // escreve posicao em meuservo
  9.     delay(35); // aguarda 35ms
  10.   }
  11.   if (pos >= 180)
  12.     client.print("meuservoOFF");
  13.  
  14.   if (pos <= 0)
  15.     client.print("meuservoOFF");
  16. }
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement