Go Down

Topic: Iron Man: Two servos - CW and CCW at the same time with capacitive touch sensor! (Read 149 times) previous topic - next topic

H3M4N

Reading up on some terminology. What are the advantages of using define over constant function?

If renamed, would the current helmetPin that is defined need to be changed in these areas only? The ones dealing with choosing an arduino pin?

 HELMET(int pinNumber, boolean helmetState, int down, int up)
    {
      helmetPin = pinNumber;

      ^

    int getHelmetPin() {

      return helmetPin;
    }               ^
    void setHelmetPin(int pinNumber) {
      helmetPin = pinNumber;
    }   ^

Go Up