Line 188:
Line 188:
The Push function that connects the identified pin to the zynth and operates a function in the GUI via the short, bold and long press's.
The Push function that connects the identified pin to the zynth and operates a function in the GUI via the short, bold and long press's.
+
+
=====But what is all this fuss about capacitors?=====
+
+
One of the first things that most people delving in to controlling computers with switches is that computers of any kind and a Pi is no exception, do things very fast. So fast in fact that what may seem like an emphatic switch contact to us slow humans is actually a succession of switch bounces as the contacts meet and the computer is fast enough to detect these rapid ons and offs and if this isn't addressed interpret them as not one switch closing once but the same switch bouncing and appearing to open and close several times. This is particularly iritating in the world of encoders where the simple process of turning the encoder would become difficult to operate reliably.
+
+
There are various answers to this problem.
+
Firstly a hardware solution.
+
Add capacitors across the switch contact as close to the switch themselves as you can.
+
+
Add software to de-bounce the switches. Possible for the Pi doing GPIO but not so easy for an MCP23107.
+
So capacitors are recommended to be fitted to address switch bounce.
+
+
+
=====But what are the extra Switches s1-s4?=====
=====But what are the extra Switches s1-s4?=====
Line 208:
Line 222:
<br>
<br>
−
The move to the MCP23017 for the encoders on the zynth freed up some work that the Pi was haing to do and also provided more Input pins for control and involved less wiring inside the box.
+
The move to the MCP23017 for the encoders on the zynth freed up some work that the Pi was having to do and also provided more Input pins for control and involved less wiring inside the box.
Line 219:
Line 233:
====MCP23017 INT-A Pin ====
====MCP23017 INT-A Pin ====
−
To reduce the effort of the Pi the MCP23017 sends an Interrupt to the Pi when something changes on it's input pins. I.E and encoder has statered to turn or the Switch has been pressed or released.
+
To reduce the effort of the Pi the MCP23017 sends an Interrupt to the Pi when something changes on it's input pins. I.E and encoder has started to turn or the Switch has been pressed or released.
<br>
<br>