ACremers:
Thank you very much, sometimes you stare at things and it makes no sense. All it takes is fresh set of eyes to see the simple mistake.
Consider keeping a code review teddy bear on the workbench. When you have one of these kinds of things, you explain to the teddy how your code is supposed to work. Very frequently the teddy will catch errors in your code and logic.
PaulMurrayCbr:
Consider keeping a code review teddy bear on the workbench. When you have one of these kinds of things, you explain to the teddy how your code is supposed to work. Very frequently the teddy will catch errors in your code and logic.
I like that idea very much.
I do my explaining to a mythical person in a notebook or a text file. The discipline of writing/explaining coherently often shows up stupidities.
No, it's in the right order If you want it to default (aka in setup) call digitalWrite() before pinMode(). Otherwise the pin will be pulled LOW for a short amount of time. And depending on what's connected give you startup blimps.
I do my explaining to a mythical person in a notebook or a text file. The discipline of writing/explaining coherently often shows up stupidities.
For me it helps to start a thread on a forum. By the time I have described the code and problem correctly, I've also figured out what is wrong and don't have to post