Ultizin

Code GD Project

Aug 8th, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <Servo.h>
  2.  
  3. Servo VAR_servoMotor;
  4.  
  5. int VAR_servoPino = 7;
  6.  
  7. void setup() {
  8. VAR_servoMotor.attach(VAR_servoPino);
  9.  
  10. }
  11.  
  12. void loop() {
  13.  
  14. /* Clicar e voltar
  15. VAR_servoMotor.write(0);
  16. delay(100);
  17. VAR_servoMotor.write(90);
  18. delay(100);
  19. */
  20.  
  21. /* Segurar
  22. VAR_servoMotor.write(0);
  23. delay(1000); // Aumente esse tempo para mais tempo de segurar
  24. VAR_servoMotor.write(90);
  25. delay(100);
  26. */
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment