Skip to content

Instantly share code, notes, and snippets.

@Mehanik
Created December 1, 2018 07:05
Show Gist options
  • Save Mehanik/6c1193b9e6907c3279b38d9871dc232e to your computer and use it in GitHub Desktop.
Save Mehanik/6c1193b9e6907c3279b38d9871dc232e to your computer and use it in GitHub Desktop.
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