As I understand it a statement like (digitalRead(DoorShutSW) is basically shorthand (or another of writing) (DoorShutSW == HIGH)
QuoteAs I understand it a statement like (digitalRead(DoorShutSW) is basically shorthand (or another of writing) (DoorShutSW == HIGH) Then you misunderstand, digitalRead() is function that returns the state of the pin. (DoorShutSW == HIGH) evaluates the pin number, not its state. I explained this in my earlier post.http://arduino.cc/en/Reference/DigitalRead
Whatever others pointed out, all being correct, is probably not helping you because you consider whatever "works" is correct already. You need to read a few sample programs that come with arduino. You can't just invent how to speak the C language. Read a few well written short samples and you might be able to mimic, until you truly understand. If you have some experience speaking a second language, you would agree with me. You can't just invent your own way to speak it. You mimic how native speakers talk until you can talk on your own. Those that pointed out your mistakes are the native speakers of the C language. Fighting them won't get your ideas understood by arduino. Read the sample code and hit the books.
while(PIR1, PIR2 == HIGH); All I can say is that this works....I'm saying is that it does or at least seems to as far as I can tell. If it is in fact wrong then it is wrong in form and not functionality.