No. And yes, in a way.
It definitely makes it faster to comment out once you don't need/want it for debugging anymore, and I suppose does make your loop faster by not performing those lines of code, but not in a way you would really notice in an application such as yours.
For an operation that relied on tight tolerances between the controller(s) and device(s) interacting with one another, it might be more noticeable, but I'm thinking more of industrial automation type stuff here, no so much the sort of thing hobbyists like you and I are putting together.
Not at all. It's a style convention I happen to prefer as I tend to follow a certain flow/order of operations, if you will, when I code. As long as the values don't change between the time you read a sensor, say, and print to Serial, it doesn't really matter.
You could but don't have to. It's all whatever you find works best for you, based on trial and error. Your code will be "imperfect" by your standard dozens of times, right? And only "correct" once.
Once it's "correct" - heed this advice: Do Not Change It, Ever. What you do is, make a copy, name it V2 or something like that, put a note at the top commented out with your change goals and remind yourself it's a working copy built off the name of the last one.
In fact, I like to make a note at the top of the good sketch that I don't even comment out just in case my absentminded butt decides to go willy nilly on that nice code. That way, it will throw the error when I try to compile right to that note to myself and I can just close the sketch and not save any of the changes I might have just made.
I figured as much but as i think i said before, that's the part you will have fun tweaking to your liking once all your basic functions are working. (or Godzilla's liking, really, I mean who's the real CEO in this project?).
Tip: for now, just make two generic delays if you decide to stick with delays. Just two quick ones, maybe delay(300); and delay(600);.
In fact, I like to make delays when I use them, their own separate function so it's really easy to change them all at once later on.:
void shortD(){
delay(300);
}
void longD(){
delay(600);
}
then just call them in your code by calling the whole function:
digitalWrite(someDevice, HIGH);
shortD();
digitalWrite(someDevice, LOW);
longD();
Thanks and happy to help.
I'm not better at this than you are, though. I have just been at the hobby longer (about 10 years now). I'm you. I made all the same mistakes and more starting out, and still make lots of mistakes before my stuff works the way I want. I have just found more efficient ways of finding my mistakes.
As you are discovering, there is nothing simple in this hobby. I mean, look at the hard core circuit builders in this forum, some of those true gurus like @Grumpy_Mike or @LarryD . The stuff they post half the time here still looks like hieroglyphs to me and show me I'm still just a beginner in electronics compared to them - at 10 years in!