Open dpharris opened 6 years ago
Looks like newer IDEs, see: https://www.arduino.cc/en/Tutorial/DigitalPins use: pinMode(pin, INPUT_PULLUP); and at keast Energia and Teensy allow: pinMode(pin, INPUT_PULLDOWN);
Use code: if(sense) pinMode(pin, INPUT_PULLDOWN); else pinMode(pin, INPUT_PULLUP); instead of: pinMode(pin, INPUT); // .. change the pin to input.. digitalWrite(pin, HIGH); // .. and activate pull up
BUT INPUT_PULLDOWN is NOT defined on all processors.
I am not sure ButtonLed will work on all processors because it uses: pinMode(pin, INPUT); // .. change the pin to input.. digitalWrite(pin, HIGH); // .. and activate pull up and not all processor activate pull-up this way.