I know that a lot of people have been creating these self-balancing robots, but I thought that for my first ROBOTC project I would try and make one of my own. I am currently using a light sensor to calculate the direction of error and it works alright, but there is a lot of room for improvement. This is my first revision, and if you have any tips or suggestions, please let me know. I have videos of both versions at my new blog,
http://www.madrobotics.blogspot.com, and you can leave comments there as well. I posted an uncommented version here; my commented one is attached at my blog and only looks good in ROBOTC's IDE...when I pasted it here it looked nasty...