This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
Arduino/sketch_aug10a.ino
2023-06-20 19:35:51 +03:00

26 lines
421 B
C++

#include <Servo.h>
Servo myservo;
void setup()
{
myservo.attach(9);
}
void servoslow( Servo num, int pos, int time, int start) // robotday.ru *** Функция для управления скоростью сервопривода ***
{
num.write(start);
for ( int i=start; i<pos; i++)
{ num.write(i);
delay(time);
}
}
void loop()
{
servoslow(myservo, 180, 10, 0);
}