The week started off with my rewriting all of the Arduino and sensor code for the MSK, after forgetting to save and losing the code that I did have. (Not such a big deal, as it was only 30 lines or so that needed to be rewritten.) I rewrote the code to have more features than the old code did, like the ability to write custom angles to the servo, and the ability to modify default values (e.g. Change what angle the servo gets set to if the sensor is triggered.) I also restructured the code to use methods instead of having everything running in the main loop. Ultimately, losing those thirty or so lines was probably a good thing. Of course, I expect that I’ll have to rewrite the code a few more times before the end of this project, whether it’s to allow for the control of multiple servos or to simply remove debug functions. Continue reading →