Tuesday, December 21, 2010

Final Day and Exhibition

The last class day, the day of the exhibition was a very successful one. The major remaining pending task, Fluffy's room, was finally finished. Tuesday morning, I woke up thinking that I would not be able to carry out what needed to be done for that room. The sensors were just not working even though I had made an identical working one for the room of requirements. I could not figure out what the problems were for this sensor or the harp sensor. I went back into the robotics studio about an hour before class started trying to work on the castle again with a fresh mind. Soon after I started working on it, I figured out the problem, it was right in front of me the whole time. I had forgotten that I had switched the sensor wires into a different port, thus the scratch program was simply displaying the wrong sensor value.

Kaity and I worked on fixing everything up together. We suspended my small laptop speakers with pipe cleaners outside Fluffy's room, and I transferred the program onto my computer.

The difficult part was taking the project upstairs. While picking it up off the floor and on to the wheeled cart, parts of it broke off. We took the castle up in two pieces. After transferring it upstairs, Kaity and I spent about an hour to an hour and a half putting it back together and setting everything up and making sure everything was still working. By 4:30, Hogwarts was ready to go.

The exhibition was great. Kaity and I had a lot of fun, and our project was very popular. Our table was crowded by kids, and we learned that a great feature about our project was that it was built for a wide age range. For the really young children, They really enjoyed talking into the microphone of the Gryffindor common room and watching the flames in the fireplace change color.The older kids enjoyed the challenge of the Red Light Green Light Game we had disguised as the battle between Harry and Lord Voldemort. Despite it's difficulties, the kids were determined to make guide Harry to the finish line. Kaity and I enjoyed the company of a kid who went through all the challenges of the castle at least three times. We could tell that he and everyone else were really enjoying themselves.

After the hour of fun, we were sad to see our robotics design days come to an end. The next class was spent taking apart our beloved Hogwarts, (but of course Kaity and I kept some souvenirs). This was such a fun class!! I will definitely miss it.

Unfortunately, videos of the project are unavailable on my blog. I have forgotten the link of the videos posted by Professor Berg. To see a video of our project, you can see my partner's blog here:


Well this is where my blog ends. I'll really miss this class!!!

Sunday, December 5, 2010

Final Week Or So....Finishing Touches

Over the final week or so Kaity and I took care of the aesthetics and fine details of our projects. I tweaked some programming and construction while Kaity created Fluffy the three-headed dog. I printed and meticulously cut out the house banners of each of the four Hogwarts houses as well as the Hogwarts Banner to put up in the great hall.
Hogwarts Banner

Hufflepuff and Slytherin House Banners


Gryffindor and Ravenclaw House Banners
We also fashioned out own Harry Potter LEGO minifigures by giving the original LEGO minifigures stylish capes and wands. The Voldemort minifigure also has a white face (fashioned with white electrical tape), with a truly evil look drawn in. The two figures truly look as if they are about to engage in battle!




Next I worked on creating the sensors for fluffy's room. These elaborate sensors require a number of creative looking devices. We need a harp with some sort of metal strings, a wand with some sort of metal tip (so that touching the tip of the wand to the correct harp string would complete the circuit required to make the program you saw earlier function properly. It also requires a sensor similar to that of the room of requirements that will be disguised as a carpet (covered from the bottom in foil which is attached to an alligator clip and another piece of foil attached to an alligator clip on the floor of the LEGO castle; a piece of paper folded like a zig-zag serves as the spring one will compress to press button trap that completes the circuit).
Sensor for the Room of Requirements
and my rug!! =]

Fluffy the Three Headed Dog

The Basilisk is in the process of being scaled thus pictures of him are, at the moment, nonexistent.

Pending tasks: The good news is that I have arranged for small speakers, I have small laptop speakers that can be suspended outside the room. However, we have a great task pending that is fluffy's room. Though I am making the sensors and such for the room, I have tested out several of them, and they don't seem to be working. I have created and repeatedly recreated each of the sensors and I am at a loss for why they aren't working. I have tried to trouble shoot potential problems in multiple ways, but I still can't seem to figure out what the problem is!! The exhibition is in two days and I don't know what to do!!

Wednesday, November 24, 2010

Final Stages of Design

The class before thanksgiving, I had to leave a bit earlier because of my travel plans. However, the amount of work I did on the project outside of class last weekend had more than made up for this fact. Kaity was very happy to see what I had accomplished, and we spent quite a while playing around with and marveling at the door. In class on Tuesday, we finally decided what to do with the Room we had been previously calling The Defense Against the Dark Arts Classroom or Umbridge's Office. We decided that both of those two ideas would no longer work with what our project had now become, so we decided to transform this room into "The Gryffindor Common Room," alluding specifically to the fourth book/movie in which Harry would sometimes talk to his godfather using floo network through the fireplace in the Gryffindor common room. When using floo network, one pours floo powder into a fireplace in order to contact whomever they wish to contact. When talking to the person, the flame turns green (because of the floo powder). We decided to incorporate this idea into our Hogwarts castle by creating a simple program that would change the color of a light from red to green every time someone would talk into it. This was simple and fun to play with once it was done.

Unfortunately however, I forgot to take pictures of the fireplace and the code for it. =[

Now all that is left for us to do is to put together the sensors for fluffy's room and take care of aesthetics (including somehow making a three-headed dog, somehow putting scales on our LEGO basilisk). I also need to find some kind of small speaker to use in fluffy's room because we will be using imported mp3 files in scratch, so we need to find a speaker that is small enough to be conspicuous and make it seem as though the sound is coming from inside the room.

All in all we seem to be making great progress. The castle is almost complete, and it is looking great, I am really excited for its results!

Happy Thanksgiving!!!!

Sunday, November 21, 2010

The Next Few Days....

I Saw Harry Potter 7 part 1 on Saturday!! It was amazing!!! It makes me all the more excited about this Hogwarts Project!!!! 

Over the next few days of working on the project, I started spending a lot of time outside of class to work on this project. The programming for the Final Battle game was difficult. I was trying to design a red light green light game involving two crickets. Voldemort's cricket would just have a light sensor that changes from red to green using a random number generator. I manipulated the program so that the ratio of reds to greens was 6-4 making the game a bit more challenging. The program also tells this cricket to send out an IR beam every time the light turns red.

Harry's cricket was a bit more challenging to design. I spent a few days working on this, trying to figure it out. I tried out many different codes before I finally came up with the one shown in the picture in the previous blog. The program makes it so that one controls the rack, pinion system with a button that causes the structure to move forward. One can only move forward when Voldemort's light is green, because if the motor is on when the light is red (when this cricket receives an IR beam), the motor automatically moves backwards. The player must get all the way to the end to win. This was actually a very difficult game to play.
When I finally completed this program, and even in between, when I wanted to take breaks from thinking about this program, I was programming the other parts of the castle. I created the fluffy program on Scratch.

The Fluffy Program:
Fluffy is Hagrid's three headed dog that guards the Sorcerer's stone in the first book/movie. Kaity and I wanted to incorporate this into our castle, so we decided to create program that is activated by resistance sensors. We would create a resistance sensor that initiates a vicious barking sound indicating that Fluffy has awoken. In order to put fluffy back to sleep, one must play the harp (also using a resistance sensor) to stop Fluffy's barking (therefore putting him back to sleep). This was a relatively easy program to write. I wrote it in Scratch though, so that we could use actual sounds from the movie instead of the sounds included in PicoBlocks.

While this was happening, Kaity was expanding the castle. She built the Room of Requirement on top of Umbridge's office, and was planning to build Fluffy's room on top of that. We decided however, to make it easier on ourselves, and on our structure (taking into account size and distribution of weight) that what is now the "Room of Requirements should actually be Fluffy's room and that We would build a smaller Room of Requirements a bit behind it, kind of connecting the Great Hall part of the structure to the Fluffy part of the structure.

Outside of class, I was trying to figure out how to make the door of the Room of Requirements operate on its own with a motor. One of the problems with this was figuring out how to suspend the door we built from the actual door way in a way we could turn it using a motor. After brainstorming outside of class for a few days, I still had no working ideas. However, in a class period, I somehow came up with a brilliant way. I somehow created a door hinge using LEGO pieces in an innovative way. Finally coming up with the solution to this problem was HIGHLY satisfying.

The next problem was that we needed the motor to turn a vertical rod, and usually we use motors to turn horizontal rods because we can't effectively orient the motor to turn vertical rods. After thinking long and hard about this problem and trying to solve it in many ways, failing each time, we decided to once again consult Professor Berg for suggestions. Assessing the situation, Professor Berg suggested a red motor, (I forgot what these were called, they are the small red motors that stand upright and one can put a vertical LEGO rod into it). This small motor was the PERFECT solution in every way. One of the great aspects of this motor was not only that it solved out problem, but that we were able to hide it well inside the room of requirements. It worked perfectly. By this time however, class was over so we did not get a chance to install it, but I came back outside of class to work on it myself later that evening.

During this time, I installed the motor for the door, I wrote the program to make the door turn using a resistance sensor that has been pressed three times, and I created and tested the resistance sensor, door and program until they worked. What a productive evening!! =]

Our Supports and their reinforcing crossbeams....
Hopefully this will be able to hold our castle up...

This is a side view of the old Room of
Requirements (What is now Fluffy's Room),
and Underneath it is Umbridge's Office

Inside the New Room of Requirements.
This is a close up of the clever door hinge I created

Room of Requirements and Staircase

Aerial View
Room of Requirements Program:
When the sensor is pressed three times, the door opens,
stays open for a short while and then closes.


Monday, November 15, 2010

Testing..... Changing....The Uncooperative Gear

Most of this day was spent on changing the gearing for the rack and pinion system. When I tested the structure at the beginning of the class, I discovered that the motor of the rack and pinion system turned considerably slower when trying to move backwards. This was both a programming, and a physical torque problem. The gears did not have enough torque to move the structure, so I decided to change the gears on the structure to make it stronger. This, however, was not as easy as it sounds. It took me the whole period to figure out how to make the LEGO pieces fit together because somehow the gears did not want to align with the LEGO Flu. I'm still not quite sure how I managed to get everything to fit together but after trying the same few things about 10 or 15 times, the gears finally decided to fit together. (This did not happen during this class period but the next one).

I also changed the programming for this motor a bit, which I wrote in the text interface of the PicoBlock's programming language, because this was easier to do with the complicated program I was writing. I am also more comfortable with text languages because I took two years of Java Programming and also did a lot of work with Python. I have used "block-languages" like the PicoBlocks language. Specifically I used the LEGO NXT Mindstorms language, which is a bit different from PicoBlocks. It can do a lot more than PicoBlocks too........ahhhh...one thing I hate about PicoBlocks: THE LACK OF WHILE LOOPS!!! =[

I changed this program
To this program:
The parts about the IR beams refer to changes I made later that
correspond with the cricket for Voldemort so that the two crickets
can communicate for the final battle program.
Further Progress:
Supports For Umbridge's Office

The Uncooperative Gear

The Rest of the Castle So Far, Umbridge's Office

Wednesday, November 10, 2010

The Epic Battle: Harry Potter v. The Dark Lord

I missed class on Friday because I was off campus because of a religious holiday. On Tuesday, I got straight to work on the mechanics of the Great Hall room. This room had begun to be built on top of the Chamber of Secrets, and in this room, Kaity and I want to stage the final battle between Harry and Lord Voldemort from the final Harry Potter book. Today, I worked on building the mechanics of it. I began by thinking of making another motion module, the one that goes back and forth. However, this seemed very impractical because I wanted to the structure to go farther than the 40 tooth gear allowed. When I consulted Professor Berg about this problem, he suggested a rack and pinion structure...(or at least that's what I believe it's called...). This was an innovative way to make the structure go farther forward. The problem here is that, the farther forward the structure goes, the farther longer it is, and the farther back it goes as well. We have limited space in the back, because if it goes too far backwards, it will run into another room in the castle.


The Castle So Far =]

Side View: Entrance to the Umbridge's Office (not yet built)

The Rack and Pinion Structure inside of the Great Hall
Harry will be standing on the Yellow platform zoomed in on in the next picture
The Platform Harry Will Be Standing On During the Battle

Motor and Mechanics behind the Rack and Pinion Structure

Thursday, November 4, 2010

And The Winner Is............HOGWARTS!!!

So in the end, Kaity and I decided to work together after all to build Hogwarts in a tribute to the epic book and movie series that ruled our childhood. We are also paying tribute to what marks the end of this beautiful journey of Harry Potter: part one of the last installment in the series, Harry Potter and the Deathly Hallows. We began working on the chamber of secrets because we already knew exactly what we wanted to do for this room, and conveniently, this is the lowest room in the castle. For this project, Kaity and I agreed that since I really like programming whereas she doesn't enjoy it as much, and since Kaity really enjoys the LEGO aspect of the project, I am going to be doing all the programming for this while she builds most of the castle. I will also be helping her with the building at times.
As Kaity began building the room, I was creating the motion module that would become our Basilisk, for those of you that are not huge Harry Potter fans, and may not know what I am talking about, the Basilisk is a snake-like monster that Harry had to battle in the second book/movie of the series. The basilisk resides in the chamber of secrets, an underground dungeon. When Harry battles the Basilisk, he defeats it by stabbing the Basilisk through its mouth. The Basilisk should look something like this:
To create the Basilisk, I created a "Reach" motion module using the instructions, this motion module was programmed to move back and forth and stop when a button was pressed. Kaity and I plan to put this button inside the mouth of the Basilisk to reference the story. Here is the code for the Basilisk:
When I finished with the basilisk, I helped Kaity with the building portion, by reinforcing all the walls so that our walls don't break down. Here are pictures of The Chamber of Secrets =]
The Chamber of Secrets
The Basilisk......or at least his skeleton...

The Chamber of Secrets