First commit. Tried to get the PWM to work for all motors moving foward and backward. Used set/rest and output mode zero for foward, and used toggle and output mode zero for backward. Using pins 1.1 and 1.2 for left motor and pins 2.0 and 2.1 for right motor.
Added stop functions for both motors.
Motor works and wheels move forwardgit add main.c motor.c motor.h! Called move forward function for both wheels in main.c. Added ifndef, define, and endif in motor.h. Changed modes used for PWM in motor.c to include only 4 (toggle), 5(Reset), and 7(Reset/set). Toggle is used for reverse, reset is used for ground, and reset/set is used for forward.
Re-added stop functions. Commented out code that is redundant in reverse and stop functions. Forward must occur first, so should initalize everything in that.
Wheels now move forward, stop, then move in reverse! I had problems getting this accomplished for awhile, and the one thing that got me involved forgetting to clear the OUTMOD bits before writing a new mode and setting new bits. This was causing problems because I the previous modes were interfering with the modes that I was currently trying to write, so the motor would only spin in one direction (wheels would only go forward). C2C Colin Busho helped me realize that I needed to clear the OUTMOD bits before setting a new mode and setting a new OUTMOD for the PWM. This edit allowed the wheels (motor) to stop and move in reverse.
Merge branch 'master' of https://github.com/czig/Lab6