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. |