how is this for a start?

ok I updated the code a little bit. This is a result of testing just the IR receiver

#include <IRremote.h>
 
int RECV_PIN = 9;
int transistorPin = 11;
 
IRrecv irrecv(RECV_PIN);
 
decode_results results;
 
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  pinMode(transistorPin, OUTPUT);  
}
 
void loop() {
 
  if (irrecv.decode(&results)) {
    Serial.println(results.value, DEC);
 
    if(results.value <= -2094865891)
{
    
     
      digitalWrite(transistorPin,!digitalRead(transistorPin));   // set the Fan opposite of current state when button pressed.
        delay(200);
      }
    irrecv.resume(); // Receive the next value
  }
}