CM: If you want sympathy, I can relate (sort of, though that would be empathy).
I had to take a chem test quite a while ago. The test was extremely difficult and the teacher allowed us to correct the test to earn back half of the points we lost. I was sick on the day he handed them back but returned the following day and asked for the test at the start of class. He said that he had the test at his desk. Next day, I went to his desk and he said he had it at home. Long story short, he lost it.
When grade reports came out, my chem grade was horrible because of the test, which my teacher blamed me for never correcting. He is no longer teaching at that school.
In your case the fault lays on both sides. The instructions do not explicitly say that you may not come with the device already assembled (such dedication to a project might be admired by a good teacher). However, the directions did implicitly say that you could not bring the device assembled, by saying that you would have time in class to assemble, and that you needed to show that it could fit in the box. While the teacher is partially at fault for not making the directions very clear, you are at fault for not reading into the directions, and, when you were confused, not asking him. A lenient teacher would have let you disassemble and reassemble, but not every teacher is kind (or organized in my case).
Instead of brooding over this instance, which in hindsight will not affect you very much, you should look at it as a learning experience (I'm sure you hate to hear this). You now know to read between the lines (like in Diplomacy :P) and to ask teachers if you have a problem with their instructions.
As to the people arguing with you: Lay off him. You may think he's a little shit but remember: you are arguing with a middle/early high schooler, likely being bombarded with the full onslaught of hormonal rage, who is not thinking completely rationally. You were that war once but now are older and wiser (though this thread has me questioning). You can walk away; this argument is really not that important.