Hello,
This drives me nuts - how come this example works when I uncomment commented lines, but fails to work when the lines are commented? Please help!
I understand what you're trying to do, but you're not calling blink1, but you are calling delay(), and pinMode() and digitalWrite (). (I left you three massive clues there )
The compiler doesn't complain, because there's nothing wrong with the code, just like this
void loop ()
{
42;
blink1();
}
Is there any chance you could explain this further? Why is there nothing wrong with it? I can sort of understand why the constant isn't an error but what does the compiler think you are trying to do by writing the function name on its own?
I can sort of understand why the constant isn't an error but what does the compiler think you are trying to do by writing the function name on its own?
If you can understand why a numeric literal doesn't cause a problem I don't really see why you think a bare function pointer (hint) should cause a problem.