# Ex Dep Programming Planning
## Actuation
### Motors / Sensors:
- Linear Actuator (2)
- Limit Switch (2 per side)
### Logic
- Actuating for digging
- Run Linear Actuator forward
- Stop when limit switch near the excavation system is pressed
- Run process on both sides of robot, wait until both sides are finished to continue to next step
- Actuating for driving
- Run Linear Actuator backward
- Stop when limit switch near the chassis is pressed
- Run process on both sides of robot, wait until both sides are finished to continue to next step
## Excavation
### Motors / Sensors
- Motor for digging gravel (1) (w/ current feedback)
- Motor for moving excavation up and down (1)
- Limit Switch (2)
### Logic
- Digging Gravel
- Move motor to move excavation downwards
- Stop motor when limit switch at bottom of subsystem is pressed
- Start digging motor to run at certain torque
- Use PID loop and current feedback to change output of motor
- **TODO:** Check logic to see if more complex current logic is needed
- Stop digging motor after weight sensor is detected to exceed threshold
- Move motor to move excavation upwards
- Stop motor when limit swithc at top of subsystem is pressed
## Deposition
### Motors / Sensors
- Motor for dumping gravel (1)
- Weight Sensor (1)
- Limit Switch (2)
### Logic
- Dumping Gravel
- Run motor forward
- Stop when limit switch near end of deposition is pressed
- Wait for a bit of time
- Run motor backward
- Stop when limit switch near the start of deposition is pressed