
The Project
My CPR E 288 was modeled after an internship
program at a large company. You start knowing
very little and learn through lectures and
small projects with step-by-step instructions.
Then, you begin to solve problems, debug, and
have control of the implementation process.
Finally, you are an engineer on a design team
(you and 3 classmates). The last 4 labs in the
semester are devoted to your final project: a
marketable product that utilizes everything
you have learned in the course.
This is my favorite project I have done
because it gave each lab group complete
freedom over their design. Every time I spoke
with my professor, usually to ask if something
was possible, I received the same answer: "do
as much as you'd like."
Because of this freedom, we chose to do
something big. After pitching dozens of ideas,
we finally decided to modify our Roomba to use
a microphone to detect a ticking bomb.
The project proposal can be seen in the
embedded pdf near the bottom of this page or
can be viewed
here.
Microphone
My largest undertaking in the project was to
implement the microphone. This was a process
that took most of the weeks we had to develop
and test out bot. To my knowledge, our group
was the only one to add a sensor to their bot.
Also, judging by the TAs' reactions, the only
ones in recent classes to add a sensor. This
made the process a lot more difficult.
First, I attempted to use an SPI connected
microphone from my professor's advanced
embedded systems class. Our class didn't cover
SPI, so it was laborious to say the least.
Eventually, I started receiving output from
the microphone. However, it was extremely
inconsistent compared to what it needed to be.
Luckily, I communicated with my professor
throughout this process, and he ended up
purchasing the microphone that is attached in
the picture to the right. I wrote the code,
debugged, and attached the microphone in the
same day it was delivered.
Coding
CPR E 288 forced me to become very familiar
with C. Towards the end of the course, when I
really understood pointers and interrupts, I
began to enjoy coding in C more than Java.
The code for the bot was all written in C
(besides the GUI that was written in Python),
and was uploaded to the
TIVA TM4C123GH6PM microcontroller on the
Create 2 Robot.
The last week of the final project meant a lot
of hours in the lab. Some time was shared with
my group members, but a lot of it was spent
debugging by myself. This process taught me
how to comprehend other's code and develop
code in someone else's style.
Although our bot was functioned for days
before our demonstration, the final step was
to make it reliable. This meant cleaning up
the code, making it readable, and find bugs
that were preventing the bot from working
consistently.
Finally, we had a reliable product that could
accomplish our goal. The code for the bot as
well as the GUI can be found
here.
GUI
At first, I tried to just add a the microphone
to our Graphical User Interface. This ended up
turning into days of work. Until working on
the GUI for the project, I had never written a
line of Python. There wasn't much syntax to
learn since I coded in Java frequently, but
using plugins was a new concept for me.
I added functionality for the microphone, but
found I had to redesign the layout to
accommodate the extra features. I then added
the object detection, song (to announce the
end of the mission), made it easy to use, and
finally made it presentable. Then, I debugged
my new features and my groupmate's features
until the GUI worked consistently.
