Sunday, July 6, 2008

NXTSegway Revision 0.1

This is the first revised edition of my project NXTSegway, which was first released yesterday. As you can see from the video, the robot is a tad bit more stable and, with some extra work in the next couple of weeks, might just rival some of the other segway-bots out there :-) To achieve quicker response time, I replaced the scaled-to-100 light sensor data with the raw, more precise 0-1023 data. I tried to implement some sort of bias into the correction process to overcome the imbalance in the structure itself, but after a couple hours of fruitless work I found that if I calibrate the robot's "vertical" light value while tilting it slightly, the program will compensate for the imbalance without any extra code. Granted, this will need to be changed, but it works for now. I plan on adding some sort of dynamic adjustment of the midValue later this week; it is harder than I had previously thought. Anyway, here is the new video and code:

Source file can be downloaded here (5KB)

No comments: