For our second challenge in the robotics course, we were tasked to build a test bed that uses all of the Vex sensors, thus creating a program that enables all sensors to be used. Click here to follow the steps that I took to build my test bed.
Here is how my final robot looks like:
After we built the Vex testbed, we experimented with 6 programs which are listed below:
Task
|
Goal
|
Program
|
1
|
Turn on the right motor and run it for 5 seconds at half speed (63) then turn it off.
| |
2
|
Turn on the right motor and run it forward for 5 seconds at ½ speed (63) then turn it off. Turn on the left motor and run it in reverse at ¾ speed (94.5) for 2.5 seconds then turn it off. Turn on both motors and run at full power (126), in the same direction, for 7.25 seconds then turn them off.
| |
3
|
Add an UntilTouch for the bump switch to turn on the right motor forward at ½ speed and the LED on Then add an UntilTouch for the limit switch to turn off the motor and LED
| |
4
|
Turn on the green LED until the potentiometer value is greater than 2048. Then the green LED should turn off, and the left Motor should turn on until the potentiometer is less than 2048.
| |
5
|
Open and close the claw by covering and uncovering the line follower.
| |
6
|
Add a continuous while loop (1==1) to UntilTouch for the bump switch to turn on the right motor forward at ½ speed and the LED on Then an UntilTouch for the limit switch to turn off the motor and LED
|
Thus, after much experimentation with the following 6 programs, I incorporated the following program on my VEX robot that enables to do the following task.
The first step in activating my robot is by clicking the bump switch, which then triggers the right motor(wheel) and makes it spin, then by clicking the limit switch, it stops the wheel from spinning. The next step is to lift the gear placed on the potentiometer and spin it clockwise, which then causes the wheel to spin again, but at a much greater speed and in the reverse direction. The third step is to rotate the gear that was lifted on the potentiometer anticlockwise, this then stops the wheel from rotating, but it triggers the claw motor, hence opening the claw. The final step is to put your finger on the line detector, once this is done, the claw closes. Thus, the 4 sensors (the bump switch,limit switch,potentiometer and the line detector) were used in this program. Moreover, with this program, the testbed can be used as a water bottle holder as seen in the following, and can be further programed and built to water the plants if wheels are attached and by programming the claw to lower the water bottle at a designated time.
Below is a video on how my robot works: