Task #5 – Grandma’s Chair
Mission:
Grandma is too old to get up and down the stairs on her own. Your task is to design an elevator that Grandma can sit on to ride up and down the stairs. Grandma needs to have a switch that is mounted on her chair to start the ride up or down when she is settled in and ready.
Motor and Sensor Setup
Digital 4 bottomLimitSwitch
Digital 5 bumpSwitch
Digital 6 topLimitSwitch
Motor Port 1 leftMotor
Programming
1. You will make this program a continuous loop.
2. You will program 2 if statements. Both will use the bottomLimitSwitch. One if statement will be ==1 and the other will be ==0.
3. You will use the bumpSwitch to start the leftMotor to move the chair up or down depending on your bottomLimitSwitch (See below).
4. When the bottomLimitSwitch is being touched by the chair, it will move up until the topLimitSwitch is touched.
5. When the bottomLimitSwitch is not being touched by the chair, it will move down until the bottomLimitSwitch is touched.
6. The speed of the chair going up will be 35. When the chair is going down the speed will be -25.