Created
December 1, 2018 07:05
-
-
Save Mehanik/6c1193b9e6907c3279b38d9871dc232e 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
int MOTOR1_P = 4; | |
int MOTOR1_N = 5; | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
// initialize digital pin LED_BUILTIN as an output. | |
pinMode(MOTOR1_P, OUTPUT); | |
pinMode(MOTOR1_N, OUTPUT); | |
} | |
// the loop function runs over and over again forever | |
void loop() { | |
digitalWrite(MOTOR1_P, HIGH); | |
digitalWrite(MOTOR1_N, LOW); | |
delay(1000); | |
digitalWrite(MOTOR1_P, HIGH); | |
digitalWrite(MOTOR1_N, HIGH); | |
delay(1000); | |
digitalWrite(MOTOR1_P, LOW); | |
digitalWrite(MOTOR1_N, HIGH); | |
delay(1000); | |
digitalWrite(MOTOR1_P, LOW); | |
digitalWrite(MOTOR1_N, LOW); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment