Sunday, July 22, 2012

Tic Tac Toe-riffic!


The debut of the Tic Tac Toe Robot class went remarkably well, especially considering that half the hour was spent doing math!

The robot itself is composed of a "bridge" section that rolls across the two walls, a car that rolls across the bridge, and an arm that can be raised or lowered, in order to pick up and place game pieces. The car also has a color sensor, which it uses to detect the presence of game pieces.

For more great pictures of the robot, please check out my wife's blog!

When I brought it into the classroom, the kids swarmed all around me, ogleing the automaton and asking tons of questions. It was a great way to get their attention and get them excited about the class.

Each square on the 3x3 grid is represented by an odd number 1-17. In fact, if you were to write the numbers on the grid, you would get a magic square, in which all rows, columns, and diagonals add up to the same number. I did this because I originally planned to make the robot a lot smarter.

The robot uses light sensors to communicate with two other NXT robots, each of which is operated by a student. The students take turns using their robot's buttons and screen to select a square to move to. Their NXT then converts the number of the square into light pulses which are detected by the Tic Tac Toe robot and converted back into a number. This was a great excuse to teach the students how computers use binary numbers and how to convert between binary and decimal.

Having received its command, the robot then moves to the specified square and verifies that it is empty. If it's not, it returns home and requests a retry. Otherwise, it grabs the next available piece and places it in the square. It then returns home and waits to receive a number from the other NXT intelligent brick.

Originally, I was going to make this a student project, but it ended up being way too complicated. Some of the challenges I faced included the arm design and the transmission of numbers using binary. This is by far my most complicated NXT project to date!

Searching for inspiration for this year's second class topic, I drew from the video below, which a co-worker forwarded me. Well, you should watch it and be amazed, but the short of it is that the guy in the video built a crane-like Mindstorms robot and equipped it with a drill bit (the only non-LEGO part). Then he modeled a 3-D head in AutoCAD or something like that and somehow interfaced it with the robot. The software then "told" the robot where to drill. The program needed hours to complete, but with time-lapse photography, you can see the model take shape in just a couple minutes!

Sometime soon, I'll post a video of my own, for you all to enjoy.