You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-2
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,9 @@ Acctually we have the following features implemented:
8
8
9
9
* Up to 8 buttons in a single Analog pin _(by default limited to 8 to keep firmware footprint low, it's tunable in software)_.
10
10
* Secondary functions (press & hold) in each button, configured on demand.
11
-
* Intuitive behavior in the case you held a button pressed (_on the original AnalogButtons library when you held a button you got two events, first a click and then a hold one, that's not acceptable for some uses._)
11
+
* Intuitive behavior in the case you held a button pressed (_on the original AnalogButtons library when you held a button you got two events, first a click and then a hold one, that's not intuitive._)
12
+
* Single click event (the click does not repeat itself)
13
+
* Hold event will repeat at a pace defined by the hold limit (if you keep the button pressed long enough)
12
14
13
15
## Inspiration ##
14
16
@@ -21,7 +23,20 @@ This library is based in the following source codes:
21
23
22
24
The first thing to do is determine how many buttons you will manage in the analog pin. By default max number of buttons per pin is limited to 8 to limit memory consumption (you can declare less or more buttons as your need commands), it can be controlled defining the `BUTTONS_COUNT` macro **before** including this library.
23
25
24
-
You then create an instance of the lib to be configured and user later in our code; like this:
26
+
It's time to play with your hardware, to setup a resistor network you have two main variants:
27
+
28
+
* As a fixed resistors stair values
29
+
* As a multiple resistors values
30
+
31
+
The two main configuration can be seen on the file Resistors_variants.png in the project folder.
32
+
33
+
**Note:**_In theory you can declare up to ~21 buttons with a +/- 20 units of tolerance and a guard zone of 10 units_
34
+
35
+
_That means that you have to setup your resistors in a way that the specific central values are at least 3 units of tolerance away from each other, if not you will have problems_
36
+
37
+
_For example if your resistor network yields a values of 256, 270 and 350 and you use the default 10 units of tolerance the first two will make you in trouble as 270 - 256 = 14; as you can see 14 is less than the recommended 30 units (3 * 10)_
38
+
39
+
Now you create an instance of the lib at the beginning of your code; like this:
0 commit comments