Skip to content

Instantly share code, notes, and snippets.

@e-Gizmo
Created February 18, 2017 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-Gizmo/5af88fc5dec08b4fcb7f6699f4fda685 to your computer and use it in GitHub Desktop.
Save e-Gizmo/5af88fc5dec08b4fcb7f6699f4fda685 to your computer and use it in GitHub Desktop.
/*
e-Gizmo Beefy Motor Driver Sample code
This sketch can simply run your motor in one
direction.
Wiring Connections:
gizDuinoPLUS MCU ===> BeefyMotorDriver
GND ===> GND
RESET ===> RESET
+5V ===> SR
D3 ===> PH
+5V ===> PWL
PWM PIN/D4 ===> PWH
by
e-Gizmo Mechatronix Central
Feb 13, 2017
http://www.e-gizmo.com
*/
int PH_PIN = 3; // Direction pin
int PWH_PIN = 4; // Speed control/PWM pin
void setup(){
pinMode(PH_PIN, OUTPUT);
pinMode(PWH_PIN, OUTPUT);
}
void loop(){
digitalWrite(PH_PIN, HIGH);
analogWrite(PWH_PIN, 180);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment