/**************************************************************************** Module Angels_HopperMotors.c Description A module to interface with the DC Motors which control the hopper mechanism for the ME218B project. ****************************************************************************/ /*------------------------------------ Function: initHopperMotors Takes no parameters, returns no value -------------------------------------*/ Function initHopperMotors Initicialize AD Ports to input and outputs making 4-7 as outputs Set pins 4-7 to control the DC motors End function /*------------------------------------ Function: HipHopping Controls the downward motion of the hopper Takes char direction, returns no value -------------------------------------*/ Function HipHopping If the input is the up direction Set 4 and 5 to low and 6 and 7 to high If the input is the down direction Set 4 and 5 to high and 6 and 7 to low If direction is stop All AD pins low End Function