Last active
December 23, 2017 18:42
-
-
Save erenkeskin/1dee1e0e92f55350349b3208a89a2ac7 to your computer and use it in GitHub Desktop.
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
void setup() { | |
/* Arduino'muzun 3 ve 4. pinlerini Input bacağına takıyoruz */ | |
/* 5. pini ise ENABLE bacağına takıyoruz */ | |
/* Ve onları Output olarak tanımlıyoruz. */ | |
pinMode(3, OUTPUT); | |
pinMode(4, OUTPUT); | |
pinMode(5, OUTPUT); | |
} | |
void loop() { | |
/* LOW ve HIGH değerlerimiz ile motorun yönünü belirliyoruz */ | |
digitalWrite(3, LOW); | |
digitalWrite(4, HIGH); | |
/* Motorumuzun Hız Kontrolünü yapıyoruz. 0-255 Arası değerler ile */ | |
analogWrite(5, 125); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment