VEX Alarm Clock Challenge, or the...
"I couldn't think of a more original name for this!" Challenge.
Alarm clocks. We have them, we use them, and we eventually grow to hate them. Those annoying little monstrosities are the source of our continued employment and the slayer of our peaceful rest. To help ease the pain of having your serene slumber shattered by a blaring siren, we’ve created a program that will turn a VEX Cortex (with a LCD screen attached) into a basic alarm clock (code attached).
Here’s the catch; although the code is correct and will work, it is very poorly written.
It’s all in task main running straight through with little room for flexibility; there are no functions or multitasking involved. Clearly, this is sub-optimal code.
This is where you come in. We would like you, the ROBOTC community, to showcase how you would rewrite the code to make it better
. Where can it be improved? What can be cut out? Where can it be more flexible? The fun doesn’t stop there, though (we can’t make this easy now, can we?): the challenge is to showcase the different styles and approaches to coding, so we’d like to see what you can come up with.
-How to make the most streamlined code
(fewest lines, for instance)
-How to make the most flexible code
(switching out 12 hour to 24 time format, etc)
-Who can make the most ‘inventive’ code
(one idea was to make the robot ‘run away’ from the groggy user trying to shut the alarm off
We want to see what the community can come up with, the processes involved, the pros and cons of various coding styles, etc. More importantly, we want this to be a fun learning experience for all involved, and to that end we encourage this to be an open brainstorming session.
Good luck, and happy coding!
*This is a sister challenge to the NXT Alarm Clock Challenge
Check out our Blog
! And our Facebook page
Need help? Take a look at our Wiki
and our Forums.I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody