Legos are Fun and Educational!
Oct. 15th, 2011 11:12 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
My class this semester is Real Time System Development. Our first project is to install a real-time OS on a Lego Mindstorms brick (one of the new ones, the NXT) and then build a robot* and write a program to make the robot follow a line.
The operating system is nxtOSEK, which is apparently an operating system often used on the computers in peoples' cars and has been ported to run on the NXT. There were a few minutes of serious anxiety as I realized that I had no idea how the operating system actually worked and that it was apparently much more complicated than I expected it to be**. So I downloaded the specification and started going through it. Then, in a fit of boredom and desperation I start looking at the example code that came with the Lego version; rather than forcing myself to read through the entire specification and fully grasp how the OS works, I figured maybe I could scrape out enough information from the examples to cobble together something Good Enough. I started looking through the C code first and kind of sort of got an idea of how it works and it wasn't terribly scary except there are some weird things that don't work the way I expected when I started tweaking at the source code.
Now normally I am more comfortable with C than with C++, but I figured I'd have a look at the C++ examples as well just in case... and found something that Made Sense. At this point, I am far enough along in the assignment that I am reasonably confident that I can figure out the additional daunting stuff over the course of tomorrow. It'll be a little tricky to get all of the sensors to play nicely with the main goal of following the line, but I'm not nearly as freaked out about it as I was 5 hours ago!
*Surprisingly, this may be the first actual robot that I have ever built!
**Project is due Monday. Seems a bit tight to be trying to learn the nuances of a whole new operating system by then...
The operating system is nxtOSEK, which is apparently an operating system often used on the computers in peoples' cars and has been ported to run on the NXT. There were a few minutes of serious anxiety as I realized that I had no idea how the operating system actually worked and that it was apparently much more complicated than I expected it to be**. So I downloaded the specification and started going through it. Then, in a fit of boredom and desperation I start looking at the example code that came with the Lego version; rather than forcing myself to read through the entire specification and fully grasp how the OS works, I figured maybe I could scrape out enough information from the examples to cobble together something Good Enough. I started looking through the C code first and kind of sort of got an idea of how it works and it wasn't terribly scary except there are some weird things that don't work the way I expected when I started tweaking at the source code.
Now normally I am more comfortable with C than with C++, but I figured I'd have a look at the C++ examples as well just in case... and found something that Made Sense. At this point, I am far enough along in the assignment that I am reasonably confident that I can figure out the additional daunting stuff over the course of tomorrow. It'll be a little tricky to get all of the sensors to play nicely with the main goal of following the line, but I'm not nearly as freaked out about it as I was 5 hours ago!
*Surprisingly, this may be the first actual robot that I have ever built!
**Project is due Monday. Seems a bit tight to be trying to learn the nuances of a whole new operating system by then...
no subject
Date: 2011-10-16 04:00 am (UTC)Have fun, good luck, and good skill.
no subject
Date: 2011-10-17 08:19 pm (UTC)Sounds like fun!