Momentary toggle switch that can be turned off by a sensor input as well

Okay so a momentary push button switch is used to turn a GPS guidance system on and off. However I have a 0-5 volt sensor coming in on a ads1115 that I need to also turn off the system if the voltage is above 2.5 volts. My question.... is it possible to change the state of a momentary push button switch from a sensor input? If so how would I go about that?

Anita_Bath:
Okay so a momentary push button switch is used to turn a GPS guidance system on and off. However I have a 0-5 volt sensor coming in on a ads1115 that I need to also turn off the system if the voltage is above 2.5 volts. My question.... is it possible to change the state of a momentary push button switch from a sensor input? If so how would I go about that?

A wiring diagram would help us understand how your system operates.

You could consider a MOSFET or a relay but I'm not sure I understand how your system is wired.

I want to have the code do it not the hardware. I need it to read an input from a sensor through an ads 1115 and if the voltage from the sensor is over 2.5 volts I need it to trigger a state change to a switch in the code. That switch is a momentary push button wired in on pin 6. It is pulled high and drag low to activate, noise free safe. That switch toggles the auto guidance on and off. I need the sensor to kick auto guidance off if I try to turn the steering wheel and that's what the pressure sensor is for. Is it possible to do something like that?

So you want to do the auto guidance if either the button was pressed or the pressure sensor reports a certain pressure?

NO, the button is to turn the guidance on and off. That part is already in place. It is a push button.

I want to add a feature that will turn auto guidance off if I turn the steering wheel. The pressure sensor spikes up over 2.5 volts for example when the steering wheel is turned. Then the state of the button switch needs to be changed to kill guidance. If the wheel isn't turned then the pressure sensor stays at around .68 volts and the guidance stays on since its below the trigger limit of 2.5 volts.

Anita_Bath:
NO, the button is to turn the guidance on and off. That part is already in place. It is a push button.

I want to add a feature that will turn auto guidance off if I turn the steering wheel. The pressure sensor spikes up over 2.5 volts for example when the steering wheel is turned. Then the state of the button switch needs to be changed to kill guidance. If the wheel isn't turned then the pressure sensor stays at around .68 volts and the guidance stays on since its below the trigger limit of 2.5 volts.

The button toggles the guidance on/off. The button is wired to pin 6. The button is active LOW.

You are not being clear. Does your software read the push button? If so, what does it do in response to that reading?

I think you could get a lot more help if you provided a wiring diagram and the current code you have.

Did you take those readings with a DMM or did you scope it?

That switch is a momentary push button wired in on pin 6. It is pulled high and drag low to activate, noise free safe. That switch toggles the auto guidance on and off.

Please provide the code which reads the button and toggles the auto guidance on/off.

I want to add a feature that will turn auto guidance off if I turn the steering wheel. The pressure sensor spikes up over 2.5 volts for example when the steering wheel is turned. Then the state of the button switch needs to be changed to kill guidance. If the wheel isn't turned then the pressure sensor stays at around .68 volts and the guidance stays on since its below the trigger limit of 2.5 volts.

It should be possible to create a conditional statement which turns the guidance off it is currently on and the pressure sensor goes over 2.5v.

Please provide the code you are using to read the ads1115.

How does the pressure sensor output voltage "spike"? Does it stay high, or is it a transitory signal. I think @aarg was getting at this point when he asked how you measured the sensor voltages. Can you show us the ads1115 output when the voltage "spike" occurs?