IF statement problem

I think I just ran into the same issue. I am trying to run a modified sketch inside a preexisting sketch. The FM transmitter is the portion I am adding. At the start it looks for a connection to the radio and it did have While (1) at the end of the if statement that I removed as it would stop the program. I have replaced this with setting an LED if the statement fails. So if the radio is not attached an LED turns on and the program proceeds. If the radio is attached the program does not pass the if statement. No transmitter connected the serial monitor shows all the serial print messages and proceeds into the void loop. Transmitter connected it serial prints adadfruit radio Si4713 Test and the code does not move past it. I want the code to proceed no matter the state of the radio, the LED will let me know if it failed. Which seems similar to the above situation.

void setup() {
  
  // Serial connection used to print debug values
  Serial.begin(9600);

  //FM Transmitter
  Serial.println("Adafruit Radio - Si4713 Test");

  //fm transmiter fail LED
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
  if (! radio.begin()) {  // begin with address 0x63 (CS high default)
    Serial.println("Couldn't find radio?");
    digitalWrite(LED, HIGH);
  }

  // Uncomment to scan power of entire range from 87.5 to 108.0 MHz
  /*
  for (uint16_t f  = 8750; f<10800; f+=10) {
   radio.readTuneMeasure(f);
   Serial.print("Measuring "); Serial.print(f); Serial.print("...");
   radio.readTuneStatus();
   Serial.println(radio.currNoiseLevel);
   }
   */

  Serial.print("\nSet TX power");
  radio.setTXpower(115);  // dBuV, 88-115 max

  Serial.print("\nTuning into "); 
  Serial.print(FMSTATION/100); 
  Serial.print('.'); 
  Serial.println(FMSTATION % 100);
  radio.tuneFM(FMSTATION); // 102.3 mhz

  // This will tell you the status in case you want to read it from the chip
  radio.readTuneStatus();
  Serial.print("\tCurr freq: "); 
  Serial.println(radio.currFreq);
  Serial.print("\tCurr freqdBuV:"); 
  Serial.println(radio.currdBuV);
  Serial.print("\tCurr ANTcap:"); 
  Serial.println(radio.currAntCap);

  // begin the RDS/RDBS transmission
  radio.beginRDS();
  radio.setRDSstation("AdaRadio");
  radio.setRDSbuffer( "Adafruit g0th Radio!");

  Serial.println("RDS on!");  

  radio.setGPIOctrl(_BV(1) | _BV(2));  // set GP1 and GP2 to output

  // Loop over and initialise all the MAX72XX modules
  for(int i=0; i<4; i++){
    lc.shutdown(i,false);
    lc.setIntensity(i,5);
    lc.clearDisplay(i);
    lc.setIntensity(i,0);
  }

  // Intialise the input pins
  for(int i=0; i<4; i++){
    pinMode(buttonPins[i], INPUT_PULLUP);
  }
  pinMode(submitPin, INPUT_PULLUP);
  pinMode(relayPin, OUTPUT);
  digitalWrite(relayPin, LOW);

  FastLED.addLeds<WS2812B, A2, GRB>(leds, numLeds);

  // Uncomment the following line if you'd like to set a random secret code
  setRandomSecret();
}

@scouser1023

TOPIC SPLIT
PLEASE DO NOT HIJACK / NECRO POST !

Could you take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.