Permalink
Browse files

Rename this file because of the stupid Makefile

  • Loading branch information...
1 parent 227f16d commit e8f256233d5956b9a47c1037ff10e07b26a68fd7 @orlandov committed Nov 9, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 motor.pde → hbridge.pde
@@ -5,21 +5,21 @@ byte motor_pin0 = 2;
byte motor_pin1 = 3;
// potentiometer
-byte pot_pin = 4;
+byte pot_pin = 16;
// direction switch
byte switch_pin = 4;
-//declare the state variable
-byte state = 0;
-
void setup() {
// setup the motor control pins as outputs
pinMode(motor_pin0, OUTPUT);
pinMode(motor_pin1, OUTPUT);
pinMode(pwm_pin, OUTPUT);
+
pinMode(switch_pin, INPUT);
pinMode(pot_pin, INPUT);
+
+ // start the motor on full to get it going
analogWrite(pwm_pin, 255);
}

0 comments on commit e8f2562

Please sign in to comment.