Trigger FOB keys with arduino.

I’m trying to figure out the best way to trigger the 2 keys on my spare FOB based on a temperature on point, and temp off point, the FOB has 2 button, A “ON” button, and a “OFF” button, “ON” turns a remote relay on, “OFF” turns it off, The button’s them self are surface contact style, with a flex cap made of spring steel on top, id like to trigger the “ON” button’s contact’s for say, 250ms when the temp reaches 25c, and off when the temp reaches 22c.

Any idea’s?

#include <LiquidCrystal.h>


//#define ledPin 13                  // LED connected to digital pin 13
#define lm35 2                          // LM35 on Analog 2
#define relayPin1 5                  // Relay connected to digital pin 5
#define relayPin2 6                  // Relay connected to digital pin 6
  
 LiquidCrystal lcd(13, 12, 11, 7, 8, 9, 10);

unsigned long last_temperature_check_time = 0;
unsigned long last_lcd_turn_on_time = 0;

void printlcd(byte command)            //Quick function to send LCD commands.
 {
 lcd.begin(20, 4);
  }


void setup()                  // run once, when the sketch starts
{
  analogReference(INTERNAL);      //using internal voltage reference ~1.1v
 
  pinMode(lm35, INPUT);            // sets the analog pin as input
  pinMode(relayPin1, OUTPUT);      // sets the digital pin as output
  pinMode(relayPin2, OUTPUT);      // sets the digital pin as output
 
 
}


void loop()                  
{
      unsigned long time = millis();
      if (time - last_temperature_check_time > 100)      //has it been 20 seconds?
      {    last_temperature_check_time = time;
                 
                 
                

            
            //Check Temperature routine
            long temp;
              long temp1;
              long temp2;
             long temp_x;
             int lm35_val=0;
  
              
              
              lm35_val=analogRead(lm35);      //read value of center leg of LM35
             temp = lm35_val;                  //output voltage of LM35, 10mV = 1 Degree Celcius
              temp1=temp/10;                  //creates true Celcius reading
             temp2=temp%10;                  //modulus operation to calculate remainder for higher resolution reading
  
              if (temp2 >= 5)
                    {
                      temp_x++;
                    }
                 
                
            //Send temperature to LCD routine
              
                lcd.setCursor(0,2);
              lcd.print("Current Temp");            //Print "Current Temp" message
              lcd.print(temp1);                  //Print CelsuisTemperature
              lcd.print(".");                  //Print decimal place
              lcd.print(temp2);                  //Print "Tenths" place
              lcd.print((char)176);                          //Print degree charater
              lcd.print("C");                  //Print "C" for Celsuis

            

            
               //Turn Relay on/off routine
               if ((temp1) < 25 )                   //check temp is above x degrees
                 digitalWrite (relayPin1, HIGH);      //if temp is above x degrees turn pin "ON  
                 else if ((temp1) > 22 )                    //check temp is below x degrees
                 digitalWrite (relayPin1, LOW);      //if temp is below x degree turn pin "OFF"
 
     
      
         
      }
      
      
}

What you want is Arduino to close a switch.

You can use a transistor or , a 4066 switch IC, or even better en optocoupler to go between Arduino and the switch.

A relay could be used but it's really not needed for a low voltage and low current situation like yours.

If you google Arduino + optocoupler i guess you will find what you need.

Yes that's correct, The switch is momentary, im looking for help on the code side, the switch only needs to be triggered for a short peroid of time, how do i make my 2 output pins turn on for 250ms then turn off once the target temperature is reached?