Created
October 28, 2019 11:10
-
-
Save RobolinkAkademi/bca36a2f571a921d7042a776ca4aef7c to your computer and use it in GitHub Desktop.
Arduino projeleri
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo sg90; | |
int pos = 0; | |
void setup() | |
{ | |
sg90.attach(13); | |
} | |
void loop() | |
{ | |
for (pos = 0; pos <= 180; pos += 1) | |
{ | |
sg90.write(pos); | |
delay(15); | |
} | |
for (pos = 180; pos >= 0; pos -= 1) | |
{ | |
sg90.write(pos); | |
delay(15); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment