h bridge dc motor control
const int EN = A0; //enable const int MC1= 7; //motor control 1 const int MC2 = 8; //motor control 2 const int POT = 1; // pot reader const int PWM = 5; //pwm on pin 5 int val=0; //for storing the reading from the pot int velocity = 0; // for storing the deired velocity (from 0-255) void setup () { pinMode(EN, OUTPUT); pinMode(MC1, OUTPUT); pinMode(MC2, OUTPUT); pinMode(PWM, OUTPUT); brake(); //initialize w/ motor stopped } void loop () { val = analogRead(POT); // go forward if (val > 562) { velocity = map (val,563,1023,0,255); forward(velocity); } // go backward else if (VAL < 462) { velocity = map(val,461,0,0255); ...