Why do you sometimes use "#define", but on other occasions use "const int", when they both seem to do the same thing?
@TheBoredRobotLLC
3 жыл бұрын
I usually use #define when I am giving a name to a pin number. In the context of these Arduino examples, const int will do the same thing. I do believe that using #define vs const int has some implications when using up RAM on the Arduino.
Пікірлер: 6
Thanks! This really helped me :D
@TheBoredRobotLLC
2 жыл бұрын
Glad it helped!
Why do you sometimes use "#define", but on other occasions use "const int", when they both seem to do the same thing?
@TheBoredRobotLLC
3 жыл бұрын
I usually use #define when I am giving a name to a pin number. In the context of these Arduino examples, const int will do the same thing. I do believe that using #define vs const int has some implications when using up RAM on the Arduino.
Amazing
@TheBoredRobotLLC
Жыл бұрын
Thank you!