If you run out of digital input pins, you can also use a spare analog input for certain functions to act as a digital input. When the chosen Analog Input is above 2.5v it is read as ON, and when it is below 2.5v it is read as OFF.


An example of this is as follows:


We would like to use the Analog V3 input on our ME442 Wire-In as a map switch input. We plan to toggle this wire by a toggle switch on the dash.


Wiring wise, we need to either put approx 5v into Analog V3, or 0v. So we use a "pullup" resistor to hold Analog V3 at 5v when the switch is not connecting Ana V3 to ground. The circuit would look like the below. a 10K resistor is recommend for pullups. We can get 5V from the 5VREF pin on the ECU, or, for example on ME221s, the throttle 5v reference. A diagram of the circuit is below:





Next in MEITE, we need to set ANA V3 to act as a "Button". We do this from the Analog Settings (Under IO settings Tab) We set the chosen input to Btn 1 Raw:



Now we can check the button actually works by toggling the switch and noting the readout Btn 1 Val (under Inputs on the entity tree):


Next, lets set map switching to use the chosen Btn 1 Analog button as a signal source, then set it to switch fuel (VE) maps when this button is set:



And that's it - you now have an analog input re-purposed to act as a digital input to switch fuel maps.