mathertel / OneButton

An Arduino library for using a single button for multiple purpose input.
http://www.mathertel.de/Arduino/OneButtonLibrary.aspx
Other
920 stars 230 forks source link

Analog or Digital? #95

Closed fyrus7 closed 2 years ago

fyrus7 commented 2 years ago

Example sketch and Readme is confusing.

As i understand, if a code use "button 4" is digital pin. But in example sketch comment to use A1 which is an analog pin.

Which pin is the correct pin to use? Analog or digital?

mathertel commented 2 years ago

The library uses digital signals only. Be sure to see the specs of your board.

E.g. the "Analog pins" on a Arduino UNO board support the Digital and Analog mode. However they do not support attachInterrupt.