Final Report
Final Report
Engineering 1282.01H
Spring 2019
Team Tetris 8
John Saunders
Pranav Pitchala
Doug Van Arsdale
K. Harper 10:20AM
FEH Planet, a popular national arcade chain, is planning on opening new locations and
wants to gain a competitive edge with the new openings. To improve employee morale, FEH
Planet has contacted the Ohio State Research and Development (OSURED) to find an unmanned
autonomous vehicle that can automate the tasks needed to open the arcade each day. OSURED
will choose a robot from many prototypes and the selected robot will be used as the FEH Planet
clean-up assistant in the new locations and will be implemented by existing FEH Planet locations
if successful.
A team of three engineers came together and designed potential prototypes that could
complete the tasks. After some research, the team settled on a design that was very simple and
clean. The drivetrain would consist of two dobro wheels in the rear and two skids in each front
corner. The robot would have two arms: a small arm that could slide the foosball counter, and a
long arm that could place the token in the coin slot and flick the lever down. The robot would
also have a CdS cell in order to detect a start light and figure out which light is on at the DDR
station. Having only two arms and a sleek chassis gives the robot light weight and speed.
The final design was able to complete all the designated tasks, but they were not
consistent. The robot could drop the token in the slot, complete the DDR task, and hit the lever
with high accuracy levels, but completing the foosball task was still inconsistent. During the
competition, the robot had a perfect run, but the inconsistencies hurt the team in the later rounds.
Improvements to the software and hardware are both necessary, but the robot has a lot of
potential to do exactly what FEH Planet is expecting. Having more fail-safes in the code and
adding more friction to the wheels are two major changes that could help the robot in production.
ii
Table of Contents
1. Introduction ................................................................................................................................1
3.4 Explorations..................................................................................................................................... 12
iii
4. Individual Competition ..........................................................................................................17
8. References ................................................................................................................................34
iv
List of Figures
v
List of Tables
vi
1. Introduction
Robots can be used to complete everyday tasks and reduce costs or extra resources.
Robots are used in countless industries to increase production and efficiency since it can help
reduce the amount of work employees may need to do. Robots can do simple tasks so that
employees can spend their time with other tasks. A popular national arcade chain, FEH Planet, is
opening new stores and wants to improve the morale of its employees as well as improve the
experience of its guests. To do this, FEH Planet is employing a series of unmanned robots to
perform the tasks to open the arcade each day. The Ohio State Research and Development
(OSURED) team is in charge of choosing the best prototype from competing companies. The
prototype must be able to complete specific tasks on a course with precision in a timely manner.
The tasks include starting after a light signal, placing a coin back in the coin slot, sliding a
foosball counter to the correct position, resetting the Dance-Dance Robot machine by pressing
the corresponding button, returning a claw lever to the down position, and hitting the final
button. A team, consisting of Doug Van Arsdale, Pranav Pitchala and John Saunders, has from
Jan 30, 2019 until April 6, 2019 to build a prototype that can compete with other companies to
The next section describes the beginning concepts and ideas from the early team
meetings. Section three describes the tests completed that were used to further analyze the robot
and make modifications. The following section discusses how the robot did in the individual
competition. The next two sections talk about the final design of the prototype and how well it
did during the final competition. Section eight wraps up the report with a conclusion and
summary of the results and the last two sections are for references and appendices.
1
2. Preliminary Concepts
presented by the official scenario document, concept ideas derived from decision matrices,
potential course route discussions, and the carboard mock-up design paired with the initial code
flowchart. First, every team member came up with their own ideas. The team then got together
and talked about their individual ideas. From combining and talking about the individual ideas,
the team was able to come up with potential ideas that were combinations of the individual ideas.
The robot course had four designated tasks for completion: the token, Dance-Dance
Robot (DDR), foosball, and the lever. For each performance test and run, the robot began at the
starting light. The order for completing all of the tasks was not pre-determined and was left for
each robot team to decide upon. The token task could have been completed in two different
ways, either with the token being inserted into a top slot for secondary points or into the bottom
compartment for primary test points. DDR required that the robot read a colored light value from
the course surface before pressing the correct button of corresponding color. Secondary points
were awarded if the button was held down for five seconds. For foosball, the robot had to slide a
foosball counter across horizontally from right to left, earning both primary and secondary points
if the counter slid all the way across and remained in that final position. The lever task required
that the robot flip the lever of the claw machine down, leaving the lever in this position in order
to earn all primary points. Every complete run concluded with the press of a final button, located
at the original start point. All runs were to be completed within a 2-minute time frame.
2
The robot had to fit within a 9” x 9” square and be no taller than 12” at the start point but
was allowed to alter its size once the run has begun. The robot had to also fully display a QR
code within that same starting box. The QR code had to be mounted 9” above the course’s
surface during all practice runs, performance tests, and competitions. The robot had to operate
and navigate the course solely through the Proteus controller and the mechanisms connected to
it. The Proteus could not be used as a sensor, structure, or mechanical element of the robot.
Teams had a $160 budget to spend on the robot parts and would be penalized if they went past it.
All materials used to construct the robot had to be purchased online through the company store,
with exception to some starting materials and the Proteus controller. Any parts or materials from
an outside source had to be approved by a GTA or instructor before acquisition. Pertaining to the
Omnidirectional wheel parts, robots were not permitted to have four omnidirectional wheels [1].
The first concept robot design featured a rectangular chassis housing a four-wheel
drivetrain underneath. The drivetrain was powered by motors with the potential to connect the
back two wheels on each side with the front two by sprocket and chain. The robot had four
mechanisms specific to each task located on the four different sides. The first side had an
extendable arm to push both the DDR buttons and the final button. The extendable arms would
be moved using a motor. The other side featured a flicker to lower the lever quickly. An arm for
lowering the token into the top slot was on the front of the robot so that the task could be
completed first. Finally, the back had a metal sheet intended to fit into the foosball counter
grooves so that the robot could simply drive to move it. The sketch of this concept design is
3
This concept robot had advantages because of its stability and center of gravity. The costs
for all of the mechanisms would have been fairly low due to the simplicity in design and
requirements. However, it had major drawbacks in maneuverability. Each task would have
required the robot to make precise turns and correct orientations with little room for error.
Turning would be too difficult due to the intended drivetrain, and therefore this design was not
The second concept robot design also featured a rectangular chassis housing a four-wheel
drivetrain. The drivetrain was to be powered by motors with a sprocket and chain mechanism.
This second design featured two extendable arms to push both the DDR buttons and the final
button. These arms would be on the front of the robot rather than the side and would be moved
using a motor. Rather than using a flicker, this robot had a metal sheet that would be lowered to
push the lever down. The arm for lowering the token into the top slot would be on the front of
4
the robot and be extendable. Finally, the flicker featured on the first design for the lever was
instead used for foosball, flicking the counter across. It would be housed on the same side as the
metal sheet for the lever. The sketch of this concept design is shown on the next page in Figure
2.
This robot also featured the solid stabilization and center of gravity like the first concept
design. However, its mechanisms for completing the tasks were more compact to allow for less
turning and maneuvering requirements. This robot would cost more, something concerning if the
budget became tight. The cons of this design were mostly highlighted by the complex
mechanisms. It would be too difficult to have both the DDR arms and the token arm be
extendable. Since both tasks can be done without going past the robot dimensions, it was noted
that the DDR arms and the token arm did not need to be extended.
Robot design concept number three was very different from the two previous ones. This
third design was comprised of an octagonal chassis. Four wheels were oriented diagonally
beneath the base. The robot featured a similar DDR arm as the last two designs where two arms
underneath point out. However, the arms on this design do not extend outwards. The original
5
design of the flicker for the lever returned, as well as the sheet that fit in the foosball grooves.
The token mechanism on this concept robot was a motorized drop. The token would sit high
enough so that it could be dropped into the top slot by opening the cradle beneath it. The third
The third concept design featured great improvements in maneuverability and turning. It
encapsulated some of the better ideas from previous designs. Taking away some of the
complexities from mechanisms like the DDR arms helped the budget by removing the need for
excess motors. However, this robot’s biggest con was the drivetrain. It was too complicated in
design to have the wheels go diagonally. Each wheel would have required its own motor for
coding specifications, a financial cost the team was not willing to take. In addition, this design
would not be permitted to construct because it requires four omnidirectional wheels, but only
Two potential course routes were discussed after the concept robots were created. The
two routes are very similar in fashion but feature key differences involving the token task
6
completion. Route A focuses on the token task first, having the robot align with the slot from the
front. This was intended to be done using line following to promote easy alignment and decrease
the chance of missing. From there, the robot would turn around to complete DDR. It would then
go up the acrylic ramp to foosball and complete the task while driving to the lever mechanism.
Once the lever was flipped, the robot would head down the second ramp, traversing the speed
bump, and press the final button. The second ramp was more conveniently located than the
Route B instead had the robot start with DDR. From there the robot would continue the
same route as before. It would go up the acrylic ramp and complete both the foosball and lever
tasks. However, it then would travel from the lever to the token slot from behind. This route does
not allow for line following to be used and therefore can be harder to align. This route does,
however, allow for the token to be dropped into the slot from a much smaller height. The token
arm could then be much smaller and compact, saving both cost and resources. Both routes can be
A. B.
7
2.6. Mock-Up
After the concept design and potential course route discussions, the construction of a
mock-up robot was done. All three concept designs were put into decision matrices in order to
decide which mechanisms were best suited to be prototyped and tested. The decision matrices
can be found in Appendix A. The mock-up was built to feature the main rectangular chassis
discussed in the first two concept designs. The drivetrain constructed featured the four wheels,
one motor powering each side connected by a chain and sprocket. The underside of the chassis
also had the two DDR arms, intended to be extendable using two servo motors. The mock-up
design also allowed for the removal of these extendable arms in favor of immovable ones still
capable of pushing the buttons. On the top of the chassis was room for the Proteus controller and
one servo motor powered arm, located facing the side of the robot. This arm was to be used for
the token, foosball, and lever mechanisms. Its height allowed it to lower the token into the slot
perfectly and reach the lever and foosball counter with ease. The mock-up can be seen below in
Figure 5.
8
2.7. Code Representation
A flowchart was created for the code after performance test 1 to demonstrate the
navigation of the course through functions. A flowchart of the time forward section is located on
the next page in Figure 6, while the flowchart for the main method from Performance Test 1 can
Appendix B: Coding Representations is the algorithm used to create and construct the final code
After consultations and team meetings, the initial robot design exposed a few flaws. Due
to the shape of the chassis, space underneath the robot was limited. The servo motors intended to
go underneath and control the extendable arms would have to fit in tight dimensions. The wheels
had limited space to rotate and continued to constrain space for the CdS cell and servo motors.
Most importantly, the chain and sprocket drivetrain mechanism intended to move the wheels
9
would be both hard to assemble and to maintain. The token arm mechanism, however, had no
issues, so it was kept the same in the final creation of the robot.
The chassis was changed to have the walls removed, opening space underneath and
reducing the overall weight of the robot. The idea of servo motors and extendable arms was
thrown out. Instead, the robot would use the front piece of the chassis to push the buttons on the
DDR machine. Regarding the drivetrain, the team decided to use the two motors driving one
wheel each. Two rolling ball mounts would be on the front to act as skids and maintain the
robot’s balance. Analysis was then done to determine the motors necessary for the drivetrain.
After the preliminary changes were implemented, analysis was done to determine the
total projected driving distance, the total time for task completion, and the total time for driving.
Unlike the driving distances, the time measurements were estimates. The approximate linear
speed required by our robot was determined by dividing the driving distance by the approximate
time of course completion. This calculation helped determine our desired wheel radius of 1.0
inch. Through assistance from SolidWorks, approximate mass values for each major component
and mechanism of the robot were found. Coupled with angle measurements of each ramp, the
force required by each motor was calculated using Equation 1 shown below.
Once the force was calculated, it was converted to torque and then divided by the number
of motors intended for use, two in our case. The calculated torque-per-motor value was then
10
plotted onto a graph featuring the available motors’ stall torque and no-load speeds, which can be
Based on the course scenario and ramp steepness, our team valued high torque over
motor speed. This would create more room for adjustment when it came to robot material and
mechanism weight. Since the motors would be operating at power levels much lower than their
maximum capacities, the speed capability differences between the Igwan and Acroname motors
was disregarded. From both the features desired and the calculations done, the Igwan motors
were selected over the Acroname motors for the drivetrain. The biggest advantage of choosing
the Igwan motors was their inclusion of built in shaft encoding mechanisms.
Because of the Igwan motor selection, the main form of movement for the robot is shaft
encoding. This is where the robot moves until the right and left motors have moved an average of
a certain number of counts. In the code, the function requires a distance input. The program then
calculates the number of counts from the distance inputted. Igwan motors have 318 transitions
per rotation and the Dubro wheels of the robot have a radius of 1.25 inches. The calculation done
𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 ∗ 318
𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = (2)
2 ∗ 𝜋𝜋 ∗ 1.25
Robot testing was heavily centered on four specific performance tests while also
consisting of small tests for bugs and mechanism failures. The four main performance tests each
pertained to the unique obstacles of the year’s arcade course. The first performance test’s
objective required the robot to flip the lever of the claw machine fully into the down position and
11
emphasized the bonus objective of reaching the lower level. The following performance focused
on having the robot complete the DDR station by identifying the light colors and pressing
corresponding buttons down. The bonus task assigned required the robot to touch the foosball
counter on the upper level. Performance test three made the robot place the token into either the
top slot or bottom compartment, awarding bonus points for flipping the lever down as done in
the first performance test. The fourth and final performance test required the robot to slide the
foosball counter all the way over to the left and to push the final button. The bonus objective was
to complete the DDR task as done in performance test two. Testing logs from each of the four
main performance tests can be found in Tables C1, C2, C3, and C4 in Appendix C: Testing &
Budget Logs.
3.4. Explorations
The team went through three different explorations to learn about different forms of
navigation and robot features. All of the explorations used a robot called a Crayola bot which
The first exploration was about the usage of CdS cells and bump switches. The team
experimented with testing CdS values of different colors with no filter, a blue filter, and a red
filter. This information gained from this section helped decide that the robot would use a red
filter to easily differentiate a red and blue light. The second part of the exploration experimented
with the use of bump switches. The Crayola bot had four bump switches and it needed to be
programmed to navigate a small course using by turning whenever a bump switch hit a wall.
Bump switches were not used on the robot since it was not a part of the original strategy to bump
12
In the second exploration, the team learned about line following and shaft encoding. Line
following was used with optosensors. The team needed to use the optosensors to check if the
sensor was on top of the line and adjust the path of the robot depending on which sensors were
on top of the line. Optosensors and line following were not used on the robot because the team
didn’t think there were very many places to use line following. The yellow strip in front of the
coin machine was one spot on the course line following could be used but driving straight was
never an issue with shaft encoding and RPS checks so the team didn’t think it was necessary to
spend time and money on optosensors. The second half of exploration two was about shaft
encoding, which ended up being the main form of navigation. The Crayola bot used 2.5-inch
Dubro wheels and Igwan motors which used magnets to keep track of the number of counts. The
exploration helped explain the formula to calculate distance traveled from counts and explained
how to code shaft encoding. The robot used shaft encoding as the main form of navigation
because it was accurate, and it could turn and stop whenever regardless of walls or RPS zone.
Similar to the Crayola bot, the robot also used 2.5-inch Dubro wheels and Igwan motors, so the
code from the exploration became very helpful for the navigation of the robot.
The third and final exploration investigated RPS and data logging. RPS helped give the
robot information on its position and heading angle. The team experimented with RPS checks
and navigating with RPS. The robot used RPS checks to fix positioning since shaft encoding can
be a little off due to momentum and slippage. RPS heading checks were used a lot to make sure
the robot was facing in a specific direction. This helped make sure the robot wouldn’t get stuck
in tight places and made sure the robot made very precise turns and movements. The second part
of the exploration revealed how data logging can be useful. During the exploration, the team
manually navigated the robot around the course and recorded the values to the proteus SD card.
13
These values were plugged into a MatLab code and printed on top of a image of a course. The
team didn’t use data logging during the development of the robot due since all of the runs were
tracked using a testing log and all tests were visually seen.
For the first performance test, the robot met all of the specifications required of the first
test, both fitting inside the size limit and beginning with the starting light. Ultimately, it was able
to climb up the acrylic ramp and successfully flip the lever completely into the down position.
Not nearly enough test runs in the days prior than there should have been. Instead, many of
practice runs were conducted on the day of the performance test. The team was behind schedule
and was only able to complete the tasks as a result of deadlines being pushed back.
Regarding software, the drive functions in the code were not very precise and were all
time and sleep functions. All of the times needed for the robot to reach point A and point B were
estimates. After conducting the official test runs, the team decided to hard code the robot’s
driving and turning through the Igwans’ built-in encoders. Precise movement would then be
Besides the performance test requirements, the robot was not able to go back down the
ramp for the stretch bonus. The drivetrain on the front end prevented this from occurring. The
two mounted balls, intended to roll over the surfaces of both ramps, instead got stuck on the
ramps’ edges. There were also concerns about the smaller arm’s ability to hit the lever each and
every time. With a little modification and addition to the size of the part, its efficiency increased
to hit every time. Overall execution for completing the first performance test was poor, as no
time was taken to really operate the robot precisely. The robot instead relied on its front corner of
14
the chassis to hit the claw machine at just the right spot to angle it and hit the lever. This testing
information was analyzed and then directly applied towards performance test two.
Like the first test, the robot completed all the tasks assigned to it, moving to the DDR
station, reading the correct colored light value, and pressing down the corresponding button for
five seconds. There were no uncertainties due to ample planning and testing well before the
performance test date. As a result, the robot was able to obtain bonus points for doing the test
before the official deadline and for completing the secondary objective of holding down the
button for five seconds. Specific to the hardware, the robot’s design was kept simplistic. Other
than the CdS cell attachment, the robot contained no new features that would cause an issue
during performance. The original idea of having extendable arms to push the DDR buttons was
scrapped. The robot instead used the flat edge on the front of the chassis, decreasing the margin
for error. This method also led to the team’s consideration to do DDR first during our official full
run because of continued success. A major software improvement was the use of shaft encoding
for driving to different points on the course. As anticipated, it proved to be far more effective and
precise than time-functioned driving. The stretch bonus for touching the foosball counter was
inconsistent, however. This issue was left to be addressed during the later performance tests.
For the third performance test, the robot was able to drive up to the token machine and
insert the token into the top slot with the chassis still on the lower level. However, the robot was
not able to complete the bonus task for going to the top level and pushing the lever down. The
15
servo motor intended for the token arm/mechanism could not handle the torque caused by the
weight of the arm. As a result, the motor and arm jittered very frequently, sometimes causing the
token to fall out before the robot reached the right position. This was concerning for the
performance test, but more concerning regarding the final competition. The team elected to
change the course route in order to place the token in first and decrease the risk of it falling out
during other tasks. This counteracted the previous intentions to perform the DDR task first after
much success in the previous performance test. After the third test, the weight of the arm was
decreased enough to decrease the frequency of the jittering. Besides the servo motor, no other
hardware issues seemed to be present. Discussions were held about whether to shorten the mount
for our CdS cell so that it would not hit either ramp on the way up or down. The team concluded
that more tests had to be done to determine the validity of that decision. Regarding software,
continued success was found with the shaft encoding methods. While shaft encoding was still the
primary method of navigation, the use of RPS for repositioning was discussed. The foosball task
was the hardest for the robot to complete. Therefore, correct alignment of the robot was
For the last performance test, the robot was able to slide the foosball counter all the way
over and have it stay put, however it could not get back to the lower level to push the final
button. This was an issue that had been discussed during the earlier performance tests and had
now become a major problem. The big software issue for this test was our inclusion of RPS into
our navigation for more precise movement and position analysis. Although it was very necessary
for navigation, the team spent many hours trying to correctly use RPS and align to the correct
16
heading angle and position coordinates. The issues from exploration three became prevalent
again. The robot many times spun in circles continuously instead of stopping at the correct
angles. Functions had to be tweaked multiple times, but eventually the program was making the
robot perform correctly. Once software was handled, the other main issues with the robot’s
hardware were the servo motor used to move the smaller arm, the right wheel, and the CdS cell
mount. The smaller arm’s servo motor broke during testing. It was opened to reveal two stripped
gears and a bent axle. Those parts were replaced, but the potentiometer was broken. The motor
turned with too much input lag for use. A replacement motor was purchased while the broken
one was kept for emergency situations. The right wheel was crooked, an issue hard to fix since
the wheels were epoxied to the Igwan motor axles. Finally, the CdS cell mount still gave the
robot issues when trying to go back down the acrylic ramp. It would have to be sanded or filed
4. Individual Competition
The competition was held in Hitchcock room 208 on March 29th at 10:20am. There were
three runs. The first one was on a random course and had a random DDR light. For the second
run, the instructor picked which course all the robots went on and decided which DDR light
would be used. The final run gave the team the choice to pick which course and which DDR
light they wanted to use. A pre-start action must be completed to signal that the robot is ready
and waiting for the light and the team can use the kill switch at any kill to stop the robot and the
timer. The runs were scored out of 75 primary points and 100 secondary points. The scoring and
point values assigned to each task are shown on the next page in Table 1.
17
Table 1: Official Competition scoring chart.
4.2. Strategy
The strategy for the first two runs was for the robot to place the coin into the token slot, if
the coin fell out too early then it would end up in the front bowl. The robot used RPS to align its
positioning and heading angle to increase the accuracy of the token drop. After the coin task, the
robot would continue to the DDR station where the robot would read the closest light and then
either hit the respective button for five seconds. The robot uses RPS again to make sure it
accurately reads the color of the light. After hitting the button, the robot would go up the pinball
ramp and would use RPS again once it got off the ramp to fix it’s heading. The robot would then
align itself with the foosball slider, drop the arm, and attempt to slide the counter. The robot
would push the counter about halfway, then lift up the arm, go back, and re-push the slider in
order to ensure that the robot would get the foosball counter to go all the way through. Once this
18
task was completed, the robot continued forward to the lever where the long arm took two
swings at the lever to knock it down. The robot would then guide itself back down the acrylic
ramp with the wheels going down the ramp first. The robot would then drive to the final button
and hit it. This strategy was used for the first two runs, but for the final run, the robot would
drive to the lever and flip it down, and then drive backwards and then attempt to complete the
foosball task.
The first test (random course and random light) took place on course A and used a blue
light. The robot attempted to drop the token in the token slot but missed. The token still fell in
the coin. Next, the robot was able to accurately read the blue light and hold the blue light button
for 5 seconds. The small arm missed the foosball counter both times and did not move it at all.
The long arm missed the lever also. The robot attempted to navigate back to the final button but
got stuck along a wall and the kill switch was used to shut down the robot and course.
The second run (instructor choice of course and light) took place on course H and used a
blue light. The token missed the top token spot and fell to the bottom bowl, which hit the rim but
fell outside the bowl. Once again, the robot was able to precisely read and hold the blue light
button. Once the robot got to the foosball slider, the arm made contact with the slider but instead
of moving the slider, the robot turned into it. The kill switch was used because the robot at that
The third run (team choice of course and light) took place on course D and once again
had a blue light. This time, the robot was able to drop the token into the top slot and once again
accurately read and pushed the proper DDR button. On this run, the robot went up the ramp and
19
proceeded to attempt the lever flip before trying to slide the foosball counter. This was changed
so that the robot would be given a chance to hit the lever in case foosball messed up the path of
the robot like the second run did. The robot was able to flip the lever down, but the long arm fell
off the robot. The robot then proceeded to backup to align itself with the foosball slider. The arm
barely missed the foosball slider. The robot once again got stuck along a wall while trying to
navigate to the final button. The scores from each of the three individual competition runs are
These three runs helped reveal what was consistent and where there were problems. The
DDR task was the most consistent and worked all three times and had no problems. The only
concern was that all three tests used the blue light so the robot’s performance with the red light
could not be tracked. Despite not using the red light, the robot is not expected to have many
problems with the red button. The token drop worked two out of three times. The coin is
consistently coming out of the robot arm, but where its lands is varied. It fell into the bowl once,
into the slot once, and missed both once. Moving forward, RPS can be used to make sure the
robot is at the exact coordinate and heading so that the token is bound to go into the slot.
While DDR and the token drop have high success rates, the lever, foosball, and final
button tasks don’t experience that same level of success. The lever was only flipped on the final
run and that was because the movement of the foosball counter didn’t move the robot off path
since the lever task was attempted before the foosball task. To increase the success of the lever,
20
the robot should be attempting the lever task before the foosball task. As seen in the second run,
the foosball slider can move and twist the robot. Flipping the lever before foosball helps
maximize the number of points since it lets the robot attempt two tasks instead of it trying to
move the foosball counter and having that mess up the path. In addition, the long arm became
detached after knocking down the lever. For the final competition, this arm will be screwed into
The foosball task didn’t work in any of the competition runs despite having success in
performance test two. The two main errors that happen is either the robot is too far away and
misses the foosball slider, or that the angle the arm is supposed to go to is too high and the arm
makes the robot go in the air meaning only one wheel has contact with the ground which makes
the robot twist. To improve this, the appropriate angle for the arm needs to be found to help
Finally, getting the robot to navigate back down has been a struggle. The RPS dead zone
makes it difficult to get the robot properly aligned in order to be in the right direction to head
down the ramp. To work on this issue, a possible solution could be that the robot could start to
hit the white button so that the RPS dead zone would be unlocked. This would help align the
robot so that it could be in the right spot to flip the lever, help the robot align itself in case it gets
stuck or gets set offline during foosball, and can help guide the robot back down to the final
button.
21
5. Final Design
5.1. Description
The final robot design was comprised from the leading ideas discussed in decision
matrices and the feedback given from discussions of the cardboard mock-up. A design schedule
was laid out to aid in the construction process, emphasizing the importance of creating the
chassis and drivetrain first before any of the mechanisms. The chassis was square in shape, 7.5
inches on each side. Cutouts were made on the right side and the front of the robot to allow the
arm mechanisms’ full rotation. The drivetrain consisted of two Igwan motors mounted
underneath the back corners of the chassis. Two mounted balls were then placed underneath the
front corners of the chassis to act as rolling skids. Centrally located on the underside of the
chassis was the CdS cell and its housing, covered by a red filter. On top of the chassis, MDF
pieces were attached to hold the Proteus controller in place near the back half of the robot.
The arm mechanisms were then scheduled to be constructed and attached to the robot
chassis. The first servo arm was mounted on the right side of the chassis. Attached to it was the
smaller arm mechanism, constructed of erector set pieces, used to complete the foosball task.
The second servo motor was mounted towards the front of the chassis, centrally located.
Attached to this motor was the larger arm mechanism, also constructed from erector set pieces,
used to complete the token and lever tasks. Lastly, two erector set mounts were placed on the left
side of the chassis to hold the robot’s specific QR code 9” above the ground. The final robot
22
Figure 7: Final design of robot
A budget log was kept throughout the design and construction process of the final robot
design. The log kept track of the total number of orders, each date of order, the parts included,
and the total cost per order. The totals and budget were assessed each time new parts were in
consideration for the final design. The parts from each order were organized into seven separate
categories determined by the FEH Department Store website. Table C7 in Appendix C: Testing
& Budget Log contains the information related to each specific order made by the team during
the ten-week project timespan. Figure C1 in Appendix C: Testing & Budget Log shows the
percentage distribution of the team’s budget per part category and can also be seen on the next
page, while Figure C2 in Appendix C: Testing & Budget Log shows the progression of spending
23
Figure 8: Percentage of budget spent per part.
The final code used for competition runs consists of separate movement and mechanism
functions. Utilizing functions allowed for a more clear and concise main code function and
helped for clarity when debugging. Sections of code calling for movement were also paired with
RPS checks, done by RPS functions, so that the robot would maintain the path designated by the
team. Any section where a mechanism was to be used, such as the token task, also had code that
presented visual indicators on the Proteus LCD screen. The visual cues within the code gave the
team ideas as to what the robot believed it was supposed to be doing. The screen was also used
when RPS values were needed, having the Proteus print out collected values onto the screen. The
completing all of the tasks. The first of these was the smaller arm made from erector set pieces.
24
The top of the arm had a wide face made from two plates. It had two thick rubber bands
surrounding the plates to give the arm grip when touching the foosball counter. This arm was
originally going to perform both the foosball and lever tasks, but the larger arm was dedicated to
the lever task after testing sessions. The small arm mechanism can be seen below in Figure 9.
The second mechanism was the larger arm also made from erector set pieces. The added
length allowed the arm to reach the top slot of the token machine from the lower level of the
course. Two flex plates were used on the top to create a basket-like compartment for the token.
After the fourth performance test, the larger arm was also assigned to the lever task due to its
reach. It was simply lowered down to move the lever. The larger arm can be seen on the next
Both mechanisms were influential in determining the course strategy and route for
official competition. The large arm’s function required the token to be deposited before using the
arm to push down the lever. The foosball arm’s placement made the sequence to lever from
foosball far easier. More details on course strategy can be found later in Section 6.2.
25
Figure 10: Larger, servo-operated arm for the token and lever tasks.
Only five electrical components were attached to the Proteus controller. Both Igwan
motors required soldering in order to have wires reach the ports on the front of the Proteus as
well as the motor ports on the back of the Proteus. Both servo motors had connection pins
soldered onto them for attachment purposes. Lastly, the CdS cell was soldered into a wired
connection containing a resistors and connection pins. The Proteus port connection guide for the
electrical components can be found in Appendix F: Electrical Systems (not included due to Word
online issues).
6. Final Competition
The competition was held at The Ohio State University RPAC lower gym on Saturday,
April 6th, 2019. Prior to the competition starting, every team was given the opportunity to
perform one practice run. The final competition consisted of two parts. The first part was a round
robin style play where each robot competed in three different official runs. Following this was a
26
single elimination March Madness style tournament where the winner of four robots advanced to
the next round. The seeding of the bracket came from the robot’s performance from individual
competition. The final competition followed the same procedures as the individual competition
regarding rules and scoring. A pre-start action had to be completed to signal that the robot was
ready and waiting for the light. Teams were permitted to use the kill switch at any kill to stop the
robot and the timer. The course a team would run on was randomly determined and the light of
DDR was also randomized throughout the whole event. The runs were scored out of 75 primary
points and 100 secondary points. The scoring and point values assigned to each task were the
same as they were in individual competition (see Table 1 in Section 5). A winner was determined
by overall point total. If teams were tied, time was the tiebreaker.
6.2 Strategy
The strategy for the final competition was the same as the first couple runs of individual
competition but with a couple modifications. The robot started by placing the coin into the upper
token slot so that if the coin were to fall too early, then the coin would fall into the front bowl.
The robot used RPS checks to align itself with the coin machine. After the coin task, the robot
continued to the DDR station, read the closest light, and then hit the respective button for five
seconds. The robot used RPS again to make sure it accurately read the color of the light. After
hitting the button, the robot navigated up the pinball ramp and utilized RPS again to fix its
heading. The robot drove forward to the foosball station and turned left ninety degrees. This is
when the robot “parallel parked” itself to align with the counter. The robot backed up into the
wall, then drove forward. Angled forty-five degrees to the left, it went backwards, then
straightened up against the wall. The robot then drove forward a little, brought the smaller arm
27
down and attempted to drag the slider about two-thirds of the way. The robot then raised the arm
back up, drove backwards a little, and then lowered the arm again to push the foosball counter to
the end of the rod. Once the foosball task had been completed, the robot continued forward to the
lever to take three swings, turning a little more to the right between swings, to flick down the
lever. After the three swings, the robot faced the final button and drove towards it. Before
reaching the speed bump, the robot turned one hundred eighty degrees and drove down the ramp
backwards. The robot then guided itself to the final button and bumped into it to complete the
run.
6.3 Results
The first round robin run took place on course G and used a red light. The coin perfectly
fell into the top slot. The DDR task was perfect, with the robot correctly identifying and pressing
the correct color. The robot slightly swerved right on the ramp but still made it up without
getting stuck. The parallel park method worked as expected and the robot flicked the lever on its
first try. The robot once again cleanly went down the ramp, having the left wheel push the final
button to end the run at a time of 1:34.37. This run resulted in a perfect 100/100 score.
The second round robin run took place on course E and used a blue light. The robot
missed the token slot and placed the coin too far to the right. At DDR, the robot was able to
correctly read the blue light and pushed the appropriate button. The robot swerved to the left on
the uphill and nearly got stuck on the ticket eater box. After making it up to the top, the robot
parallel parked as expected; however, the robot swung the arm down early and hit the right black
foosball housing wall. This caused the robot to push of the wall and to be askew. The arm was
now too far away to reach the foosball counter and missed the slider. Because of the angle, it
28
drove towards the center obstacle. The front left skid got stuck on the rectangle block that held
the obstacle causing the robot to turn even further. The robot stopped at the obstacle and
attempted to swing at the lever despite being far away from it. After the three swings, the robot
tried to turn to get to the final button, knocking over the obstacle. The left wheel got stuck in the
rectangle block, causing the robot to spin around the rectangle obstacle holder. At this point, the
team decided it was best to use the kill switch because the robot was completely off-course. This
run resulted in 24/75 primary points and 29/100 secondary points with a time of 1:26.46.
The third round robin run took place on course B and had a red light. The robot was able
to drop the coin into the upper coin slot. On DDR, the robot correctly read the red light and
pushed the red button. The robot took longer than usual to check the heading angle right before it
went up the ramp. When it started to move up the ramp, the robot greatly swerved to the front
left corner hit the blue ticket eater, getting stuck on the ramp. The team decided to use the kill
switch since the robot was no longer moving. Killing the robot also saved the team time. The
final time was 0:53.67 and resulted in 38/75 primary points and 51/100 secondary points.
The fourth run was the first round of the head to head tournament. The robot entered the
tournament as a 11 seed and had to face a 3, 6, 11, and 14 seed in the region. The run took place
on course F and used a red light. As the robot drove to the coin machine, it was aligned more to
the right and looked like it was going to miss the slot to the right like it did in the second-round
robin. Fortunately, the coin very narrowly went in the top slot. The robot then accurately read
and pushed the red-light button. The robot once again swerved left and barely missed the corner
and hitting the ticket eater box. This would have caused it to get stuck like in the previous run.
The robot was able to parallel park properly. The arm swung down and made contact with the
foosball counter; however, instead of driving forward and dragging the slider, the counter rotated
29
the robot towards the foosball counter house. The robot was then trapped inside the foosball
house, but in the process of rotating inward, the arm was able to pull the foosball counter off its
original spot enough to gain points. The robot then tried to go backwards and back forward for
its second attempt, but it was already so off path that more rotation kept it trapped in the foosball
housing. At this point, the team decided to use the kill switch since the robot was at a point of no
recovery. This run resulted in a time of 1:20.54 and 50/75 primary points and 63/100 secondary
points. The team finished second in the matchup, beating two teams who had less points and had
use a kill switch on their own robots. However, Tertis 8 lost to a robot that gained more points,
6.4 Analysis
Table 3: Summary of Final Competition Runs
The robot’s performance was much improved from individual competition. At individual
competition, the robot couldn’t reach the final button, and the lever and foosball had very little
success rates. The best run before final competition was 55/100 which came during individual
competition. Differently, the best run overall came during the first round of final competition
which resulted in a perfect 100/100. The robot was well able to navigate around the course and
had high potential to finish every task. The most consistent tasks were the robot’s strengths.
DDR was perfect all four times and only once did the robot miss the token slot. Foosball, which
was the biggest concern coming into the competition, looked to perform well after the practice
30
and first round where it worked twice, but the robot had messed up its path on the second and
fourth runs. The only time the robot reached the lever and final button was on the first round
robin run, but the robot was able to properly complete both tasks. Moving the courses from
Hitchcock to the RPAC brought concerns about RPS values being different, but that was not a
problem for the robot. The biggest issue was the ramp inconsistency between different courses.
On course G, the robot swerved right going up the acrylic ramp. On courses B, E, and F, the
robot swerved left going up the ramp, causing it to get stuck along the ticket eater once. Another
inconsistency between courses was how easy it was to slider the foosball counters. Some courses
had sliders which moved very easily while other courses required more force.
The team brainstormed and collaborated to create an initial prototype of the robot that
was to complete the course. The prototype was then brought to life when it was built out of wood
and with real motors. Testing started and it was soon realized that modifications would be
necessary for the robot to perform the desired functions. The robot changed from having one arm
to two. The DDR buttons were hit by simply running into them instead of having an arm for each
button. The biggest change from the prototype was the reduction of four wheels to two. Two
wheels and two skids were used instead of a chain drivetrain because it would not fit while using
Igwan motors.
The individual competition resulted with 55 being the best score by completing three of
five tasks. The biggest takeaways from individual competition was that the robot still needed a
way to get back down, foosball had a very low success rate and needed changes, and that more
RPS checks were needed. Improvements were still made in time for final competition. The final
31
competition was completed with the best score being a 100, but inconsistency was a problem
Consistency was the robot’s biggest problem. There was potential for a perfect run, as
seen in the first round of final competition, but there were also issues with the robot getting
stuck. The biggest change to make to improve the robot’s performance is to enable the RPS dead
zone by hitting the white button. The robot uses RPS checks a lot to navigate around the course
and it is a struggle in the dead zone since there is no way to fix error from shaft encoding and no
way to check and fix the positioning. When it comes to production in the future, implementing
more fail-safes in the code could help the robot avoid getting stuck. For example, to avoid
getting stuck in the foosball house, one option is to have bump switches on the sides of the robot
chassis, so if a bump switch was pushed, the robot would have code that would get the robot to
drive backward, reset it itself, and move on to the lever task. If the robot were programmed to hit
the white button, the robot could use heading angle checks to see if it is unaligned. If the robot’s
angle was not what it’s supposed to be, then RPS checks can help get the robot back to the angle
it should be at. Another improvement to make if the robot goes into production is to add more
friction to help the robot avoid slipping while going up the ramp. As seen in the final
competition, the robot tends to swerve left or right while going up the acrylic ramp and can make
the robot get stuck along the token eater on the left side. One last major improvement is to have
the CdS cell higher up. There were issues at times where the CdS cell would hit the steps of the
acrylic ramp or would interfere with the speed bump while going down the other ramp.
32
8. References
33
APPENDIX A
Decision Matrices
Table A1: Decision Matrix for the chassis of the robot.
Table A2: Decision Matrix for the foosball mechanism of the robot.
A2
Table A3: Decision Matrix for the DDR mechanism on the robot.
Table A4: Decision Matrix for the lever mechanism on the robot.
A3
Table A5: Decision Matrix for the token mechanism on the robot.
Table A6: Decision Matrix for hitting the final button with the robot.
A4
Table A7: Final Decision Matrix for robot.
A5
APPENDIX B
Coding Representations
Figure B3: Flowchart for main function (page 1 of 2).
B2
Figure B4: Flowchart for main function (page 2 of 2).
B3
Algorithm for main function:
1. Set the starting angles for the two arms (90 for the robot arm and 100 for the coin arm)
2. Initialize the RPS menu to select the course
3. Call the printRPS() function to print live RPS values until the screen has been tapped
4. Start a timer for the start-light timeout
5. Print to screen a message saying the robot is ready to go
6. To advance to the next step, wait till the start-light is detected or if the timer hits 30
seconds
7. Clear the screen and print messages about where the robot is going
8. Turn right 45 degrees
9. Check and fix the angle heading to be 270 degrees
10. Move forward two inches
11. Check and fix the x coordinate to be at 17
12. Turn left 81 degrees
13. Check and fix the angle heading to be 358 degrees
14. Move forward 4 inches
15. Check and fix the y coordinate to be at 25.5
16. Start a new timer
17. Repeatedly check the heading to be at 0 degrees until the robot is within 1 degree of
being at 0 degrees or if it has been 5 seconds
18. Sleep for half a second
19. Lower the coin arm to 145 degrees to drop the coin into the slot
20. Bring the coin arm back up to 100 degrees
21. Print to the screen a new update about where the robot is going
22. Drive backwards 5 inches
23. Check and fix the y coordinate to be at 20
24. Turn right 90 degrees
25. Check and fix the x coordinate to be at 26.2
26. Turn right 90 degrees
27. Drive forward half an inch
28. Check and fix the angle heading to be 180 degrees
29. Check and fix the y coordinate to be 12.6
30. Sleep for half a second
31. if the CDS value is less than .70 go to the next step, else go to step 40
32. Make the screen red and print that the red light was detected
33. Drive forward for 6.5 seconds to push the red button
34. Drive backwards 2.5 inches
35. Turn left 90 degrees
36. Drive forward 4.5 inches
37. Turn left 82.5 degrees
38. If the robot is on course F, check and fix the heading angle to be 355 degrees
39. Go to step 48
40. Make the screen blue and print that the blue light was detected
41. Turn left 90 degrees
42. Drive forward 5 inches
B4
43. Turn right 90 degrees
44. Drive forward for 6.5 seconds to push the blue button
45. Go backwards 2 inches
46. Turn right 189 degrees
47. Check and fix the heading angle to be 0 degrees
48. Clear the screen and update where the robot will be heading to
49. Check and fix the y coordinate to be 18.5
50. Sleep for a second
51. Drive forward for 28 inches at 2.5 times the normal speed
52. Check and fix the y coordinate to be 52
53. Check and fix the heading angle to be 0 degrees
54. If the x coordinate is less than 27.5 then proceed to the next step, else go to step 58
55. Turn right 90 degrees
56. Drive forward for 1.5 seconds
57. Turn left 90 degrees
58. Drive forward for 14 inches
59. Drive forward again for 1.5 seconds
60. Drive backwards for .5 inches
61. Turn left 90 degrees
62. Drive backwards 2 seconds
63. Move forward 7.5 inches
64. Turn left 30 degrees
65. Move backwards 5.75 inches
66. Turn right 34 degrees
67. Drive backwards for 2.5 seconds
68. Move forward 2.25 inches
69. Drop the robot arm angle to 160 degrees to latch onto the foosball counter, do 161
degrees if the robot is on course C.
70. Sleep for 1 second
71. Drive forward at double the normal speed for 8 inches
72. Bring the robot arm back up to 90 degrees
73. Sleep for 1 second
74. Drive the robot backwards 5 inches
75. Turn right 30 counts
76. Drop the robot arm angle to 160 degrees to latch onto the foosball slider rod, do 161
degrees if the robot is on course C.
77. Drive forward 4 inches
78. Bring the robot arm back up to 90 degrees
79. Print new status update for the robot
80. Drive forward 9.75 inches
81. Turn right 15 degrees
82. Drop the coin arm to 170 degrees to try to hit the lever
83. Sleep for .5 seconds
84. Bring the coin arm back to 100 degrees
85. Turn right 7.5 degrees
86. Drop the coin arm to 170 degrees to try to hit the lever
B5
87. Sleep for .5 seconds
88. Bring the coin arm back to 100 degrees
89. Turn right 7.5 degrees
90. Drop the coin arm to 170 degrees to try to hit the lever
91. Sleep for .5 seconds
92. Bring the coin arm back to 100 degrees
93. Drive backwards 1 inch
94. Sleep for .5 seconds
95. Turn left 15 degrees
96. Print to the screen that the robot is going down the ramp
97. Drive forward 4 inches
98. Turn left 45 degrees
99. Drive forward 7 inches
100. Turn left 45 degrees
101. Drive forward 12 inches
102. Turn left 90 degrees
103. Drive backwards 1 inch
104. Turn left 90 degrees
105. Move backwards 2 inches
106. Check and fix the heading angle to be 0 seconds
107. Check and fix the y coordinate to be 44
108. Move backwards 10 inches at triple the regular speed
109. Move backwards 20 inches (at regular speed)
110. Clear the screen and print “FIGHT TIL THE END FOR O_HI_O”
111. If the x coordinate is greater than 6, check and fix the heading angle to be 340
degrees. Else, check and fix the heading angle to be 0 degrees
112. Drive backwards for 10 inches
113. Move forward 3 inches
114. Turn left 90 degrees
115. Drive forward 5 inches at trip the amount of speed
116. Print “end” to screen
117. Set the coin arm to 108 degrees
118. Print “The job is done” to the end”
119. End Program
B6
APPENDIX C
Testing & Budget Logs
Table C1: Testing log for Performance Test 1.
C2
Table C2: Testing log for Performance Test 2.
C3
Table C3: Testing log for Performance Test 3.
C4
Table C4: Testing log for Performance Test 4.
C5
Table C5: Testing log for Individual Competition
Test Number Event Date Success/Failure What are we trying to do Result Members Involved
1 3/27/2019 F Test coin drop Didn’t drop coin Pranav, John, Doug
2 3/27/2019 F Test coin drop Missed slot Pranav, John, Doug
3 3/27/2019 F Test coin drop Missed slot Pranav, John, Doug
4 3/27/2019 F Test coin drop Missed slot Pranav, John, Doug
5 3/27/2019 F Test coin drop Arm went wrong way Pranav, John, Doug
6 3/27/2019 F Test coin drop Didn’t turn properly Pranav, John, Doug
7 3/27/2019 F Test coin drop Arm went wrong way Pranav, John, Doug
8 3/27/2019 F Test coin, ddr, and foosbal Missed foosball Pranav, John, Doug
9 3/27/2019 F Test coin, ddr, and foosbal Missed foosball Pranav, John, Doug
10 3/27/2019 F Test coin, ddr, and foosbal Didn’t slide slider Pranav, John, Doug
11 3/27/2019 F Test coin, ddr, and foosbal Coin didn’t fall out Pranav, John, Doug
12 3/27/2019 F Test coin, ddr, and foosbal Coin missed Pranav, John, Doug
13 3/27/2019 F Test coin, ddr, and foosbal Foosball didn’t slide Pranav, John, Doug
14 3/27/2019 F Test coin, ddr, and foosbal Foosball didn’t slide Pranav, John, Doug
15 3/28/2019 F Test coin, ddr, and foosbal Foosball didn’t slide John and Doug
16 3/28/2019 S Test coin, ddr, and foosbal Worked Properly John and Doug
17 3/28/2019 F Full Course Run Missed foosball, Missed lever John and Doug
18 3/28/2019 F Full Course Run Missed Coin, Robot went too far left John and Doug
19 3/28/2019 F Full Course Run Missed Coin, Robot went too far left John and Doug
20 3/28/2019 F Full Course Run Missed foosball, Missed lever John and Doug
21 3/28/2019 F Full Course Run Missed foosball, Missed lever John and Doug
22 3/28/2019 F Full Course Run Missed foosball, Missed lever John and Doug
23 3/28/2019 F Full Course Run Missed Coin, Robot went too far left John and Doug
24 3/28/2019 F Full Course Run Missed foosball, Missed lever John and Doug
25 3/28/2019 F Full Course Run Missed Lever John and Doug
26 3/28/2019 F Full Course Run Missed foosball, Missed lever John and Doug
27 3/28/2019 F Full Course Run Missed foosball, Missed lever Pranav and John
28 3/28/2019 F Full Course Run Missed foosball, Missed lever Pranav and John
29 3/28/2019 F Full Course Run Missed lever Pranav and John
30 3/28/2019 F Full Course Run Missed foosball, Missed lever Pranav and John
31 3/28/2019 F Full Course Run Missed foosball, Missed lever Pranav and John
32 3/29/2019 F Individual Comp 38/75, Missed foosball and lever Pranav, John, Doug
33 3/29/2019 F Individual Comp 24/75, Missed coin, foosball, and leve Pranav, John, Doug
34 3/29/2019 S- Individual Comp 55/75, missed foosball Pranav, John, Doug
C6
Table C6: Testing log for Final Competition.
Test Number Event Date Success/Failure What are we trying to do Result Members Involved
1 4/1/2019 S Go down the ramp Worked Properly Pranav and Doug
2 4/1/2019 F Complete course run Missed coin Pranav and Doug
3 4/1/2019 F Complete course run Robot got stuck on its way up Pranav and Doug
4 4/1/2019 F Complete course run Robot got stuck on its way up Pranav and Doug
5 4/1/2019 F Complete course run Robot got stuck on its way up Pranav and Doug
6 4/1/2019 F Complete course run Robot got stuck on its way up Pranav and Doug
7 4/3/2019 F Complete course run Missed foosball and lever Pranav and Doug
8 4/3/2019 F Complete course run Robot got stuck on its way up Pranav and Doug
9 4/3/2019 F Complete course run Robot got stuck on its way up Pranav and Doug
10 4/3/2019 F Complete course run Robot got stuck on the foosball Pranav and Doug
11 4/3/2019 F Complete course run Missed coin and foosball Pranav, John, and Doug
12 4/3/2019 F Complete course run Missed lever Pranav, John, and Doug
13 4/3/2019 F Complete course run Missed lever Pranav, John, and Doug
14 4/3/2019 F Complete course run Did everything but final button Pranav, John, and Doug
15 4/3/2019 F Complete course run Did everything but final button Pranav, John, and Doug
16 4/3/2019 F Complete course run Did everything but final button Pranav, John, and Doug
17 4/3/2019 F Complete course run Did everything but final button Pranav, John, and Doug
18 4/3/2019 F Complete course run Did everything but final button Pranav, John, and Doug
19 4/3/2019 F Complete course run Did everything but final button Pranav, John, and Doug
20 4/4/2019 F Complete course run Did everything but final button John
21 4/4/2019 F Complete course run Coin fell right, didn’t make it over the bump John
22 4/4/2019 F Complete course run Coin fell right, didn’t make it over the bump John
23 4/4/2019 F Complete course run Coin fell right, didn’t make it over the bump John
24 4/4/2019 F Complete course run Did everything but final button John
25 4/4/2019 F Complete course run Missed foosball and lever John
26 4/4/2019 F Complete course run Did everything but final button John
27 4/4/2019 F Complete course run Missed foosball and button John
28 4/4/2019 S Complete course run Worked Properly John
29 4/4/2019 F Complete course run Did everything but final button John
30 4/4/2019 F Complete course run Missed coin, didn't go over the bump John
31 4/4/2019 F Complete course run Missed coin John
32 4/4/2019 F Complete course run Got stuck on the bump John
33 4/4/2019 F Complete course run Missed lever and got stuck on the bump John and Pranav
34 4/4/2019 F Complete course run Missed token, barely missed final button John and Pranav
35 4/4/2019 F Complete course run Missed token John and Pranav
36 4/4/2019 F Complete course run Wrong light for DDR, stuck on foosball John and Pranav
37 4/4/2019 F Complete course run Missed coin to the right, robot went down but turned improper John and Pranav
38 4/4/2019 F Complete course run Missed foosball, hit token machine on the way down John and Pranav
39 4/4/2019 F Complete course run Missed foosball, hit token machine on the way down John and Pranav
40 4/4/2019 F Complete course run Coin missed, robot missed final button John and Pranav
41 4/4/2019 F Complete course run Missed final button John and Pranav
42 4/4/2019 F Complete course run Missed foosball, got stuck on the speed bump John and Pranav
43 4/4/2019 F Complete course run Missed foosball, got stuck on the speed bump John and Pranav
44 4/4/2019 F Complete course run Missed foosball, got down but missed final button John and Pranav
45 4/4/2019 F Complete course run Got stuck on the bump John and Pranav
46 4/4/2019 F Complete course run Missed foosball, John and Pranav
47 4/5/2019 F Complete course run RPS error Pranav, John, and Doug
48 4/5/2019 F Complete course run Missed foosball and button Pranav, John, and Doug
49 4/5/2019 F Complete course run Missed foosball and button Pranav, John, and Doug
50 4/5/2019 F Complete course run Missed foosball and button Pranav, John, and Doug
51 4/5/2019 F Complete course run Missed coin, didn't go over the bump Pranav, John, and Doug
52 4/5/2019 F Complete course run Stuck on foosball Pranav, John, and Doug
53 4/5/2019 F Complete course run Stuck on foosball Pranav, John, and Doug
54 4/5/2019 F Complete course run Missed foosball and lever Pranav, John, and Doug
55 4/5/2019 F Complete course run Missed coin, got stuck on foosball Pranav, John, and Doug
56 4/5/2019 F Complete course run Missed foosball, missed button Pranav, John, and Doug
57 4/5/2019 F Complete course run Missed foosball, didn’t make it over the speed bump Pranav, John, and Doug
58 4/5/2019 F Complete course run Missed foosball, missed button Pranav, John, and Doug
59 4/5/2019 F Complete course run Missed foosball and didn’t make it over the speed bump Pranav, John, and Doug
60 4/5/2019 F Complete course run Missed foosball, missed button Pranav, John, and Doug
61 4/5/2019 F Complete course run Missed foosball Pranav, John, and Doug
62 4/5/2019 F Complete course run Missed foosball, missed button Pranav, John, and Doug
63 4/5/2019 F Complete course run Stuck at coin machine Pranav, John, and Doug
64 4/5/2019 F Complete course run Missed foosball Pranav, John, and Doug
65 4/5/2019 F Complete course run Missed foosball, missed button Pranav, John, and Doug
66 4/5/2019 F Complete course run Missed foosball Pranav, John, and Doug
67 4/5/2019 F Complete course run Missed foosball Pranav, John, and Doug
68 4/5/2019 F Complete course run Missed foosball Pranav, John, and Doug
69 4/5/2019 F Complete course run Missed foosball Pranav, John, and Doug
70 4/6/2019 S Final Comp 100/100 1:34.37 Pranav, John, and Doug
71 4/6/2019 F Final Comp 29/100 1:26.46; Only got DDR Pranav, John, and Doug
72 4/6/2019 F Final Comp 52/100 0:53.67; DDR and Coin Pranav, John, and Doug
73 4/6/2019 F Final Comp 51/100 1:20.54; DDR and Coin Pranav, John, and Doug
C7
Table C7: Budget log for part orders.
C8
Figure C1: Graph of budget percentages devoted to parts per category.
Figure C2: Graph of the budget remaining over the ten week project duration.
C9
APPENDIX D
Graphs
Figure D1: DC Motor Torque-Speed Curves [2].
D2
APPENDIX E
Code
#include <FEHLCD.h>
#include <FEHIO.h>
#include <FEHUtility.h>
#include <FEHMotor.h>
#include <FEHRPS.h>
#include <FEHServo.h>
#include <math.h>
// DECLARATIONS //
// constant variables
#define PI 3.14159265359
#define motor_percent 20
#define degree90turn 5.40353936417 // turn distance = 2 * PI * 3.44 / 4.0
#define degree45turn 2.70176968209
// FUNCTIONS //
// Shaft Encoding (Counts)
/**
* @brief move_forwardCounts: move forwards with shaft encoding but uses
counts as an inputs
* @param percent: the speed the motors go
* @param counts: the number of counts the motors should go
*/
void move_forwardCounts(int percent, int counts) //using encoders
{
//Reset encoder counts
right_encoder.ResetCounts();
left_encoder.ResetCounts();
//While the average of the left and right encoder are less than counts,
//keep running motors
while((left_encoder.Counts() + right_encoder.Counts()) / 2. < counts);
/**
E2
* @brief turn_rightCounts: turns the robot right
* @param percent: the speed the motor goes
* @param counts: the number of counts the motor should go
*/
void turn_rightCounts(int percent, int counts) //using encoders
{
//Reset encoder counts
right_encoder.ResetCounts();
left_encoder.ResetCounts();
//While the average of the left and right encoder are less than counts,
//keep running motors
while((left_encoder.Counts() + right_encoder.Counts()) / 2. < counts);
/**
* @brief turn_leftCounts: turns the robot left
* @param percent: how fast the motors should go
* @param counts: the number of counts the motors go
*/
void turn_leftCounts(int percent, int counts) //using encoders
{
//Reset encoder counts
right_encoder.ResetCounts();
left_encoder.ResetCounts();
//While the average of the left and right encoder are less than counts,
//keep running motors
while((left_encoder.Counts() + right_encoder.Counts()) / 2. < counts);
E3
//Reset encoder counts
right_encoder.ResetCounts();
left_encoder.ResetCounts();
//While the average of the left and right encoder is less than counts,
keep running motors
while((left_encoder.Counts() + right_encoder.Counts()) / 2.0 < counts);
/**
* @brief turn_right: Turns the robot in the right direction (clockwise)
* @param percent: The speed the motors move at
* @param distance: How many inches the robot should move forward for
*/
void turn_right(int percent, double distance) {
// Calculate number of counts required to move a certain distance
int counts = (distance * 318) / (2 * PI * 1.25);
//While the average of the left and right encoder is less than counts,
keep running motors
while((left_encoder.Counts() + right_encoder.Counts()) / 2.0 < counts);
/**
* @brief turn_left: Turns the robot in the left direction (counter-
clockwise)
* @param percent: The speed the motors move at
* @param distance: How many inches the robot should move forward for
*/
void turn_left(int percent, double distance) {
// Calculate number of counts required to move a certain distance
int counts = (distance * 318) / (2 * PI * 1.25);
E4
//Set both motors to desired percent
right_motor.SetPercent(percent);
left_motor.SetPercent(percent);
//While the average of the left and right encoder is less than counts,
keep running motors
while((left_encoder.Counts() + right_encoder.Counts()) / 2.0 < counts);
// RPS Checks
/**
* @brief check_x_plus: Checks and fixes the positive x direction of the
robot
* @param x_coordinate: the x coordinate the robot should corrected to be at
*/
void check_x_plus(float x_coordinate) //using RPS while robot is in the +x
direction
{
LCD.WriteLine("Checking X Plus");
//check whether the robot is within an acceptable range
while(RPS.X() < x_coordinate - .5 || RPS.X() > x_coordinate + .5)
{
if(RPS.X() > x_coordinate)
{
//pulse the motors for a short duration in the correct direction
move_forwardCounts(-motor_percent, 5);
}
else if(RPS.X() < x_coordinate)
{
//pulse the motors for a short duration in the correct direction
move_forwardCounts(motor_percent, 5);
}
}
}
/**
* @brief check_x_minus: Checks and fixes the negative x direction of the
robot
* @param x_coordinate: the x coordinate the robot should corrected to be at
*/
void check_x_minus(float x_coordinate) //using RPS while robot is in the +x
direction
{
LCD.WriteLine("Checking X Minus");
//check whether the robot is within an acceptable range
while(RPS.X() < x_coordinate - .5 || RPS.X() > x_coordinate + .5)
{
if(RPS.X() > x_coordinate)
{
//pulse the motors for a short duration in the correct direction
E5
move_forward(motor_percent, 5);
}
else if(RPS.X() < x_coordinate)
{
//pulse the motors for a short duration in the correct direction
move_forward(-motor_percent, 5);
}
}
}
/**
* @brief check_y_minus: Checks and fixes the negative y direction of the
robot
* @param y_coordinate: the y coordinate the robot should corrected to be at
*/
void check_y_minus(float y_coordinate) //using RPS while robot is in the -y
direction
{
LCD.WriteLine("Checking Y Minus");
move_forwardCounts(motor_percent, 5);
Sleep(100);
}
else if(RPS.Y() < y_coordinate)
{
//pulse the motors for a short duration in the correct direction
move_forwardCounts(-motor_percent, 5);
Sleep(100);
}
}
}
/**
* @brief check_y_plus: Checks and fixes the positive y direction of the
robot
* @param y_coordinate: the y coordinate the robot should corrected to be at
*/
void check_y_plus(float y_coordinate) //using RPS while robot is in the +y
direction
{
LCD.WriteLine("Checking Y Plus");
E6
//pulse the motors for a short duration in the correct direction
move_forwardCounts(-motor_percent, 5);
}
else if(RPS.Y() < y_coordinate)
{
//pulse the motors for a short duration in the correct direction
move_forwardCounts(motor_percent, 5);
}
}
}
/**
* @brief check_heading: Checks and corrects the angle the robot is facing
* @param heading: the angle the robot will be corrected to
*/
void check_heading(float heading) //using RPS
{
LCD.WriteLine("Checking Heading");
turn_leftCounts(15, 3);
Sleep(100);
}
else if (RPS.Heading() < 180)
{
//pulse the motors for a short duration in the correct
direction
turn_rightCounts(15, 3);
Sleep(100);
}
}
}
turn_rightCounts(15, 3);
Sleep(100);
E7
}
else if (RPS.Heading() < heading)
{
//pulse the motors for a short duration in the correct
direction
turn_leftCounts(15, 3);
Sleep(100);
}
Sleep(500);
LCD.WriteLine("heading: ");
LCD.WriteLine(RPS.Heading());
LCD.WriteLine("error: ");
LCD.WriteLine(RPS.Heading() - heading);
LCD.WriteLine(" ");
//}
}
}
}
// Timed turns
/**
* @brief time_forward: Drives the robot forward for a certain time period
* @param length: how long the robot moves for
* @param percent: The speed the motors move at
*/
void time_forward(float length, int percent) {
// Set both motors to desired percent
right_motor.SetPercent(-percent - 1);
left_motor.SetPercent(percent);
// Start timer
float start = TimeNow();
/**
* @brief time_turnRight: Turns the robot right for a certain time period
* @param length: how long the robot moves for
* @param percent: The speed the motors move at
*/
void time_turnRight(float length, int percent) {
// Set both motors to desired percent
right_motor.SetPercent(-percent);
E8
left_motor.SetPercent(-percent);
// Start timer
float start = TimeNow();
/**
* @brief time_turnLeft: Turns the robot left for a certain time period
* @param length: how long the robot moves for
* @param percent: The speed the motors move at
*/
void time_turnLeft(float length, int percent) {
// Set both motors to desired percent
right_motor.SetPercent(percent);
left_motor.SetPercent(percent);
// Start timer
float start = TimeNow();
// Servo Motor
/**
* @brief rotateSmallArm: rotates the arm from a starting and ending angle
* @param start: starting angle
* @param end: ending angle
*/
void rotateSmallArm(int start, int end) {
// 500 and 2400 were values found from originally calibrating the servo
motor
robot_arm.SetMin(500);
robot_arm.SetMax(2400);
float x,y;
Sleep(1.0);
E9
//Set arm servo to ending degree
LCD.WriteLine("Going to:");
LCD.WriteLine(end);
robot_arm.SetDegree(end);
}
/**
* @brief rotateCoinArm: rotates the arm from a starting and ending angle
* @param start: starting angle
* @param end: ending angle
*/
void rotateCoinArm(int start, int end) {
float x,y;
Sleep(1.0);
// Drive forward
LCD.WriteLine("Drive forward a little");
time_forward(.7, 40);
// Turn CW (45)
LCD.WriteLine("Turning CW To face DDR");
time_turnRight(1.084 / 2.0, 25);
E10
// Drive Forward (to foosball, up the ramp)
LCD.WriteLine("Driving up the ramp to foosball");
time_forward(6.4, 40);
// End
LCD.Clear(FEHLCD::Gray);
LCD.SetFontColor( FEHLCD::Scarlet );
LCD.WriteLine("Done");
}
/**
* @brief ppt2: Robot goes from start to DDR and then to foosball
* This function was used for perfomance test 2.
*/
void ppt2() {
move_forward(motor_percent, 10);
turn_right(motor_percent, degree45turn);
move_forward(motor_percent, 9);
turn_right(motor_percent, degree90turn);
move_forward(motor_percent, .5);
LCD.WriteLine("Read Light");
// DDR
E11
Sleep(2.0);
// Red Light Detected
if (cds.Value() < .75 ) {
LCD.Clear( FEHLCD::Scarlet );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("The light is red");
// Drive Forward to push button
time_forward(8.0, 20);
move_forward(-motor_percent, 2.5);
turn_left(motor_percent, degree90turn);
move_forward(motor_percent, 3.5);
turn_left(motor_percent, degree90turn - (degree90turn / 12));
// Go up ramp
move_forward(2 * motor_percent, 42);
turn_left(motor_percent, degree90turn / 2.8);
move_forward(2 * motor_percent, 12);
// Rotate arm
rotateSmallArm(135, 30);
}
// Blue Light Detected
else {
LCD.Clear( FEHLCD::Blue );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("The light is blue");
// Move robot to blue button
turn_left(motor_percent , degree90turn);
move_forward(motor_percent, 5);
turn_right(motor_percent, degree90turn);
// Drive Forward to push button
time_forward(8.0, 20);
// After button push
move_forward(-motor_percent, 2.5);
turn_right(motor_percent, degree90turn * 2 + (degree90turn / 10));
// Go up ramp
move_forward(2 * motor_percent, 53);
turn_left(20, degree90turn);
move_forward(motor_percent, .5);
turn_right(motor_percent, degree90turn / 9);
// Rotate arm
rotateSmallArm(135, 30);
}
/**
* @brief ppt3: Robot goes from start to coin machine
* This function was used for perfomance test 3.
*/
void ppt3() {
LCD.Clear();
move_forward(motor_percent, 9.85);
turn_left(motor_percent, degree90turn / 90.0 * 42.0);
move_forward(motor_percent, 7);
for (int angle = 100; angle < 130; angle++) {
coin_arm.SetDegree(angle);
Sleep(.05);
E12
}
//rotateCoinArm(108, 145);
//rotateCoinArm(145, 108);
}
/**
* @brief ppt4: Robot goes from start to DDR to foosball
* This function was used for perfomance test 4.
*/
void ppt4() {
// Go to DDR
move_forward(motor_percent, 10);
turn_right(motor_percent, degree45turn);
move_forward(motor_percent, 9);
turn_right(motor_percent, degree90turn);
move_forward(motor_percent, .5);
LCD.WriteLine("Read Light");
// DDR RPS
LCD.WriteLine("Fixing Heading");
check_heading(180);
LCD.WriteLine("Fixing Y");
check_y_minus(12.6);
Sleep(2.0);
// Red Light Detected
if (cds.Value() < .75 ) {
LCD.Clear( FEHLCD::Scarlet );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("The light is red");
// Drive Forward to push button
time_forward(2.0, motor_percent);
move_forward(-motor_percent, 2.5);
turn_left(motor_percent, degree90turn);
move_forward(motor_percent, 4.5);
turn_left(motor_percent, degree90turn - (degree90turn / 12));
}
// Blue Light Detected
else {
LCD.Clear( FEHLCD::Blue );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("The light is blue");
// Move robot to blue button
turn_left(motor_percent , degree90turn);
move_forward(motor_percent, 5);
turn_right(motor_percent, degree90turn);
// Drive Forward to push button
time_forward(2.0, motor_percent);
// After button push
move_forward(-motor_percent, 2.5);
turn_right(motor_percent, degree90turn * 2 + (degree90turn / 10));
}
// Up the ramp
check_heading(0.0);
check_y_plus(18.5);
Sleep(1.0);
move_forward(motor_percent * 2.5, 28);
E13
check_y_plus(52.0);
check_heading(0.0);
turn_left(motor_percent, degree90turn/10.0);
check_heading(10.0);
move_forward(motor_percent, 16.0);
// foosball
turn_left(motor_percent, degree90turn - (degree90turn / 5));
move_forward(-motor_percent, 7.0);
robot_arm.SetDegree(160);
Sleep(1.0);
move_forward(motor_percent * 2, 8.0);
robot_arm.SetDegree(90);
Sleep(100);
move_forward(-motor_percent * 2, 5.0);
robot_arm.SetDegree(160);
move_forward(motor_percent, 4.0);
robot_arm.SetDegree(90);
// after foosball
move_forward(-motor_percent, 10.0);
turn_left(motor_percent, degree90turn);
move_forward(motor_percent, 8.0);
turn_right(motor_percent, degree90turn * 2);
move_forward(-motor_percent, 7.0);
check_heading(0.0);
move_forward(-motor_percent * 4, 50.0);
turn_left(motor_percent, degree90turn);
move_forward(motor_percent, 26);
turn_left(motor_percent, degree45turn);
move_forward(motor_percent, 10.0);
}
/**
* @brief intGUi: Runs a gui that can change the value of an int variable
*/
int intGUI(int value)
{
// clear screen to black to see icon
LCD.Clear(BLACK);
E14
value++;
robot_arm.SetDegree(value);
menu[0].ChangeLabelInt(value);
Sleep(500);
}
if (menu[3].Pressed(x,y,0))
{
value--;
robot_arm.SetDegree(value);
menu[0].ChangeLabelInt(value);
Sleep(500);
}
if (menu[2].Pressed(x,y,0)) {
show = false;
}
}
LCD.Clear();
LCD.WriteLine("Value:");
LCD.WriteLine(value);
LCD.WriteLine("");
LCD.WriteLine("Sleeping for 1 seconds");
Sleep(1.0);
return value;
}
/**
* @brief doubleeGUI: Runs a gui that can change the value of a double
variable
*/
double doubleGUI(double value)
{
// clear screen to black to see icon
LCD.Clear(BLACK);
E15
if (menu[3].Pressed(x,y,0))
{
value = value--;
menu[0].ChangeLabelInt(value);
robot_arm.SetDegree(value);
Sleep(100);
}
if (menu[2].Pressed(x,y,0)) {
show = false;
}
}
LCD.Clear();
LCD.WriteLine("Value:");
LCD.WriteLine(value);
LCD.WriteLine("");
LCD.WriteLine("Sleeping for 3 seconds");
Sleep(3.0);
return value;
}
/**
* @brief printRPS: Prints the RPS value every two seconds
*/
void printRPS() {
float x, y;
while(!LCD.Touch(&x, &y)) {
LCD.WriteLine("X Value:");
LCD.WriteLine(RPS.X());
LCD.WriteLine("Y Value:");
LCD.WriteLine(RPS.Y());
LCD.WriteLine("Heading Angle:");
LCD.WriteLine(RPS.Heading());
Sleep(2.0);
}
// MAIN PROGRAM //
int main(void)
{
float x,y; //Dummy Variables
robot_arm.SetDegree(90);
coin_arm.SetDegree(100);
RPS.InitializeTouchMenu();
printRPS();
E16
//coin_arm.SetMin(500);
//coin_arm.SetMax(2395);
//coin_arm.SetDegree(100);
// Starts timer
float startDelay = TimeNow();
float start = TimeNow();
// Main program
bool run = true;
while( run )
{
// Starts main run on this prompt
// starts either when the light goes off or when it has been 30
seconds since the program has been turned on for
if( cds.Value() < .75 || (TimeNow() - startDelay) > 40.0) {
// Start
LCD.Clear( FEHLCD::Black );
LCD.WriteLine("Starting Run Now");
LCD.WriteLine("Returning Coin");
turn_right(motor_percent, degree45turn);
check_heading(270.0);
move_forward(motor_percent, 2);
check_x_plus(16.5);
turn_left(motor_percent, degree90turn-(degree90turn/11.0));
check_heading(355.0);
move_forward(motor_percent, 4.0);
check_y_plus(25.5);
check_heading(0.0);
Sleep(500);
// Coin drop
LCD.WriteLine("Inserting Coin");
for (int angle = 100; angle <= 140; angle++) {
coin_arm.SetDegree(angle);
Sleep(.01);
}
Sleep(1.0);
// Go to DDR
move_forward(-motor_percent, 5.0);
check_y_plus(20.0);
turn_right(motor_percent, degree90turn);
check_x_plus(26.2);
E17
turn_right(motor_percent, degree90turn);
move_forward(motor_percent, .5);
LCD.WriteLine("Reading DDR Light");
// DDR RPS
LCD.WriteLine("Fixing Heading");
check_heading(180);
LCD.WriteLine("Fixing Y");
check_y_minus(12.6);
// DDR
Sleep(2.0);
// Red Light Detected
if (cds.Value() < .75 ) {
LCD.Clear( FEHLCD::Scarlet );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("Red Light Detected");
// Drive Forward to push button
time_forward(7.0, motor_percent);
move_forward(-motor_percent, 2.5);
turn_left(motor_percent, degree90turn);
move_forward(motor_percent, 4.5);
turn_left(motor_percent, degree90turn - (degree90turn / 12));
}
// Blue Light Detected
else {
LCD.Clear( FEHLCD::Blue );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("Blue Light Detected");
// Move robot to blue button
turn_left(motor_percent , degree90turn);
move_forward(motor_percent, 5);
turn_right(motor_percent, degree90turn);
// Drive Forward to push button
time_forward(7.0, motor_percent);
// After button push
move_forward(-motor_percent, 2.0);
turn_right(motor_percent, degree90turn * 2 + (degree90turn /
10));
}
// Up the ramp
LCD.Clear( FEHLCD::Black );
LCD.SetFontColor( FEHLCD::White );
LCD.WriteLine("Going Up Acrylic Ramp");
check_heading(0.0);
check_y_plus(18.5);
Sleep(1.0);
move_forward(motor_percent * 2.5, 28);
check_y_plus(52.0);
check_heading(0.0);
LCD.WriteLine("Heading to Foosball");
// Fix positioning
if(RPS.X() > 27.5) {
turn_left(motor_percent, degree90turn/10.0);
check_heading(20.0);
move_forward(motor_percent, 17.0);
E18
} else {
turn_left(motor_percent, degree90turn/10.0);
check_heading(10.0);
move_forward(motor_percent, 16.0);
}
// foosball
LCD.WriteLine("Moving Foosball Counter");
turn_left(motor_percent, degree90turn - (degree90turn / 5));
move_forward(-motor_percent, 8.5);
move_forward(motor_percent, 1.75);
turn_rightCounts(motor_percent, 20);
//robot_arm.SetDegree(160);
Sleep(1.0);
move_forward(motor_percent * 2, 8.0);
robot_arm.SetDegree(90);
Sleep(1.0);
move_forward(-motor_percent * 2, 5.0);
//turn_rightCounts(motor_percent, 12);
//robot_arm.SetDegree(160);
Sleep(1.0);
move_forward(motor_percent, 4.0);
robot_arm.SetDegree(90);
//turn_rightCounts(motor_percent, 6);
// lever
LCD.WriteLine("Moving to Lever");
move_forward(motor_percent, 9.0);
turn_right(motor_percent, (degree45turn / 3));
coin_arm.SetDegree(170);
Sleep(.5);
coin_arm.SetDegree(100);
Sleep(.5);
turn_right(motor_percent, (degree45turn / 3));
coin_arm.SetDegree(170);
Sleep(.5);
coin_arm.SetDegree(100);
Sleep(.5);
move_forward(-motor_percent, 1.0);
Sleep(.5);
turn_left(motor_percent, (degree45turn / 3));
turn_left(motor_percent, (degree45turn / 3));
move_forward(-motor_percent, 16.0);
move_forward(motor_percent, 1.75);
turn_rightCounts(motor_percent, 20);
robot_arm.SetDegree(152);
Sleep(1.0);
move_forward(motor_percent * 2, 8.0);
robot_arm.SetDegree(90);
Sleep(1.0);
move_forward(-motor_percent * 2, 5.0);
turn_rightCounts(motor_percent, 12);
robot_arm.SetDegree(155);
Sleep(1.0);
move_forward(motor_percent, 4.0);
robot_arm.SetDegree(90);
turn_rightCounts(motor_percent, 6);
E19
move_forward(-motor_percent, 7.5);
turn_left(motor_percent, degree90turn);
move_forward(motor_percent, 7.0);
turn_right(motor_percent, degree90turn * 2);
check_heading(0.0);
// End of Program
LCD.WriteLine("end");
run = false;
}
}
// Fix coin arm positioning
coin_arm.SetDegree(108);
E20